/* =========================================================
   Admin-panel sections (includes/panel-sections.php): speaker and committee
   cards, academic partners, welcome videos, the Technical Session room
   schedule and their dialogs. Loaded by the main website (includes/header.php)
   and the Malaysia landing page, so both show the same components in the
   conference palette: oxford #26303B, bronze #9A694E, ivory #EEEBDD.
   ========================================================= */

.pm-grid, .pm-partners, .pm-videos, .pm-rooms, .pm-room-dialog, .pm-dialog {
    --pm-ink: #26303B;
    --pm-ink-2: #4A535D;
    --pm-muted: #6B7178;
    --pm-accent: #9A694E;
    --pm-accent-dark: #845842;
    --pm-wash: #F4ECE5;
    --pm-line: #DDD7CB;
    --pm-surface: #FFFFFF;
    --pm-night: #1D252D;
}

/* ---------------------------------------------------------- groups */
.pm-group + .pm-group { margin-top: 48px; }
.pm-group .pm-group-title {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin: 0 0 26px; font-family: var(--font-ui, inherit); font-size: 18.4px; font-weight: 800;
    color: #26303B; text-align: center; letter-spacing: .01em;
}
.pm-group-title::before, .pm-group-title::after {
    content: ""; width: 42px; height: 2px; border-radius: 2px; background: #9A694E;
}

/* ---------------------------------------------------------- speaker / committee cards */
.pm-grid {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 24px; justify-content: center;
}
.pm-grid > .pm-card { flex: 0 1 262px; min-width: 232px; }
.pm-card {
    position: relative; display: flex; flex-direction: column; align-items: center;
    padding: 28px 22px 24px; text-align: center;
    background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: 18px;
    box-shadow: 0 10px 30px rgba(38, 48, 59, .07);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.pm-card::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 74px; border-radius: 18px 18px 0 0;
    background: linear-gradient(135deg, #26303B, #34404D);
}
.pm-card:hover { transform: translateY(-4px); border-color: var(--pm-accent); box-shadow: 0 16px 44px rgba(38, 48, 59, .12); }
.pm-media { position: relative; z-index: 1; width: 128px; height: 128px; margin-bottom: 16px; }
.pm-photo, .pm-ph {
    width: 128px; height: 128px; border-radius: 50%; object-fit: cover;
    border: 4px solid var(--pm-surface); box-shadow: 0 6px 18px rgba(38, 48, 59, .18); background: var(--pm-wash);
}
.pm-ph { display: grid; place-items: center; font-size: 48px; color: var(--pm-accent); }
.pm-flag {
    position: absolute; right: 2px; bottom: 6px; width: 34px; height: 24px; object-fit: cover;
    border-radius: 4px; border: 2px solid var(--pm-surface); box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.pm-mode {
    display: inline-flex; align-items: center; gap: 5px; margin: 0 0 10px; padding: 4px 12px;
    font-size: 11.8px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--pm-accent-dark); background: var(--pm-wash); border-radius: 999px;
}
.pm-mode.is-virtual { color: #2f4b8f; background: #E8EDF7; }
.pm-card .pm-name {
    margin: 0 0 6px; font-family: var(--font-ui, inherit); font-size: 17px; font-weight: 800;
    line-height: 1.3; color: var(--pm-ink);
}
.pm-role { margin: 0 0 8px; font-size: 14.1px; font-weight: 600; color: var(--pm-accent-dark); line-height: 1.45; }
.pm-affil { margin: 0 0 6px; font-size: 13.8px; color: var(--pm-ink-2); line-height: 1.5; }
.pm-country { margin: 0; font-size: 13.1px; font-weight: 600; color: var(--pm-muted); }
.pm-bio-btn {
    display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding: 9px 18px;
    font: 700 13.4px/1 var(--font-ui, inherit); color: #fff; background: var(--pm-accent);
    border: 0; border-radius: 999px; cursor: pointer; transition: background .2s ease;
}
.pm-card .pm-bio-btn { margin-top: 16px; }
.pm-bio-btn:hover, .pm-bio-btn:focus-visible { background: var(--pm-accent-dark); }

/* ---------------------------------------------------------- academic partners */
.pm-partners {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 22px; justify-content: center;
}
.pm-partners > .pm-partner { flex: 0 1 240px; min-width: 200px; }
.pm-partner-in {
    display: flex; flex-direction: column; align-items: center; gap: 14px; height: 100%;
    padding: 24px 20px; text-align: center; text-decoration: none;
    background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: 18px;
    box-shadow: 0 2px 10px rgba(38, 48, 59, .05);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
a.pm-partner-in:hover { transform: translateY(-4px); border-color: var(--pm-accent); box-shadow: 0 16px 44px rgba(38, 48, 59, .1); }
.pm-partner-logo { display: grid; place-items: center; width: 100%; height: 110px; }
.pm-partner-logo img { max-width: 100%; max-height: 110px; object-fit: contain; }
.pm-partner-name {
    padding-top: 12px; width: 100%; border-top: 1px solid var(--pm-line);
    font: 700 14.7px/1.4 var(--font-ui, inherit); color: var(--pm-ink);
}

/* ---------------------------------------------------------- welcome videos */
.pm-videos {
    display: grid; gap: 26px; justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(280px, 540px));
}
.pm-video {
    margin: 0; overflow: hidden; background: var(--pm-surface);
    border: 1px solid var(--pm-line); border-radius: 18px; box-shadow: 0 10px 30px rgba(38, 48, 59, .08);
}
.pm-video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.pm-video figcaption {
    padding: 14px 18px; text-align: center;
    font: 700 16px/1.4 var(--font-ui, inherit); color: var(--pm-ink);
}

/* ---------------------------------------------------------- room schedule buttons */
.pm-rooms { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pm-rooms-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px;
    font: 700 13.6px/1.2 var(--font-ui, inherit); color: #fff; background: var(--pm-ink);
    border: 0; border-radius: 999px; cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.pm-rooms-btn:hover, .pm-rooms-btn:focus-visible { background: var(--pm-accent); transform: translateY(-2px); }

/* ---------------------------------------------------------- dialogs */
.pm-dialog {
    width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
    color: var(--pm-ink); background: var(--pm-surface); border: 0; border-radius: 18px;
    box-shadow: 0 30px 80px rgba(20, 26, 33, .35);
}
.pm-dialog[open] { display: flex; flex-direction: column; }
.pm-dialog::backdrop { background: rgba(26, 34, 43, .62); }
.pm-room-dialog { width: min(1040px, calc(100vw - 32px)); }
.pm-dialog-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 20px 24px; border-bottom: 1px solid var(--pm-line);
}
.pm-dialog .pm-dialog-head h2 { margin: 0 0 4px; font: 800 19.2px/1.3 var(--font-ui, inherit); color: var(--pm-ink); }
.pm-dialog-head p { margin: 0; font-size: 14.1px; color: var(--pm-muted); }
.pm-dialog-head.is-dark { background: var(--pm-night); border-bottom: 0; }
.pm-dialog .pm-dialog-head.is-dark h2 { color: #fff; }
.pm-dialog-head.is-dark p { color: #fff; opacity: .85; }
.pm-dialog-close {
    flex: none; display: grid; place-items: center; width: 36px; height: 36px;
    font-size: 16px; color: var(--pm-ink); background: var(--pm-wash); border: 0; border-radius: 50%; cursor: pointer;
}
.pm-dialog-head.is-dark .pm-dialog-close { color: #fff; background: rgba(255, 255, 255, .14); }
.pm-dialog-body { overflow-y: auto; padding: 22px 24px 26px; font-size: 15.2px; line-height: 1.7; }
.pm-dialog-body.is-flush { padding: 0; }
.pm-dialog-body p { margin: 0 0 12px; }
.pm-dialog-photo { float: left; width: 120px; height: 120px; margin: 4px 18px 10px 0; border-radius: 14px; object-fit: cover; }

.pm-room-scroll { overflow-x: auto; }
.pm-room-table { width: 100%; border-collapse: collapse; font-size: 14.4px; }
.pm-room-table thead th {
    position: sticky; top: 0; z-index: 1; padding: 12px 16px; text-align: left; white-space: nowrap;
    font: 700 12.8px/1.2 var(--font-ui, inherit); color: var(--pm-ink);
    background: var(--pm-wash); border-bottom: 1px solid var(--pm-line);
}
.pm-room-table td { padding: 14px 16px; vertical-align: top; color: var(--pm-ink-2); border-bottom: 1px solid var(--pm-line); }
.pm-room-table tbody tr:nth-child(even) td { background: #FCFBF8; }
.pm-room-no { font-weight: 700; color: var(--pm-ink); }
.pm-room-time { white-space: nowrap; font-weight: 600; }
.pm-room-paper { display: block; color: var(--pm-ink); line-height: 1.5; }
.pm-room-by { display: block; margin-top: 4px; font-size: 13.1px; color: var(--pm-muted); }
.pm-room-session { min-width: 170px; }

html.pm-dialog-open:has(dialog.pm-dialog[open]) { overflow: hidden; }

@media (max-width: 575.98px) {
    .pm-grid > .pm-card { flex-basis: 300px; min-width: 0; }
    .pm-dialog-photo { float: none; display: block; margin: 0 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .pm-card, .pm-partner-in, .pm-rooms-btn { transition: none; }
    .pm-card:hover, a.pm-partner-in:hover, .pm-rooms-btn:hover { transform: none; }
}
