/* event_detail.css */
.event-detail-container {
    display: flex;
    max-width: 1200px;
    margin: 80px auto 40px;
    gap: 30px;
    padding: 0 15px;
}
.event-main-content {
    flex: 1;
    min-width: 0;
}
.event-sidebar {
    width: 320px;
    flex-shrink: 0;
}
.event-header { margin-bottom: 20px; border-bottom: 1px solid #ccc; padding-bottom: 20px; }
.event-category { color: #0071bc; font-weight: bold; margin-bottom: 10px; }
.event-header h1 { font-size: 28px; margin: 0 0 15px; }
.event-meta { display: flex; flex-direction: column; gap: 8px; color: #555; }

.event-main-image { margin-bottom: 30px;text-align: center; }
.event-main-image img {
    max-width: 100%;
    max-height: 430px;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    background-color: #f8f9fa;
}

.event-body-content { line-height: 1.8; }
.event-body-content img { max-width: 100%; height: auto; border-radius: 4px; }

.event-body-content p{
    margin:0;
}


.ticket-item.disabled {
    background-color: #f2f2f2;
    color: #999;
    border-color: #e0e0e0;
}
.ticket-item.disabled a {
    cursor: not-allowed; /* クリック不可カーソル */
    pointer-events: none; /* クリックイベントを無効化 */
}
.ticket-item.disabled .ticket-status {
    color: #b22222; /* やや暗めの赤 */
}
/* --- ▲▲▲ ここまで追加 ▲▲▲ --- */


.organizer-info { display: flex; align-items: center; gap: 15px; }
.organizer-icon { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; }
.organizer-name { font-weight: bold; text-decoration: none; color: #333; }
.organizer-name:hover { text-decoration: underline; }

#loading-or-error-container { text-align: center; margin-top: 100px; padding: 20px; }
.error-message { color: #d9534f; font-weight: bold; }



.event-main-content h3 {
    font-size: 20px;
    border-bottom: 2px solid #0071bc;
    padding-bottom: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
}
.section-divider {
    border-top: 1px solid #eee;
    margin: 30px 0;
}
.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    margin-top: 20px;
}
.summary-table th,
.summary-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}
.summary-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    width: 180px;
}
.map-container {
    margin-top: 10px;
    position: relative;
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
}

.map-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.notes-content,
.policy-content {
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
}



.sidebar-box {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 20px;
}
.sidebar-box h3 { margin-top: 0; }
.ticket-list { list-style: none; padding: 0; margin: 0; }
.ticket-item { border: 1px solid #ddd; border-radius: 5px; margin-bottom: 10px; background-color: #fff; transition: background-color 0.2s, border-color 0.2s; }
.ticket-item a { display: flex; justify-content: space-between; align-items: center; padding: 15px; text-decoration: none; color: inherit; }
.ticket-item:not(.disabled):not(.sold-out):hover { border-color: #0071bc; background-color: #f8faff; }

.ticket-name { font-weight: bold; }
.ticket-price { font-size: 18px; font-weight: bold; }
.ticket-status { font-weight: bold; text-align: right; color: #28a745; }

.ticket-item.sold-out { background-color: #f2f2f2; color: #999; }
.ticket-item.sold-out a { cursor: not-allowed; }
.ticket-item.sold-out .ticket-status { color: #999; }

.ticket-item.disabled {
    background-color: #f2f2f2;
    color: #999;
    border-color: #e0e0e0;
}
.ticket-item.disabled a {
    cursor: not-allowed;
    pointer-events: none;
}
.ticket-item.disabled .ticket-status {
    color: #dc3545;
    font-size: 14px;
}

.organizer-info { display: flex; align-items: center; gap: 15px; }
.organizer-icon { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; }
.organizer-name { font-weight: bold; text-decoration: none; color: #333; }
.organizer-name:hover { text-decoration: underline; }

#loading-or-error-container { text-align: center; margin-top: 100px; padding: 20px; }
.error-message { color: #d9534f; font-weight: bold; background-color: #f2dede; border: 1px solid #ebccd1; padding: 15px; border-radius: 4px; }


/* --- ▼▼▼ チケットと申込状況のスタイル ▼▼▼ --- */
.application-status-box {
    font-size: 20px;
    text-align: right;
    font-weight: bold;
    padding: 0 5px 15px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}
.application-status-box span {
    font-size: 1.2em;
    font-weight: bold;
    color: #ff5500;
}
.application-status-box .status-full {
    font-size: 1.2em;
    color: #dc3545;
}
.application-status-box .status-half,
.application-status-box .status-open {
    font-size: 1em;
    color: #0d6efd;
}

.ticket-list { list-style: none; padding: 0; margin: 0; }
.ticket-item { border: 1px solid #ddd; border-radius: 5px; margin-bottom: 10px; background-color: #fff; transition: background-color 0.2s, border-color 0.2s; }
.ticket-item a { display: flex; justify-content: space-between; align-items: center; padding: 15px; text-decoration: none; color: inherit; }
.ticket-item:not(.disabled):not(.sold-out):hover { border-color: #0071bc; background-color: #f8faff; }

.ticket-name { font-weight: bold; }
.ticket-price { font-size: 18px; font-weight: bold; }

.ticket-status {
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
    margin-left: 15px;
}

.ticket-status.status-ok { color: #198754; font-size: 1.4em; } /* 〇 */
.ticket-status.status-warning { color: #ffc107; font-size: 1.4em; } /* △ */
.ticket-status.status-danger { color: #dc3545; } /* 残りわずか */
.ticket-status.status-soldout { color: #dc3545; font-weight: bold; } /* 完売 */

.ticket-item.sold-out { background-color: #f2f2f2; color: #999; }
.ticket-item.sold-out a,
.ticket-item.disabled a {
    cursor: not-allowed;
    pointer-events: none;
}
.ticket-item.sold-out .ticket-status { 
    color: #dc3545;
    font-size: 1em;
}

.ticket-item.disabled {
    background-color: #f2f2f2;
    color: #999;
    border-color: #e0e0e0;
}
.ticket-item.disabled .ticket-status,
.ticket-status.disabled-reason {
    color: #dc3545;
    font-size: 12px;
    font-weight: normal;
    text-align: right;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .event-main-image { margin-top:20px; margin-bottom: 10px;}

    .event-detail-container { flex-direction: column; margin-top: 60px; }
    .event-sidebar { width: 100%; }
    .event-header h1 { font-size: 20px; }
    .summary-table th { 
        width: 30%;
        font-size: 14px;
        padding: 10px;
        vertical-align: middle;
    }
    .summary-table td {
        font-size:14px;
        padding:10px;
    }
    .map-container {
        height: 300px;
    }
}
