/* =============================================
   MyEvent360 - WebApp Partecipanti (Mobile-first)
   ============================================= */

:root {
    --wa-bg: #111315;
    --wa-card: #1a1d21;
    --wa-border: rgba(255, 255, 255, 0.06);
    --wa-accent: #4A9EFF;
    --wa-text: #E8EAF6;
    --wa-muted: #78909C;
    --wa-success: #00E676;
    --wa-radius: 6px;
}

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

/* === Scrollbar in tema (applicata globalmente alla webapp) === */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) var(--wa-bg);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--wa-bg); border-radius: 5px; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2a2d32, #1e2024);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--wa-accent), #2d7dd2);
}
::-webkit-scrollbar-corner { background: var(--wa-bg); }

/* === Page Loader === */
.wa-loader {
    position: fixed;
    inset: 0;
    background: var(--wa-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.wa-loader.wa-loader-below-header {
    position: relative;
    inset: auto;
    min-height: 50vh;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
    background: transparent;
}

.wa-loader-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wa-loader-out {
    opacity: 0;
    pointer-events: none;
}

.wa-loader-below-header.wa-loader-out {
    display: none;
}

/* Navigation transition — sfondo + spinner statico al click */
.wa-nav-loader {
    position: fixed;
    inset: 0;
    background: var(--wa-bg);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-nav-loader.active {
    opacity: 1;
    pointer-events: auto;
}

.wa-nav-loader .wa-loader-spinner {
    opacity: 0.6;
}

.wa-loader-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid transparent;
    background: none;
    animation: loaderSpin 0.8s linear infinite;
    position: relative;
}

.wa-loader-spinner::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #e84393;
    border-right-color: #0d6efd;
    animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}

/* === Content fade in === */
.wa-app-content {
    opacity: 0;
    transition: opacity 0.4s ease 0.1s;
    /* 72px = altezza footer + safe area home indicator iPhone PWA */
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0));
}

.wa-app-content.wa-content-visible {
    opacity: 1;
}

/* SPA loader (centrato nella viewport) */
.wa-spa-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px; /* sopra il footer */
    z-index: 50;
    pointer-events: none;
}

.wa-spa-loader.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.webapp {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--wa-bg);
    color: var(--wa-text);
    min-height: 100vh;
    line-height: 1.5;
}

/* Aurora background — glow rosa e blu come SIES */
body.webapp::before,
body.webapp::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

body.webapp::before {
    width: 350px;
    height: 350px;
    top: -80px;
    left: -80px;
    background: rgba(232, 67, 147, 0.25);
    filter: blur(80px);
}

body.webapp::after {
    width: 400px;
    height: 400px;
    bottom: 60px;
    right: -100px;
    background: rgba(13, 110, 253, 0.22);
    filter: blur(80px);
}

/* === Enter page === */
.wa-enter {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.wa-enter-card {
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.wa-enter-card h1 {
    color: var(--wa-accent);
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.wa-enter-card .wa-subtitle {
    color: var(--wa-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.wa-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--wa-bg);
    border: 1px solid var(--wa-border);
    border-radius: 8px;
    color: var(--wa-text);
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.wa-input:focus {
    outline: none;
    border-color: var(--wa-accent);
    box-shadow: 0 0 0 3px rgba(78, 204, 163, 0.15);
}

.wa-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--wa-accent);
    color: #0f0f1a;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.wa-btn:hover { background: #3db892; }

.wa-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* === Header === */
.wa-header {
    background: var(--wa-card);
    border-bottom: 1px solid var(--wa-border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.wa-header-title {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.wa-header-back {
    color: var(--wa-accent);
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 12px;
    white-space: nowrap;
}

/* === Home event === */
.wa-hero {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0d0f11;
    /* Safe area iOS (notch) - funziona solo se viewport-fit=cover in meta */
    padding-top: env(safe-area-inset-top, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

.wa-hero > img {
    display: block;
    width: 100%;
    height: auto;
}

.wa-hero-placeholder {
    padding: calc(30px + env(safe-area-inset-top, 0)) calc(20px + env(safe-area-inset-right, 0)) 30px calc(20px + env(safe-area-inset-left, 0));
    background: #0d0f11;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.wa-hero-placeholder h1 {
    font-size: 1.2rem;
    color: var(--wa-accent);
}

.wa-header-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 67, 147, 0.3), rgba(13, 110, 253, 0.3), transparent);
}

/* === Section title (SIES style with gradient bar) === */
.wa-section-title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-section-title::before {
    content: '';
    width: 3px;
    height: 1.1em;
    border-radius: 2px;
    background: linear-gradient(180deg, #0d6efd, #e84393);
    flex-shrink: 0;
}

/* === Home Grid (SIES style: 3 columns, gradient icons) === */
.wa-home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 12px;
}

.wa-home-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
}

.wa-home-grid-item:hover {
    color: #fff;
    text-decoration: none;
    transform: scale(1.05);
}

.wa-home-grid-item:active {
    transform: scale(0.92);
}

.wa-home-grid-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wa-home-grid-icon svg,
.wa-home-grid-icon .icon {
    stroke: #fff;
    width: 28px;
    height: 28px;
}

/* Glass shine overlay */
.wa-home-grid-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 17px 17px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.wa-home-grid-item:hover .wa-home-grid-icon {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(255, 255, 255, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.wa-home-grid-item span {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* === Content pages === */
.wa-content {
    padding: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.wa-page-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--wa-accent);
}

/* Quando il titolo e' dentro una row, la linea va sulla row */
.wa-page-title-row .wa-page-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* === Program === */
/* Title row with search icon */
.wa-page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.wa-page-title-row {
    padding-bottom: 8px;
    border-bottom: 2px solid var(--wa-accent);
}

.wa-search-toggle {
    background: transparent;
    border: 1px solid var(--wa-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wa-muted);
    transition: all 0.2s;
}

.wa-search-toggle:hover {
    border-color: var(--wa-accent);
    color: var(--wa-accent);
}

/* Search bar */
.wa-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wa-search-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: 8px;
    color: var(--wa-text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.wa-search-input:focus {
    border-color: var(--wa-accent);
}

.wa-search-input::placeholder {
    color: var(--wa-muted);
}

.wa-search-close {
    background: transparent;
    border: 1px solid var(--wa-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wa-muted);
    flex-shrink: 0;
    transition: all 0.2s;
}

.wa-search-close:hover {
    border-color: var(--danger, #FF5252);
    color: var(--danger, #FF5252);
}

.wa-day-header {
    background: var(--wa-accent);
    color: #151515;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    margin: 20px 0 12px;
}

.wa-day-header:first-child { margin-top: 0; }

.wa-session {
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    margin-bottom: 12px;
    overflow: hidden;
}

/* Day filter (SIES style: card tabs) */
.wa-day-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
}

/* Da 4+ tab in poi: allinea a sinistra e scrolla */
.wa-day-filter:has(.wa-day-badge:nth-child(4)) {
    justify-content: flex-start;
}

/* Day tabs (SIES style: card with two lines) */
.wa-day-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--wa-border);
    border-radius: 12px;
    color: var(--wa-muted);
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    min-width: 90px;
}

.wa-day-badge .day-short {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.wa-day-badge .day-full {
    font-size: 0.7rem;
    font-weight: 400;
    margin-top: 2px;
}

.wa-day-badge:hover {
    border-color: var(--wa-text);
    color: var(--wa-text);
}

.wa-day-badge.active {
    background: var(--wa-card);
    border-color: var(--wa-accent);
    color: var(--wa-text);
}

.wa-day-badge.active .day-short {
    color: var(--wa-accent);
}

/* Room filter pills */
.wa-room-filter {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.wa-room-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: 20px;
    color: var(--wa-text);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.wa-room-pill:hover {
    border-color: var(--room-color, var(--wa-accent));
    color: var(--room-color, var(--wa-accent));
}

.wa-room-pill.active {
    background: var(--room-color, var(--wa-accent));
    border-color: var(--room-color, var(--wa-accent));
    color: #151515;
    font-weight: 600;
}

.wa-room-pill.active .wa-room-dot {
    background: #151515 !important;
}

.wa-room-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* === Session Card (collapsible, SIES style) === */
.wa-session-card {
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-left: 3px solid var(--session-color, var(--wa-accent));
    border-radius: var(--wa-radius);
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.2s;
}

/* Session topbar: badge sala + orario + chevron */
.wa-session-card-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.wa-session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 14px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.wa-session-card-header:hover {
    background: rgba(255,255,255,0.03);
}

.wa-session-card-left {
    flex: 1;
    min-width: 0;
}

.wa-session-card-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--wa-muted);
}

.wa-session-card-time svg {
    stroke: var(--wa-muted);
    flex-shrink: 0;
}

.wa-session-card-chairmen {
    font-size: 0.78rem;
    color: var(--wa-muted);
    margin-top: 4px;
    font-style: italic;
}

.wa-session-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--wa-text);
    line-height: 1.3;
}

.wa-session-card-subtitle {
    font-size: 0.8rem;
    color: var(--wa-muted);
    margin-top: 2px;
}

.wa-session-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-left: 12px;
    flex-shrink: 0;
}

.wa-session-room-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 4px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wa-session-chevron {
    font-size: 0.9rem;
    color: var(--wa-muted);
    transition: transform 0.3s;
    line-height: 1;
}

.wa-session-chevron.open {
    transform: rotate(180deg);
}

/* Session body (talks) */
.wa-session-card-body {
    border-top: 1px solid var(--wa-border);
    padding: 0;
}

.wa-session-chairmen {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--wa-muted);
    font-style: italic;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--wa-border);
}

.wa-session-chairmen svg {
    width: 14px;
    height: 14px;
    stroke: var(--wa-muted);
    flex-shrink: 0;
}

.wa-talk-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    gap: 12px;
    transition: background 0.15s;
}

.wa-talk-row:last-child {
    border-bottom: none;
}

.wa-talk-row:hover {
    background: rgba(255,255,255,0.02);
}

.wa-talk-content {
    flex: 1;
    min-width: 0;
}

.wa-talk-speaker {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wa-text);
}

.wa-talk-title {
    font-size: 0.8rem;
    color: var(--wa-muted);
    margin-top: 2px;
    line-height: 1.3;
}

.wa-talk-duration {
    font-size: 0.75rem;
    color: var(--wa-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Old session styles (kept for other pages) === */
.wa-session-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--wa-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(74, 158, 255, 0.06);
}

.wa-session-time {
    color: var(--wa-accent);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.wa-session-room {
    color: var(--wa-muted);
    font-size: 0.75rem;
    background: rgba(74, 158, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.wa-session-title {
    padding: 10px 16px 4px;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(74, 158, 255, 0.06);
}

.wa-session-subtitle,
.wa-session-moderators {
    background: rgba(74, 158, 255, 0.06);
}

.wa-session-subtitle {
    padding: 0 16px 8px;
    color: var(--wa-muted);
    font-size: 0.85rem;
}

.wa-session-moderators {
    padding: 0 16px 8px;
    font-size: 0.8rem;
    color: var(--wa-muted);
    font-style: italic;
}

.wa-speaker {
    padding: 8px 16px;
    background: var(--wa-bg);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wa-speaker-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.wa-speaker-talk {
    font-size: 0.8rem;
    color: var(--wa-muted);
    margin-top: 2px;
}

.wa-speaker-duration {
    color: var(--wa-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

/* === Embed (streaming/qa/translation) === */
.wa-embed {
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    overflow: hidden;
}

.wa-embed iframe {
    width: 100%;
    min-height: 400px;
    border: none;
}

.wa-embed-link {
    display: block;
    text-align: center;
    padding: 40px 20px;
}

.wa-embed-link a {
    display: inline-block;
    padding: 14px 32px;
    background: var(--wa-accent);
    color: #151515;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
}

/* === Room cards (per sala) === */
.wa-room-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wa-room-card {
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    overflow: hidden;
}

.wa-room-card-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(74, 158, 255, 0.08);
}

/* Room selection cards (streaming/interaction/translation) */
.wa-room-select-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wa-room-select-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--wa-card);
    border-radius: 12px;
    text-decoration: none;
    color: var(--wa-text);
    transition: all 0.2s;
    position: relative;
}

/* Bordo gradient arrotondato (pseudo-elemento) */
.wa-room-select-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e84393, #0d6efd);
    z-index: -1;
}

.wa-room-select-card:hover {
    box-shadow: 0 0 16px rgba(232, 67, 147, 0.2);
}

.wa-room-select-card:active {
    transform: scale(0.98);
}

.wa-room-select-name {
    font-size: 1rem;
    font-weight: 600;
}

.wa-room-select-action {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e84393;
    white-space: nowrap;
}

/* === Room dedicated page === */
.wa-room-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px); /* viewport meno footer */
}
.wa-room-page-interaction {
    background: #1f1f1f;
}

.wa-room-name-badge {
    margin: 16px 16px 12px;
    padding: 14px;
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--wa-accent);
    background: rgba(74, 158, 255, 0.08);
    border: 1px solid var(--wa-accent);
    border-radius: var(--wa-radius);
    flex-shrink: 0;
}

.wa-room-page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wa-fullframe {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wa-fullframe iframe {
    display: block;
    width: 100%;
    flex: 1;
    min-height: 300px;
    border: none;
    background: transparent;
}

/* === Poster fullscreen iframe === */
.wa-content-poster {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px - 72px); /* viewport - header - footer */
    max-width: 100%;
    padding: 16px 16px 0 16px;
    box-sizing: border-box;
}
.wa-content-poster .wa-fullframe {
    flex: 1;
    min-height: 0;
}
.wa-content-poster .wa-fullframe iframe {
    min-height: 0;
    height: 100%;
    background: transparent;
}

/* === Room selector (badge buttons) === */
.wa-room-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.wa-room-badge {
    padding: 8px 18px;
    background: transparent;
    border: 2px solid var(--wa-border);
    border-radius: 20px;
    color: var(--wa-text);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-room-badge:hover {
    border-color: var(--wa-accent);
    color: var(--wa-accent);
}

.wa-room-badge.active {
    border-color: var(--wa-accent);
    background: rgba(74, 158, 255, 0.15);
    color: var(--wa-accent);
    font-weight: 600;
}

/* Room content (show/hide) */
.wa-room-content {
    display: none;
}

.wa-room-content.active {
    display: block;
}

/* Embed frame (iframe full width inside app) */
.wa-embed-frame {
    width: 100%;
    border-radius: var(--wa-radius);
    overflow: hidden;
    background: transparent;
}

.wa-embed-frame iframe {
    display: block;
    width: 100%;
    height: 56.25vw; /* 16:9 aspect ratio */
    max-height: 500px;
    min-height: 250px;
    border: none;
    border-bottom: 1px solid var(--wa-border);
}

/* === Not configured === */
.wa-not-configured {
    text-align: center;
    padding: 60px 20px;
    color: var(--wa-muted);
}

.wa-not-configured p { font-size: 1rem; }


/* === Bottom Navigation (SIES style) === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    /* Padding combinato: base 4px + safe area home indicator iPhone */
    padding: 4px calc(4px + env(safe-area-inset-right, 0)) calc(4px + env(safe-area-inset-bottom, 0)) calc(4px + env(safe-area-inset-left, 0));
    z-index: 1000;
}

.bottom-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    flex: 1;
    padding: 6px 0 4px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    display: block;
    /* Evita micro-misallineamenti dovuti a viewBox asimmetrici delle icone */
    flex-shrink: 0;
    margin: 0 auto;
}

/* Icone outline (stroke) */
.bottom-nav-item svg:not([fill="currentColor"]) {
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Icone filled (come Altro) */
.bottom-nav-item svg[fill="currentColor"] {
    fill: currentColor;
    stroke: none;
}

.bottom-nav-item.active svg {
    stroke: #e84393;
    color: #e84393;
}

.bottom-nav-item.active > span {
    background: linear-gradient(135deg, #e84393, #0d6efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Home attivo: icona resta bianca (su gradient bg) */
.bottom-nav-home.active .bottom-nav-home-btn svg {
    stroke: #fff;
}


.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, #e84393, #0d6efd);
    box-shadow: 0 0 8px rgba(232, 67, 147, 0.4);
}

.bottom-nav-item:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

/* Home button — raised center */
.bottom-nav-home {
    position: relative;
    margin-top: -20px;
}

.bottom-nav-home.active::after {
    display: none;
}

.bottom-nav-home-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e84393, #0d6efd);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(232, 67, 147, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bottom-nav-home-btn svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
}

.bottom-nav-home:hover .bottom-nav-home-btn {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(232, 67, 147, 0.45);
}

.bottom-nav-home.active .bottom-nav-home-btn {
    animation: homeGlow 3s ease-in-out infinite;
}

@keyframes homeGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(232, 67, 147, 0.3); }
    50% { box-shadow: 0 4px 28px rgba(232, 67, 147, 0.5), 0 0 12px rgba(13, 110, 253, 0.25); }
}

.bottom-nav-home span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.45);
}

.bottom-nav-home.active span {
    color: #e84393;
}

/* === App Drawer (menu Altro, SIES style) === */
.app-drawer {
    position: fixed;
    inset: 0;
    background: rgba(11, 13, 15, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.app-drawer.open {
    opacity: 1;
    visibility: visible;
}

.app-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0));
}

.app-drawer-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

.app-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.app-drawer-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.app-drawer-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content;
    gap: 24px 16px;
    padding: 20px 32px;
    align-content: start;
}

.app-drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
}

.app-drawer-item:hover {
    color: #fff;
    text-decoration: none;
    transform: scale(1.05);
}

.app-drawer-item:active {
    transform: scale(0.92);
}

.app-drawer-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.app-drawer-icon svg,
.app-drawer-icon .icon {
    stroke: #fff;
    width: 26px;
    height: 26px;
}

.app-drawer-item span {
    font-size: 0.72rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* === TIMETABLE (CSS Grid, SIES style) === */

/* Scroll wrapper */
.tt-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
    margin-left: -16px;  /* ancora a sinistra senza margine */
    margin-right: -16px; /* estendi fino al bordo destro */
}

/* Room legend (sticky header) */
.tt-room-legend {
    display: grid;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--wa-bg);
    padding-bottom: 6px;
    gap: 0 4px;
    min-width: fit-content;
}

.tt-corner {
    width: 34px;
    min-width: 34px;
    position: sticky;
    left: 0;
    z-index: 11;
    background: var(--wa-bg);
}

.tt-room-label {
    padding: 6px 4px;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--room-color, #6c757d);
    border-radius: 8px;
    word-break: break-word;
    line-height: 1.2;
    overflow: hidden;
}

/* Main grid */
.tt-grid {
    display: grid;
    position: relative;
    gap: 0 4px;
    min-width: fit-content;
}

/* Time labels — sticky left */
.tt-time-label {
    font-size: 0.58rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: flex-start;
    padding-right: 4px;
    text-align: right;
    justify-content: flex-end;
    white-space: nowrap;
    position: sticky;
    left: 0;
    z-index: 5;
    background: var(--wa-bg);
}

/* Gridlines */
.tt-gridline {
    border-top: 1px solid var(--wa-border);
    pointer-events: none;
    z-index: 0;
}

/* Session block */
.tt-block {
    background: color-mix(in srgb, var(--block-color) 18%, var(--wa-card));
    border: 1px solid color-mix(in srgb, var(--block-color) 30%, transparent);
    border-left: 3px solid var(--block-color);
    border-radius: 6px;
    padding: 4px 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 1px 0;
    z-index: 1;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.tt-block-clickable {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tt-block-clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.tt-block-clickable:active {
    transform: scale(0.98);
}

.tt-block-time {
    font-size: 0.58rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.tt-block-title {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tt-block-count {
    font-size: 0.56rem;
    font-weight: 700;
    color: var(--block-color);
    margin-top: auto;
}

/* Bottom sheet dettaglio */
.tt-detail-sheet {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: var(--wa-card);
    border-top: 1px solid var(--wa-border);
    border-radius: 16px 16px 0 0;
    padding: 16px;
    z-index: 150;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.tt-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.tt-detail-room {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--wa-accent);
}

.tt-detail-time {
    font-size: 0.8rem;
    color: var(--wa-muted);
    margin-top: 2px;
}

.tt-detail-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.tt-detail-count {
    font-size: 0.8rem;
    color: var(--wa-muted);
}

/* Talks list in bottom sheet (SIES style) */
.tt-detail-talks {
    max-height: 55vh;
    overflow-y: auto;
    margin-top: 8px;
    border-top: 1px solid var(--wa-border);
}

.tt-talk-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--wa-border);
}

.tt-talk-item:last-child {
    border-bottom: none;
}

.tt-talk-time {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--wa-accent);
    min-width: 36px;
    flex-shrink: 0;
    padding-top: 1px;
}

.tt-talk-content {
    flex: 1;
    min-width: 0;
}

.tt-talk-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.35;
    margin-bottom: 2px;
}

.tt-talk-speaker {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.tt-talk-dur {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
}

/* Responsive timetable */
@media (min-width: 768px) {
    .tt-block-title {
        font-size: 0.75rem;
        -webkit-line-clamp: 5;
    }
    .tt-room-label {
        font-size: 0.78rem;
        padding: 10px 8px;
    }
    .tt-grid {
        gap: 0 6px;
    }
}

/* === INFO & CONTATTI (SIES style) === */
.wa-info-card {
    background: var(--wa-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.wa-info-card-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--wa-border);
}

.wa-info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.wa-info-row + .wa-info-row { border-top: 1px solid var(--wa-border); }
.wa-info-row:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.9); text-decoration: none; }
.wa-info-row:active { background: rgba(255,255,255,0.08); }

.wa-info-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-info-text {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
}

.wa-info-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.wa-info-value {
    font-size: 0.9rem;
}

.wa-info-arrow {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    flex-shrink: 0;
}

/* Transport cards */
.wa-transport-card {
    background: var(--wa-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s;
}

.wa-transport-card:active { transform: scale(0.98); }

/* Info SVG icons */
.wa-info-svg { flex-shrink: 0; }

.wa-info-icon { display: flex; align-items: center; justify-content: center; width: 24px; flex-shrink: 0; }

/* Map card with proper border radius */
.wa-map-card {
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    line-height: 0;
}

.wa-map-card iframe { width: 100%; height: 250px; border: 0; display: block; }

.wa-transport-icon { margin-bottom: 6px; display: flex; align-items: center; justify-content: center; }
.wa-transport-title { font-size: 0.75rem; font-weight: 600; color: var(--wa-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.wa-transport-name { font-size: 0.85rem; font-weight: 600; margin-top: 4px; }
.wa-transport-detail { font-size: 0.75rem; color: var(--wa-muted); margin-top: 2px; }

/* === ROOM LIVE === */
.wa-live-room {
    background: var(--wa-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 3px solid var(--wa-border);
    transition: border-color 0.3s;
}

.wa-live-room.wa-live-active {
}

.wa-live-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wa-live-room-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.wa-live-status {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
}

.wa-live-status-active, .wa-live-status-break { background: #dc3545; color: #fff; animation: livePulse 2s infinite; }
.wa-live-status-idle { background: rgba(255,255,255,0.1); color: var(--wa-muted); }
.wa-live-status-ended { background: rgba(255,255,255,0.05); color: var(--wa-muted); }

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.wa-live-session { font-size: 0.85rem; font-weight: 600; margin-top: 4px; }
.wa-live-time { font-size: 0.75rem; color: var(--wa-muted); margin-top: 2px; }
.wa-live-speaker { font-weight: 600; font-size: 0.9rem; margin-top: 6px; }
.wa-live-speaker-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.wa-live-speaker-row .wa-live-speaker { margin-top: 0; }
.wa-live-photo { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--wa-card); }
.wa-live-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wa-live-talk { font-size: 0.8rem; color: var(--wa-muted); margin-top: 2px; }
.wa-live-next { font-size: 0.75rem; color: var(--wa-muted); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--wa-border); }

/* === SYNTHESIS LIST === */
.wa-synth-day { margin-bottom: 24px; }
.wa-synth-day-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wa-muted);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--wa-border);
    margin-bottom: 12px;
    text-transform: capitalize;
}

.wa-synth-room { margin-bottom: 16px; }
.wa-synth-room-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e84393;
    margin-bottom: 8px;
    padding-left: 2px;
}

.wa-synth-session {
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.wa-synth-session-header {
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--wa-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.wa-synth-session-time {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--wa-accent);
    font-weight: 600;
    flex-shrink: 0;
}
.wa-synth-session-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wa-text);
}

.wa-synth-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.wa-synth-item:last-child { border-bottom: none; }
.wa-synth-item:hover { background: rgba(255,255,255,0.04); }
.wa-synth-item-photo { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--wa-card); }
.wa-synth-item-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.wa-synth-item-info { flex: 1; min-width: 0; }
.wa-synth-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wa-text);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.wa-synth-item-speaker {
    font-size: 0.75rem;
    color: var(--wa-muted);
}
.wa-synth-item-arrow {
    flex-shrink: 0;
    color: var(--wa-muted);
}
.wa-synth-item-arrow .icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* === SYNTHESIS DETAIL === */
.wa-synth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wa-muted);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 6px 0;
    margin-bottom: 12px;
}
.wa-synth-back:hover { color: var(--wa-text); }
.wa-synth-back .icon { width: 16px; height: 16px; }

.wa-synth-detail-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--wa-border);
}
.wa-synth-detail-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wa-text);
    line-height: 1.4;
    margin-bottom: 6px;
}
.wa-synth-detail-speaker {
    font-size: 0.85rem;
    color: #e84393;
    font-weight: 600;
    margin-bottom: 10px;
}
.wa-synth-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 0.7rem;
    color: var(--wa-muted);
}
.wa-synth-detail-meta > div {
    display: flex;
    align-items: center;
    gap: 4px;
}
.wa-synth-detail-meta .icon {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.wa-synth-card {
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
}
.wa-synth-card-header {
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(232,67,147,0.08), rgba(13,110,253,0.08));
    border-bottom: 1px solid var(--wa-border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #e84393;
}
.wa-synth-card-header .icon { width: 14px; height: 14px; }
.wa-synth-card-body {
    padding: 14px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--wa-text);
    white-space: pre-wrap;
}

.wa-synth-details {
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
}
.wa-synth-details summary {
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wa-text);
    user-select: none;
}
.wa-synth-details summary::-webkit-details-marker { display: none; }
.wa-synth-details summary .icon { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.wa-synth-details[open] summary { border-bottom: 1px solid var(--wa-border); }

/* === TRANSLATION ROOM === */
.wa-translation-section {
    margin-bottom: 24px;
}

.wa-translation-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wa-muted);
    margin-bottom: 12px;
}

.wa-translation-audio-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s;
}
.wa-translation-audio-btn:hover { background: rgba(255,255,255,0.08); }
.wa-translation-audio-btn .icon { width: 22px; height: 22px; stroke: #0dcaf0; }

.wa-subtitle-lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.wa-subtitle-lang-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 8px;
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s, border-color 0.2s;
}
.wa-subtitle-lang-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.wa-subtitle-lang-flag {
    font-size: 1.8rem;
    line-height: 1;
}

.wa-subtitle-lang-label {
    font-size: 0.75rem;
    font-weight: 600;
}

.wa-subtitle-lang-code {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--wa-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* === SUBTITLES LIVE === */
.wa-subtitles-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, #e84393, #0d6efd);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    animation: livePulse 2s infinite;
}
.wa-subtitles-btn .icon { width: 14px; height: 14px; stroke: #fff; }

.wa-subtitles-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px - 72px);
    background: #0a0a0a;
}

.wa-subtitles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.wa-subtitles-room-name {
    font-weight: 700;
    font-size: 0.85rem;
}

.wa-subtitles-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-subtitles-lang-select {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.8rem;
}
.wa-subtitles-lang-select option {
    background: #1a1a1a;
    color: #fff;
}

.wa-subtitles-live-badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.wa-subtitles-live-active { background: #dc3545; color: #fff; animation: livePulse 2s infinite; }
.wa-subtitles-live-idle { background: rgba(255,255,255,0.1); color: var(--wa-muted); }

.wa-subtitles-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    min-height: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.wa-subtitles-container::-webkit-scrollbar { display: none; }

.wa-subtitles-waiting {
    color: var(--wa-muted);
    font-style: italic;
    font-size: 0.9rem;
    text-align: center;
    padding: 40px 0;
}

.wa-subtitle-line {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.wa-subtitle-final {
    color: rgba(255,255,255,0.92);
}

.wa-subtitles-partial {
    padding: 10px 20px 16px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.4);
    font-style: italic;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    min-height: 40px;
    display: none;
}

/* === SPONSOR === */
.wa-sponsor-tier { margin-bottom: 20px; }

.wa-sponsor-tier-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.wa-sponsor-grid {
    display: grid;
    gap: 10px;
}

.wa-sponsor-grid-diamond, .wa-sponsor-grid-platinum { grid-template-columns: 1fr; }
.wa-sponsor-grid-gold { grid-template-columns: repeat(2, 1fr); }
.wa-sponsor-grid-silver, .wa-sponsor-grid-bronze { grid-template-columns: repeat(3, 1fr); }

.wa-sponsor-logo {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.15s;
    min-height: 60px;
}

.wa-sponsor-logo:hover { transform: scale(1.03); }
.wa-sponsor-logo img { max-width: 100%; max-height: 50px; object-fit: contain; }
.wa-sponsor-logo span { font-size: 0.75rem; color: #333; font-weight: 600; text-align: center; }

.wa-exhibitor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wa-exhibitor-badge {
    padding: 4px 12px;
    background: var(--wa-card);
    border-radius: 16px;
    font-size: 0.75rem;
    color: var(--wa-text);
}

/* === SPEAKERS (SIES style) === */

/* Search bar */
.wa-speaker-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--wa-card);
    border: 1px solid var(--wa-border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.wa-speaker-search svg { stroke: var(--wa-muted); flex-shrink: 0; }

.wa-speaker-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--wa-text);
    font-size: 0.9rem;
    font-family: inherit;
}

.wa-speaker-search input::placeholder { color: var(--wa-muted); }

/* Letter navigation */
.wa-letter-nav {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.wa-letter-nav::-webkit-scrollbar { display: none; }

.wa-letter-item {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--wa-accent);
    text-decoration: none;
    transition: background 0.15s;
}

.wa-letter-item:hover { background: rgba(255,255,255,0.06); }
.wa-letter-item:active { background: var(--wa-accent); color: #fff; }

/* Speaker groups */
.wa-speaker-group { margin-bottom: 4px; }

.wa-speaker-letter {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 6px 0;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--wa-accent);
    background: var(--wa-bg);
    letter-spacing: 0.04em;
}

.wa-speaker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--wa-border);
}

.wa-speaker-item:last-child { border-bottom: none; }

.wa-speaker-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wa-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.3);
}

.wa-speaker-avatar svg { width: 16px; height: 16px; stroke: rgba(255,255,255,0.3); }

/* Foto relatore (quando abilitata dal portale e disponibile).
   Il contenitore base .wa-speaker-avatar e' flex (per centrare l'icona SVG):
   con un'immagine il flex non la fa espandere -> restava uno "spicchio" grigio.
   Qui forziamo il contenitore a block e l'immagine a riempire tutto il cerchio. */
.wa-speaker-avatar.wa-speaker-avatar-photo {
    display: block;
    padding: 0;
    overflow: hidden;
    position: relative;
    background: var(--wa-card);
}
.wa-speaker-avatar.wa-speaker-avatar-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wa-speaker-info {
    display: flex;
    gap: 5px;
    align-items: baseline;
    flex-wrap: wrap;
    min-width: 0;
}

.wa-speaker-surname {
    font-weight: 700;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
}

.wa-speaker-firstname {
    font-weight: 400;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
}

/* === Responsive === */
@media (max-width: 480px) {
    .wa-modules {
        grid-template-columns: 1fr;
    }
    .wa-hero > img {
        width: 100%;
        height: auto;
    }
    .wa-footer-btn {
        padding: 6px 8px;
        min-width: 44px;
    }
}

/* ============================================
   MODALE DETTAGLIO (trascrizione / sintesi)
   Overlay con header fisso + corpo scrollabile:
   il testo scrolla DENTRO il modale, la lista resta sotto.
   ============================================ */
.wa-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.wa-detail-modal.open {
    opacity: 1;
    pointer-events: auto;
}
.wa-detail-modal-card {
    position: relative;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: var(--wa-bg);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(24px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.wa-detail-modal.open .wa-detail-modal-card {
    transform: translateY(0);
}
@media (min-width: 720px) {
    .wa-detail-modal { align-items: center; }
    .wa-detail-modal-card { border-radius: 18px; max-height: 86vh; }
}
/* Header fisso: titolo + X sempre visibili */
.wa-detail-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--wa-border);
    background: var(--wa-card);
}
.wa-detail-modal-grip {
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.18);
}
.wa-detail-modal-title {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}
.wa-detail-modal-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s ease;
}
.wa-detail-modal-close:hover { background: rgba(255, 255, 255, 0.16); }
/* Corpo scrollabile: SOLO qui scrolla il contenuto */
.wa-detail-modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 4px 16px;
}
/* Dentro il modale, il back-link della pagina detail non serve (c'e' la X) */
.wa-detail-modal-body .wa-synth-back { display: none; }
/* Il contenuto interno non deve avere il padding-bottom del footer app */
.wa-detail-modal-body .wa-content { padding-bottom: 8px; min-height: 0; }
.wa-detail-modal-loader {
    padding: 40px;
    text-align: center;
    color: var(--wa-muted);
    font-size: 0.85rem;
}
