/* =============================================================
   program-preview.css
   Styles for auto-program-* (inline HTML preview) and
   program-doc-* (PDF/Word export document) renderers.
   ============================================================= */

/* ---------------------------------------------------------------
   Conference header (title / venue / dates) shown above logo
   --------------------------------------------------------------- */

.auto-program-conference-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #1f3f5b;
}

.auto-program-conference-name {
    margin: 0 0 0.35rem;
    color: #143d5d;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}

.auto-program-conference-venue {
    margin: 0 0 0.2rem;
    color: #2a5278;
    font-size: 1rem;
    font-weight: 700;
}

.auto-program-conference-dates {
    margin: 0;
    color: #4a6578;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ---------------------------------------------------------------
   Logo
   --------------------------------------------------------------- */

.program-public-logo,
.auto-program-logo {
    display: block;
    width: min(100px, 30vw);
    height: auto;
    margin: 0.75rem auto 0.75rem;
}

/* ---------------------------------------------------------------
   auto-program – Section headers (Program Summary / Full Program)
   --------------------------------------------------------------- */

.auto-program-section {
    margin-bottom: 2.5rem;
}

.auto-program-section-head {
    margin-bottom: 1.25rem;
}

.auto-program-section-head.is-centered {
    text-align: center;
}

.auto-program-section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #17314d;
    margin: 0 0 0.35rem;
    line-height: 1.2;
}

.auto-program-section-title.is-centered {
    text-align: center;
}

.auto-program-timezone-note {
    font-size: 0.97rem;
    color: #5a7490;
    margin-bottom: 0.15rem;
}

.auto-program-venue-note {
    font-size: 0.97rem;
    font-weight: 700;
    color: #1f4b72;
    margin-bottom: 0.15rem;
}

/* ---------------------------------------------------------------
   auto-program – Day header
   --------------------------------------------------------------- */

.auto-program-day {
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d0dde9;
}

.auto-program-day-head {
    background: #17314d;
    color: #fff;
    padding: 0.8rem 1.25rem;
}

.auto-program-day-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    letter-spacing: 0.01em;
    margin: 0;
}

/* ---------------------------------------------------------------
   auto-program – Summary session list
   --------------------------------------------------------------- */

.auto-program-session-list {
    background: #fff;
}

.auto-program-summary-band {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e6edf4;
    background: #fff;
}

.auto-program-summary-band:last-child {
    border-bottom: none;
}

.auto-program-summary-band.is-type-break,
.auto-program-summary-band.is-break-row {
    background: #fef6e4;
    border-left: 4px solid #d97706;
}

.auto-program-summary-band.is-type-keynote {
    background: #f7fbff;
}

/* Time badge pill */
.auto-program-summary-group-label {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    background: #17314d;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-radius: 999px;
    padding: 0.28rem 0.95rem;
    margin: 0 auto 0.6rem;
}

.auto-program-summary-group-label.is-break {
    background: #b45309;
}

/* Session header line (title + location) */
.auto-program-summary-header-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem 0.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #17314d;
    margin-bottom: 0.4rem;
}

.auto-program-summary-header-line.is-break {
    color: #78350f;
    font-weight: 600;
}

.auto-program-session-title {
    font-weight: 700;
}

.auto-program-session-headline-meta {
    color: #5a7490;
    font-size: 0.92rem;
    font-weight: 600;
}

/* Summary content lines (speaker name, affiliation, etc.) */
.auto-program-summary-line {
    text-align: center;
    font-size: 0.92rem;
    color: #1f4b72;
    font-weight: 600;
    line-height: 1.5;
}

.auto-program-summary-line.is-secondary {
    color: #5e7a90;
    font-weight: 400;
}

.auto-program-summary-line.is-panel-title {
    font-size: 1.0rem;
    font-weight: 700;
    color: #173e60;
    text-align: center;
    margin-bottom: 0.2rem;
}

.auto-program-summary-line.is-left {
    text-align: left;
    padding-left: 0.4rem;
}

.auto-program-summary-bullet {
    color: #3b5975;
    margin-right: 3px;
}

.auto-program-summary-location {
    font-size: 0.88rem;
    color: #5a7490;
    margin-top: 0.15rem;
    text-align: center;
}

/* Parallel sessions grid */
.auto-program-summary-grid {
    display: block;
}

.auto-program-summary-grid.is-parallel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.auto-program-summary-card.is-parallel-card {
    border: 1px solid #dce8f0;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    background: #f7fbff;
}

/* ---------------------------------------------------------------
   auto-program – Full program list
   --------------------------------------------------------------- */

.auto-program-full-list {
    display: flex;
    flex-direction: column;
}

.auto-program-full-item {
    border-bottom: 1px solid #dce8f0;
    background: #fff;
}

.auto-program-full-item:last-child {
    border-bottom: none;
}

.auto-program-session-body {
    /* content wrapper */
}

/* Full program session header bar */
.auto-program-full-header-line {
    background: #1f3f5b;
    color: #fff;
    padding: 0.7rem 1.1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

.auto-program-full-header-line .auto-program-session-title {
    color: #fff;
    font-weight: 700;
}

.auto-program-full-header-line .auto-program-session-time-inline {
    color: #c8d9e8;
    font-size: 0.87rem;
    font-weight: 600;
}

.auto-program-full-header-line .auto-program-session-headline-meta {
    color: #c8d9e8;
    font-size: 0.87rem;
    font-weight: 600;
}

/* Type-specific header tints */
.auto-program-full-item.is-type-keynote .auto-program-full-header-line {
    background: #17314d;
}

.auto-program-full-item.is-type-technical .auto-program-full-header-line {
    background: #1f3f5b;
}

.auto-program-full-item.is-type-panel .auto-program-full-header-line {
    background: #2b4d6f;
}

.auto-program-full-item.is-type-break .auto-program-full-header-line {
    background: #b45309;
}

/* Mode badge */
.auto-program-mode-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.auto-program-mode-badge.is-online {
    background: rgba(176, 208, 240, 0.25);
    border-color: rgba(176, 208, 240, 0.5);
}

.auto-program-mode-badge.is-hybrid {
    background: rgba(159, 212, 178, 0.25);
    border-color: rgba(159, 212, 178, 0.5);
}

.auto-program-mode-badge.is-onsite {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
}

/* Session detail lines (below header) */
.auto-program-session-detail,
.auto-program-session-location,
.auto-program-session-abstract {
    padding: 0.3rem 1.1rem;
    font-size: 0.9rem;
    color: #3a5570;
    line-height: 1.55;
}

.auto-program-session-abstract {
    text-align: justify;
}

.auto-program-session-abstract-label {
    font-weight: 700;
    color: #1d3550;
    padding: 0;
    margin-right: 0.25rem;
}

.auto-program-session-link,
.auto-program-join-link-top {
    padding: 0.3rem 1.1rem;
    font-size: 0.88rem;
}

/* ---------------------------------------------------------------
   auto-program – Featured speakers
   --------------------------------------------------------------- */

.auto-program-featured-speaker {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid #eef3f8;
}

.auto-program-featured-speaker-photo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #d1e0ed;
}

.auto-program-featured-speaker-content {
    min-width: 0;
    flex: 1;
}

.auto-program-featured-speaker-name {
    font-weight: 700;
    font-size: 0.97rem;
    color: #1a3a57;
    line-height: 1.35;
}

.auto-program-featured-speaker-affiliation {
    font-size: 0.875rem;
    color: #5a7490;
    margin-top: 0.1rem;
}

.auto-program-speaker-bio {
    padding: 0 1.1rem 0.65rem 1.1rem;
}

.auto-program-speaker-bio-label {
    font-weight: 700;
    font-size: 0.875rem;
    color: #1d3550;
    margin-bottom: 0.2rem;
}

.auto-program-speaker-bio-paragraph {
    font-size: 0.875rem;
    color: #3a5570;
    line-height: 1.6;
    margin: 0 0 0.5rem;
    text-align: justify;
}

/* ---------------------------------------------------------------
   auto-program – Panel discussion
   --------------------------------------------------------------- */

.auto-program-panel-roster {
    padding: 0.65rem 1.1rem;
}

.auto-program-panel-title {
    font-weight: 700;
    color: #1d3550;
    margin-bottom: 0.3rem;
}

.auto-program-panel-abstract {
    font-size: 1.0rem;
    font-weight: 600;
    color: #1d3550;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    text-align: left;
}

.auto-program-panel-role {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5a7490;
    margin: 0.5rem 0 0.25rem;
}

.auto-program-panel-grid {
    display: grid;
    gap: 0.5rem;
}

.auto-program-panel-grid.is-moderator {
    grid-template-columns: 1fr;
}

.auto-program-panel-grid.is-members {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ---------------------------------------------------------------
   auto-program – Agenda (paper list)
   --------------------------------------------------------------- */

.auto-program-agenda {
    padding: 0.5rem 1.1rem 0.75rem;
}

.auto-program-agenda-item {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.3rem 0.75rem;
    padding: 0.55rem 0;
    border-top: 1px solid #eef3f8;
    font-size: 0.875rem;
    align-items: start;
}

.auto-program-agenda-item:first-child {
    border-top: none;
}

.auto-program-agenda-time {
    color: #5a7490;
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
}

.auto-program-agenda-title {
    font-weight: 600;
    color: #1d3550;
    line-height: 1.45;
}

.auto-program-agenda-authors {
    grid-column: 2;
    color: #5a7490;
    font-size: 0.82rem;
}

.auto-program-agenda-paper-id {
    font-size: 0.78rem;
    color: #7a92a8;
    font-weight: 600;
}

.auto-program-agenda-mode,
.auto-program-agenda-meta {
    grid-column: 2;
    font-size: 0.8rem;
    color: #7a92a8;
}

/* ---------------------------------------------------------------
   auto-program – Responsive
   --------------------------------------------------------------- */

@media (max-width: 767.98px) {
    .auto-program-section-title {
        font-size: 1.5rem;
    }

    .auto-program-day-title {
        font-size: 1.05rem;
    }

    .auto-program-summary-header-line {
        flex-direction: column;
        gap: 0.2rem;
    }

    .auto-program-summary-grid.is-parallel-grid {
        grid-template-columns: 1fr;
    }

    .auto-program-full-header-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .auto-program-agenda-item {
        grid-template-columns: 1fr;
    }

    .auto-program-agenda-authors,
    .auto-program-agenda-mode,
    .auto-program-agenda-meta {
        grid-column: 1;
    }

    .auto-program-panel-grid.is-members {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------
   program-doc – Document wrapper (PDF / Word export)
   --------------------------------------------------------------- */

.program-doc {
    max-width: 820px;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #1d3550;
    line-height: 1.5;
}

.program-doc-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #17314d;
    text-align: center;
}

.program-doc-title {
    font-size: 2rem;
    font-weight: 800;
    color: #17314d;
    margin: 0 0 0.3rem;
}

.program-doc-subtitle {
    font-size: 0.95rem;
    color: #5a7490;
    margin-bottom: 0.2rem;
}

.program-doc-meta {
    font-size: 0.85rem;
    color: #7a92a8;
}

.program-doc-timezone-note,
.program-doc-venue-note {
    font-size: 0.93rem;
    color: #294765;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.program-doc-section-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #17314d;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #17314d;
}

.program-doc-day,
.program-doc-summary-day {
    margin-bottom: 1.5rem;
}

.program-doc-day-head,
.program-doc-summary-day-head {
    background: #17314d;
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.program-doc-day-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin: 0;
}

/* Summary */
.program-doc-summary-band {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e6edf4;
}

.program-doc-summary-group-label {
    font-weight: 800;
    font-size: 0.82rem;
    color: #17314d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.program-doc-summary-card {
    margin-bottom: 0.25rem;
    font-size: 0.88rem;
    color: #1d3550;
}

.program-doc-summary-parallel-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.3rem;
}

.program-doc-summary-item {
    font-size: 0.875rem;
    color: #1d3550;
}

/* Full items */
.program-doc-full-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.program-doc-full-item {
    border: 1px solid #d0dde9;
    border-radius: 8px;
    overflow: hidden;
}

.program-doc-full-header-line,
.program-doc-session-header-line {
    background: #1f3f5b;
    color: #fff;
    padding: 0.65rem 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.65rem;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.program-doc-session-header-title {
    font-weight: 700;
    color: #fff;
}

.program-doc-session-header-meta {
    color: #c8d9e8;
    font-size: 0.85rem;
}

.program-doc-line {
    padding: 0.3rem 0.9rem;
    font-size: 0.88rem;
    color: #3a5570;
}

.program-doc-mode-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
}

.program-doc-abstract {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    color: #3a5570;
    line-height: 1.55;
    text-align: justify;
}

/* Agenda table */
.program-doc-agenda {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.program-doc-agenda td {
    padding: 0.45rem 0.75rem;
    vertical-align: top;
    border-top: 1px solid #eef3f8;
    color: #1d3550;
}

.program-doc-agenda-time {
    white-space: nowrap;
    color: #5a7490;
    font-weight: 600;
    font-size: 0.82rem;
    width: 80px;
}

.program-doc-agenda-title {
    font-weight: 600;
}

.program-doc-agenda-meta {
    color: #7a92a8;
    font-size: 0.8rem;
}

/* Featured speakers */
.program-doc-featured-speaker {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-top: 1px solid #eef3f8;
}

.program-doc-featured-speaker-photo {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d1e0ed;
}

.program-doc-featured-speaker-content {
    min-width: 0;
}

.program-doc-featured-speaker-name {
    font-weight: 700;
    color: #1a3a57;
    font-size: 0.93rem;
}

.program-doc-featured-speaker-affiliation {
    color: #5a7490;
    font-size: 0.85rem;
}

.program-doc-speaker-bio {
    padding: 0.3rem 0.9rem 0.5rem;
}

.program-doc-speaker-bio-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1d3550;
    margin-bottom: 0.15rem;
}

.program-doc-speaker-bio-paragraph {
    font-size: 0.85rem;
    color: #3a5570;
    line-height: 1.55;
    margin: 0 0 0.4rem;
    text-align: justify;
}

.program-doc-join-link {
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
}

/* Panel */
.program-doc-panel-roster {
    padding: 0.5rem 0.9rem;
}

.program-doc-panel-title {
    font-weight: 700;
    color: #1d3550;
    margin-bottom: 0.25rem;
}

.program-doc-panel-abstract {
    font-size: 1.0rem;
    font-weight: 600;
    color: #1d3550;
    margin-bottom: 0.4rem;
    line-height: 1.5;
    text-align: left;
}

.program-doc-panel-role {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5a7490;
    margin: 0.4rem 0 0.2rem;
}

.program-doc-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.4rem;
}

/* Tables */
.program-doc-table {
    width: 100%;
    border-collapse: collapse;
}

.program-doc-table th,
.program-doc-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d5e1ed;
    font-size: 0.875rem;
}

.program-doc-table th {
    background: #f0f4f7;
    font-weight: 700;
    color: #17314d;
}

/* Page break */
.program-doc-page-break {
    break-before: page;
    page-break-before: always;
}

/* Export footer */
.program-doc-export-footer {
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #d5e1ed;
    font-size: 0.8rem;
    color: #7a92a8;
}

.program-doc-export-footer-table {
    width: 100%;
    border-collapse: collapse;
}

.program-doc-export-footer-right {
    text-align: right;
}

.program-doc-export-footer-page {
    font-weight: 600;
}

/* ---------------------------------------------------------------
   Print
   --------------------------------------------------------------- */

@media print {
    .program-doc-section:nth-of-type(2),
    .auto-program-section:nth-of-type(2) {
        break-before: page !important;
        page-break-before: always !important;
    }

    .auto-program-day-head,
    .program-doc-day-head,
    .program-doc-summary-day-head {
        background: #17314d !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .auto-program-day-title,
    .program-doc-day-title {
        color: #fff !important;
    }

    .auto-program-full-header-line,
    .program-doc-full-header-line,
    .program-doc-session-header-line {
        background: #1f3f5b !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .auto-program-summary-group-label {
        background: #17314d !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .program-doc-mode-pill,
    .program-doc-mode-pill *,
    .auto-program-mode-badge,
    .auto-program-mode-badge * {
        background: #f5f8fb !important;
        border-color: #d8e3ec !important;
        color: #1f2933 !important;
    }
}
