/* ==========================================================================
   AUDITION.ZONE - Modern Public Portal (public.css)
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #eef2f6;
    color: #2d3748;
    line-height: 1.6;
    padding-bottom: 60px;
}

/* Header */
.portal-header {
    background: linear-gradient(135deg, #071e3d 0%, #1f4287 100%);
    color: #ffffff;
    padding: 32px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-bottom: 4px solid #f6a623;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.header-container h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.header-tagline {
    font-size: 1rem;
    color: #d1e3ff;
    font-weight: 400;
}

/* Main Container Layout */
.layout-container {
    max-width: 1200px;
    margin: 28px auto 0 auto;
    padding: 0 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1f4287;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    margin-bottom: 20px;
    transition: transform 0.15s ease;
}

.back-link:hover {
    transform: translateX(-3px);
    text-decoration: underline;
}

/* Two-Column Event Dashboard Grid */
.event-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .event-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Foundations */
.ui-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 24px;
}

.ui-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfdfe;
}

.ui-card-header h3 {
    font-size: 1.15rem;
    color: #071e3d;
    font-weight: 700;
    margin: 0;
}

.ui-card-body {
    padding: 20px;
}

/* Sidebar Styles */
.sidebar-sticky {
    position: sticky;
    top: 20px;
}

.event-highlight-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #071e3d;
    margin-bottom: 16px;
    line-height: 1.3;
}

.info-badge-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
}

.info-icon {
    font-size: 1.1rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.info-detail strong {
    display: block;
    color: #1a202c;
}

.info-detail span {
    color: #4a5568;
    font-size: 0.88rem;
    display: block;
}

/* Primary Sidebar Action Buttons */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 18px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn-cta-submit {
    background: #27ae60;
    color: #ffffff;
}

.btn-cta-submit:hover {
    background: #219653;
    transform: translateY(-1px);
}

.btn-cta-map {
    background: #f7fafc;
    color: #1f4287;
    border: 1px solid #cbd5e0;
    font-size: 0.95rem;
    padding: 10px 14px;
}

.btn-cta-map:hover {
    background: #edf2f7;
}

.btn-disabled {
    background: #a0aec0 !important;
    color: #ffffff !important;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

/* Coordinator List */
.coordinator-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coord-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    padding: 10px 12px;
    border-radius: 8px;
}

.coord-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1f4287;
    flex-shrink: 0;
}

.coord-avatar-empty {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #cbd5e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.coord-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #071e3d;
}

.coord-info .coord-role {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 2px;
}

.coord-info a {
    font-size: 0.82rem;
    color: #1f4287;
    text-decoration: none;
    display: inline-block;
}

.coord-info a:hover {
    text-decoration: underline;
}

/* Letter Card */
.letter-banner {
    background: #fefcf9;
    border-left: 4px solid #f6a623;
}

.letter-prose {
    font-size: 1rem;
    color: #333;
    line-height: 1.7;
    margin-bottom: 16px;
    white-space: pre-line;
}

.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #c53030;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(197, 48, 48, 0.25);
    transition: background 0.15s ease;
}

.btn-download-pdf:hover {
    background: #9b2c2c;
}

/* Ensemble Full Cards */
.ensemble-card {
    border-top: 4px solid #1f4287;
}

.ensemble-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 12px;
}

.ensemble-name-heading {
    font-size: 1.45rem;
    font-weight: 800;
    color: #071e3d;
    margin: 0;
}

.deadline-pill {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

/* Clinicians Section */
.ensemble-subhead {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #718096;
    margin: 20px 0 10px 0;
    font-weight: 800;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 4px;
}

.clinician-strip {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.clinician-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1f4287;
    flex-shrink: 0;
}

.clinician-avatar-empty {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #cbd5e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.clinician-info h5 {
    margin: 0;
    font-size: 1rem;
    color: #071e3d;
}

.clinician-info .clinician-title {
    font-size: 0.82rem;
    color: #718096;
    font-style: italic;
    margin-bottom: 4px;
}

.clinician-info .clinician-bio {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.45;
}

/* Materials Table */
.materials-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-top: 8px;
}

.materials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.materials-table th,
.materials-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
}

.materials-table th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.materials-table tr:last-child td {
    border-bottom: none;
}

.btn-sheet-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: #1f4287;
    border: 1px solid #c7d2fe;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-sheet-download:hover {
    background: #e0e7ff;
}

/* Multi-Event Cards */
.events-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.event-overview-card {
    border-top: 4px solid #1f4287;
    padding: 24px;
}

.event-overview-card h3 {
    color: #071e3d;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

/* Footer */
.portal-footer {
    text-align: center;
    padding: 30px 15px 0 15px;
    color: #a0aec0;
    font-size: 0.85rem;
}

/* ==========================================================================
   AUDITION MATERIALS TREE ACCORDION
   ========================================================================== */

/* Master Top Level */
.materials-master-accordion {
    border: 1px solid #d2d6dc;
    border-radius: 8px;
    background: #ffffff;
    margin-top: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.materials-master-accordion[open] {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e0;
}

.materials-master-summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 18px;
    background: #f7fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.materials-master-summary::-webkit-details-marker {
    display: none;
}

.materials-master-summary:hover {
    background: #edf2f7;
}

.summary-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #071e3d;
    font-size: 1.05rem;
}

.item-count {
    color: #718096;
    font-size: 0.85rem;
    font-weight: 500;
}

.chevron-indicator {
    font-size: 0.85rem;
    color: #718096;
    transition: transform 0.2s ease;
}

.materials-master-accordion[open] > .materials-master-summary .chevron-indicator,
.instrument-accordion[open] > .instrument-summary .chevron-indicator {
    transform: rotate(180deg);
}

/* Branch Container */
.tree-branch-container {
    padding: 12px 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #edf2f7;
}

/* Instrument Branch */
.instrument-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fcfdfe;
    overflow: hidden;
}

.instrument-summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfdfe;
    font-size: 0.95rem;
    user-select: none;
}

.instrument-summary::-webkit-details-marker {
    display: none;
}

.instrument-summary:hover {
    background: #f1f5f9;
}

.sub-count {
    font-size: 0.8rem;
    color: #a0aec0;
    font-weight: normal;
}

/* Leaf File List */
.tree-leaf-list {
    list-style: none;
    padding: 6px 14px 10px 34px;
    margin: 0;
    background: #ffffff;
    border-top: 1px dashed #e2e8f0;
}

.tree-leaf-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f7fafc;
    font-size: 0.92rem;
}

.tree-leaf-item:last-child {
    border-bottom: none;
}

.material-leaf-title {
    color: #2d3748;
    font-weight: 500;
}

/* ==========================================================================
   CLINICIAN INTERACTIVE CARD & BIO MODAL
   ========================================================================== */

.clickable-clinician {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.clickable-clinician:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

.clinician-modal-link {
    display: inline-block;
    font-size: 0.8rem;
    color: #1f4287;
    font-weight: 600;
    margin-top: 4px;
}

/* Modal Overlay */
.bio-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 30, 61, 0.65);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal Card */
.bio-modal-card {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: bioModalFadeIn 0.2s ease-out;
}

@keyframes bioModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.bio-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: #edf2f7;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    z-index: 10;
}

.bio-modal-close:hover {
    background: #e2e8f0;
    color: #1a202c;
}

.bio-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bio-modal-header-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 24px 18px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
}

.bio-modal-photo {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #1f4287;
    flex-shrink: 0;
}

.bio-modal-photo-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.bio-modal-lead h3 {
    margin: 0;
    font-size: 1.35rem;
    color: #071e3d;
    font-weight: 800;
}

.bio-modal-subtitle {
    margin-top: 4px;
    color: #718096;
    font-size: 0.95rem;
    font-style: italic;
}

.bio-modal-body-scroll {
    padding: 20px 24px 24px 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.bio-modal-prose {
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3748;
    white-space: pre-line;
}

/* Header Logo Alignment */
.header-brand-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: left;
}

.portal-logo {
    max-height: 72px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .header-brand-row {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .portal-logo {
        max-height: 55px;
    }
}
