/* ═══════════════════════════════════════════════════
   ECI Wallboard — White/black defaults, fully themeable
   ═══════════════════════════════════════════════════ */

:root {
    /* All colours are set inline by PHP theme variables.
       These are fallback defaults only. */
    --wb-header-bg:      #ffffff;
    --wb-header-text:    #111827;
    --wb-venue-text:     #6b7280;
    --wb-body-bg:        #f3f4f6;
    --wb-sidebar-bg:     #ffffff;
    --wb-sidebar-text:   #111827;
    --wb-sidebar-border: #e5e7eb;
    --wb-card-bg:        #ffffff;
    --wb-card-text:      #111827;
    --wb-card-role:      #6b7280;
    --wb-card-company:   #9ca3af;
    --wb-card-border:    #e5e7eb;
    --wb-ticker-bg:      #4F46E5;
    --wb-ticker-text:    #ffffff;
    --wb-counter-bg:     #ffffff;
    --wb-counter-num:    #4F46E5;
    --wb-counter-label:  #6b7280;
    --eci-brand:         #4F46E5;

    --topbar-h:  80px;
    --footer-h:  42px;
    --sidebar-w: 22vw;
}

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

html, body {
    background: var(--wb-body-bg) !important;
    color: var(--wb-card-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    height: 100%;
}

/* ── Outer wrap ──────────────────────────────────── */
.eci-wallboard-wrap {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--wb-body-bg);
    overflow: hidden;
}

/* ── Top Bar ─────────────────────────────────────── */
.eci-wb-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: var(--topbar-h);
    background: var(--wb-header-bg);
    flex-shrink: 0;
    z-index: 10;
    border-bottom: 3px solid var(--eci-brand);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.eci-wb-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.eci-wb-logo {
    height: 48px;
    object-fit: contain;
}

.eci-wb-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--wb-header-text);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.eci-wb-location {
    font-size: 20px;
    font-weight: 500;
    color: var(--wb-venue-text);
    display: block;
    margin-top: 4px;
    letter-spacing: -0.2px;
}

.eci-wb-topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.eci-wb-stat-box {
    text-align: center;
    background: var(--wb-counter-bg);
    border: 1.5px solid var(--wb-card-border);
    border-radius: 10px;
    padding: 8px 18px;
}

.eci-wb-stat-num {
    font-size: 30px;
    font-weight: 800;
    color: var(--wb-counter-num);
    display: block;
    line-height: 1;
}

.eci-wb-stat-label {
    font-size: 10px;
    color: var(--wb-counter-label);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.eci-wb-clock {
    font-size: 26px;
    font-weight: 600;
    color: var(--wb-header-text);
    font-variant-numeric: tabular-nums;
    min-width: 68px;
    text-align: right;
}

/* ── Main body ───────────────────────────────────── */
.eci-wb-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - var(--topbar-h) - var(--footer-h));
    background: var(--wb-body-bg);
}

/* ── Left: grid area ─────────────────────────────── */
.eci-wb-main {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--wb-body-bg);
}

.eci-wb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 22px 24px;
    align-content: start;
    overflow: hidden;
    flex: 1;
    min-height: 0;  /* critical: allows flex child to shrink below content size */
}

/* ── Attendee card ───────────────────────────────── */
.eci-wb-card {
    background: var(--wb-card-bg);
    border: 1.5px solid var(--wb-card-border);
    border-radius: 16px;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: cardSlideIn 0.4s ease-out;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.eci-wb-card.eci-wb-new {
    border-color: var(--eci-brand);
    box-shadow: 0 0 18px rgba(79,70,229,0.2);
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.eci-wb-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.eci-wb-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--wb-card-text);
    line-height: 1.3;
    margin-bottom: 5px;
}

.eci-wb-job-title {
    font-size: 13px;
    color: var(--wb-card-role);
    line-height: 1.5;
    margin-top: 3px;
}

.eci-wb-company {
    font-size: 12px;
    color: var(--wb-card-company);
    line-height: 1.5;
    font-style: italic;
}

.eci-wb-linkedin {
    font-size: 12px;
    color: var(--eci-brand);
    margin-top: 7px;
}

/* ── RIGHT SIDEBAR ───────────────────────────────── */
.eci-wb-sidebar {
    width: var(--sidebar-w);
    min-width: 280px;
    background: var(--wb-sidebar-bg);
    border-left: 3px solid var(--wb-sidebar-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 16px;
    overflow: hidden;          /* NO scroll — content must fit */
    flex-shrink: 0;
    box-shadow: -2px 0 8px rgba(0,0,0,0.06);
    height: 100%;
    box-sizing: border-box;
}

/* ── QR block — takes only what it needs ─────────── */
.eci-wb-qr-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-shrink: 0;            /* Don't compress the QR */
}

.eci-wb-qr-heading {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-align: center;
    color: var(--wb-sidebar-text);
}

.eci-wb-qr-frame {
    border: 4px solid var(--eci-brand);
    border-radius: 16px;
    padding: 8px;
    background: #fff;
    display: inline-flex;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.eci-wb-qr-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    max-width: 100%;
}

.eci-wb-qr-sub {
    font-size: 11px;
    color: var(--wb-sidebar-text);
    opacity: 0.6;
    text-align: center;
    margin-top: 8px;
    line-height: 1.5;
    flex-shrink: 0;
}

/* ── Divider ─────────────────────────────────────── */
.eci-wb-sidebar-divider {
    width: 60%;
    height: 2px;
    background: var(--eci-brand);
    border-radius: 99px;
    margin: 10px auto;
    opacity: 0.4;
    flex-shrink: 0;
}

/* ── Ad / Sponsor block — fills remaining space ──── */
.eci-wb-ad-block {
    width: 100%;
    flex: 1;                   /* Takes all remaining height */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;             /* Allows flex child to shrink below content size */
    overflow: hidden;
}

.eci-wb-ad-img {
    width: 100%;
    max-height: 100%;          /* Never taller than the available space */
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: block;
}

.eci-wb-ad-placeholder {
    border: 2px dashed var(--wb-sidebar-border);
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--wb-sidebar-text);
    opacity: 0.4;
    text-align: center;
    gap: 8px;
    padding: 20px;
}

.eci-wb-ad-icon { font-size: 36px; }

.eci-wb-ad-placeholder p {
    font-size: 14px;
    font-weight: 600;
}

.eci-wb-ad-placeholder small {
    font-size: 11px;
    line-height: 1.5;
}

/* ── Spotlight ───────────────────────────────────── */
.eci-wb-spotlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    text-align: center;
    animation: spotlightFade 4.5s ease-in-out forwards;
    pointer-events: none;
    width: 70%;
}

@keyframes spotlightFade {
    0%   { opacity: 0; transform: translate(-50%, -52%) scale(0.9); }
    15%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    75%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -48%) scale(0.95); }
}

.eci-wb-spotlight-inner {
    background: var(--wb-card-bg);
    border: 4px solid var(--eci-brand);
    border-radius: 28px;
    padding: 70px 90px 60px;
    box-shadow: 0 32px 100px rgba(0,0,0,0.2), 0 0 80px rgba(79,70,229,0.15);
    position: relative;
    width: 100%;
}

.eci-spot-tag {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 6px 28px;
    border-radius: 99px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.eci-spot-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 24px;
    border: 4px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.eci-spot-name {
    font-size: 36px;
    font-weight: 800;
    color: var(--wb-card-text);
    margin: 20px 0 12px;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.eci-spot-job-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--wb-card-role);
    margin-bottom: 6px;
}

.eci-spot-company {
    font-size: 19px;
    font-weight: 400;
    color: var(--wb-card-company);
    font-style: italic;
}

/* ── Page indicator dots ────────────────────────── */
.eci-wb-page-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
    background: var(--wb-body-bg);
    flex-shrink: 0;
}

.eci-page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wb-card-border);
    transition: background 0.3s, transform 0.3s;
    display: inline-block;
}

.eci-page-dot.active {
    background: var(--eci-brand);
    transform: scale(1.4);
}

/* ── Footer ticker ───────────────────────────────── */
.eci-wb-footer {
    height: var(--footer-h);
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--wb-ticker-bg);
}

#eci-wb-ticker {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--wb-ticker-text);
    padding-left: 100%;
    animation: ticker 35s linear infinite;
}

@keyframes ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

/* ── Error ───────────────────────────────────────── */
.eci-wallboard-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    gap: 12px;
    color: #111827;
}

/* ── Pagination dots ─────────────────────────────────────── */
.eci-wb-page-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 6px 0 10px;
    flex-shrink: 0;
}

.eci-page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wb-card-border, #e5e7eb);
    transition: background 0.3s, transform 0.3s;
    display: inline-block;
}

.eci-page-dot.active {
    background: var(--eci-brand, #4F46E5);
    transform: scale(1.35);
}

/* ── Photo avatar on wallboard ───────────────────────── */
.eci-wb-avatar.eci-wb-avatar-photo {
    overflow: hidden;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    font-size: 0;
}

.eci-wb-avatar.eci-wb-avatar-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* preserve logo proportions */
    border-radius: 50%;
    display: block;
    padding: 6px; /* small breathing room for logos */
}

/* ══════════════════════════════════════════════════
   V1.1 — Smart Networking Splash
   ══════════════════════════════════════════════════ */

.eci-wb-networking {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    z-index: 200;
    animation: netFadeIn 0.5s ease-out;
}

@keyframes netFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.eci-wb-networking-inner {
    background: var(--wb-card-bg);
    border: 3px solid var(--eci-brand);
    border-radius: 28px;
    padding: 48px 60px;
    text-align: center;
    box-shadow: 0 40px 120px rgba(0,0,0,0.3);
    max-width: 800px;
    width: 90%;
}

.eci-net-tag {
    display: inline-block;
    background: var(--eci-brand);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 24px;
    border-radius: 99px;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
}

.eci-net-subtitle {
    font-size: 18px;
    color: var(--wb-venue-text);
    margin: 0 0 32px;
    font-weight: 400;
}

/* The two-person row */
.eci-net-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.eci-net-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.eci-net-connector {
    font-size: 36px;
    color: var(--eci-brand);
    flex-shrink: 0;
    font-weight: 300;
}

/* Avatar in networking card */
.eci-net-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.eci-net-avatar.eci-net-avatar-photo {
    background: #fff;
    overflow: hidden;
    font-size: 0;
}

.eci-net-avatar.eci-net-avatar-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    padding: 4px;
}

.eci-net-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--wb-card-text);
    line-height: 1.2;
}

.eci-net-role {
    font-size: 14px;
    color: var(--wb-card-role);
    font-weight: 500;
}

.eci-net-co {
    font-size: 13px;
    color: var(--wb-card-company);
    font-style: italic;
}
