
#lm-live {
    --lm-bg: #10151e;
    --lm-panel: #19212d;
    --lm-border: #ffffff12;
    --lm-mint: #68dfc5;
    --lm-text: #e9edf5;
    --lm-muted: #8d9caf;

    background: var(--lm-bg);
    color: var(--lm-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
    width: 100%;
    font-size: 14px;
    line-height: 1.5;
}

#lm-live * {
    box-sizing: border-box;
}

#lm-live button,
#lm-live input {
    font-family: inherit;
}

/* TOP NAVIGATION */

#lm-live .lm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--lm-border);
}

#lm-live .lm-brand {
    font-size: 24px;
    font-weight: 750;
    letter-spacing: -1px;
    line-height: 1.2;
}

#lm-live .lm-brand span {
    color: var(--lm-mint);
}

#lm-live .lm-brand small {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 500;
    color: var(--lm-muted);
    margin-top: 5px;
}

#lm-live .lm-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--lm-muted);
    font-size: 12px;
}

#lm-live .lm-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lm-muted);
}

#lm-live .lm-status.is-live {
    color: #ff8585;
}

#lm-live .lm-status.is-live .lm-live-dot {
    background: #ff6565;
    box-shadow: 0 0 12px #ff656566;
}

#lm-live .lm-attendee-count {
    font-size: 12px;
    color: var(--lm-muted);
}

/* MAIN CLASSROOM */

#lm-live .lm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    padding: 20px;
    max-width: 1800px;
    margin: auto;
}

#lm-live .lm-stage {
    min-width: 0;
}

#lm-live .lm-presentation {
    aspect-ratio: 16 / 9;
    background: #f4f7f5;
    color: #173b39;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#lm-live .lm-placeholder {
    width: 100%;
    padding: 8%;
}

#lm-live .lm-eyebrow {
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 600;
    color: #248f7a;
}

#lm-live .lm-placeholder h1 {
    font-size: clamp(28px, 4.5vw, 64px);
    font-weight: 750;
    letter-spacing: -2px;
    line-height: 1.08;
    margin: 20px 0;
    color: #173b39;
}

#lm-live .lm-placeholder h1 span {
    color: #269c83;
}

#lm-live .lm-placeholder p {
    font-size: 14px;
    color: #68847e;
}

/* CLASSROOM CONTROLS */

#lm-live .lm-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 0;
}

#lm-live .lm-controls button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 76px;
    padding: 12px 14px;
    background: #242e3c;
    border: 1px solid var(--lm-border);
    border-radius: 10px;
    color: var(--lm-text);
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#lm-live .lm-controls button:hover:not(:disabled) {
    background: #344356;
}

#lm-live .lm-controls button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#lm-live .lm-controls button.is-active {
    background: #255a50;
    color: var(--lm-mint);
}

#lm-live .lm-controls svg {
    width: 21px;
    height: 21px;
}

#lm-live .lm-controls .lm-leave {
    background: #8b303b;
    color: #ffffff;
}

#lm-live .lm-webinar-details {
    padding: 12px 4px;
}

#lm-live .lm-webinar-details h2 {
    font-size: 21px;
    color: var(--lm-text);
    font-weight: 650;
    margin: 0 0 6px;
}

#lm-live .lm-webinar-details p {
    font-size: 12px;
    color: var(--lm-muted);
    margin: 0;
}

/* PRESENTER VIDEO */

#lm-live .lm-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

#lm-live .lm-presenter {
    background: var(--lm-panel);
    border: 1px solid var(--lm-border);
    border-radius: 12px;
    overflow: hidden;
}

#lm-live .lm-presenter-video {
    aspect-ratio: 16 / 9;
    background: #25323f;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#lm-live .lm-presenter-placeholder {
    text-align: center;
    color: var(--lm-muted);
    font-size: 12px;
}

#lm-live .lm-presenter-placeholder svg {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
}

#lm-live .lm-presenter-video video,
#lm-live .lm-presentation video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#lm-live .lm-presenter-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    font-size: 12px;
}

#lm-live .lm-presenter-badge {
    color: var(--lm-mint);
    background: #24443f;
    border-radius: 5px;
    font-size: 9px;
    letter-spacing: 1px;
    padding: 4px 8px;
}

/* LIVE CHAT */

#lm-live .lm-chat-panel {
    background: var(--lm-panel);
    border: 1px solid var(--lm-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 340px;
}

#lm-live .lm-tabs {
    display: flex;
    border-bottom: 1px solid var(--lm-border);
}

#lm-live .lm-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 15px;
    color: var(--lm-muted);
    font-size: 13px;
    cursor: pointer;
}

#lm-live .lm-tab.active {
    color: var(--lm-mint);
    border-bottom: 2px solid var(--lm-mint);
}

#lm-live .lm-messages {
    flex: 1;
    min-height: 220px;
    max-height: 420px;
    overflow-y: auto;
    padding: 16px;
}

#lm-live .lm-system-message {
    background: #23332f;
    border: 1px solid #345047;
    color: #a4cfc3;
    border-radius: 8px;
    padding: 14px;
    font-size: 12px;
    line-height: 1.6;
}

#lm-live .lm-chat-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin: 0;
    border-top: 1px solid var(--lm-border);
}

#lm-live .lm-chat-form input {
    flex: 1;
    width: 100%;
    min-width: 0;
    background: #111925;
    border: 1px solid #ffffff20;
    border-radius: 8px;
    padding: 12px;
    color: var(--lm-text);
    font-size: 12px;
    outline: none;
    margin: 0;
}

#lm-live .lm-chat-form input:focus {
    border-color: var(--lm-mint);
}

#lm-live .lm-chat-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #269c83;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
}

#lm-live .lm-chat-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#lm-live .lm-chat-form svg {
    width: 18px;
    height: 18px;
}

/* MOBILE RESPONSIVENESS */

@media (max-width: 900px) {
    #lm-live .lm-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 12px;
        padding: 12px;
    }
}

@media (max-width: 700px) {
    #lm-live .lm-layout {
        grid-template-columns: 1fr;
    }

    #lm-live .lm-topbar {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    #lm-live .lm-brand {
        font-size: 20px;
    }

    #lm-live .lm-controls {
        gap: 6px;
    }

    #lm-live .lm-controls button {
        min-width: 65px;
        padding: 10px;
        font-size: 10px;
    }

    #lm-live .lm-presenter {
        width: 100%;
        max-width: 320px;
    }

    #lm-live .lm-chat-panel {
        min-height: 300px;
    }

    #lm-live .lm-placeholder h1 {
        letter-spacing: -1px;
    }
}

/* Hide main navigation on webinar pages only */

body:has(#lm-live) #lm-header {
    display: none !important;
}

body:has(#lm-live) {
    background: #10151e !important;
    margin: 0 !important;
    padding-top: 0 !important;
}

/* FULL-SCREEN WEBINAR EXPERIENCE */

body:has(#lm-live),
html:has(#lm-live) {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    height: 100% !important;
}

/* Hide website navigation and footer */

body:has(#lm-live) #lm-header,
body:has(#lm-live) footer,
body:has(#lm-live) #lm-footer,
body:has(#lm-live) .elementor-location-footer {
    display: none !important;
}

/* Break out of WordPress and Elementor margins */

#lm-live {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Keep the top bar stationary */

#lm-live .lm-topbar {
    flex-shrink: 0;
}

/* Fill all remaining screen space */

#lm-live .lm-layout {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px;
    grid-template-columns: minmax(0, 1fr) 340px;
    overflow: hidden;
}

/* Presentation area */

#lm-live .lm-stage {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#lm-live .lm-presentation {
    flex: 1;
    min-height: 0;
    width: 100%;
    aspect-ratio: auto;
}

#lm-live .lm-controls,
#lm-live .lm-webinar-details {
    flex-shrink: 0;
}

/* Fixed presenter and chat sidebar */

#lm-live .lm-sidebar {
    min-height: 0;
    overflow: hidden;
}

#lm-live .lm-presenter {
    flex-shrink: 0;
}

#lm-live .lm-chat-panel {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#lm-live .lm-tabs,
#lm-live .lm-chat-form {
    flex-shrink: 0;
}

/* Only chat messages can scroll */

#lm-live .lm-messages {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #405364 transparent;
}

/* Mobile classroom layout */

@media (max-width: 700px) {
    #lm-live .lm-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    #lm-live .lm-presenter {
        max-width: 120px;
    }

    #lm-live .lm-controls {
        padding: 8px 0;
    }

    #lm-live .lm-controls button {
        min-width: 0;
        padding: 7px;
        flex: 1;
    }

    #lm-live .lm-webinar-details {
        display: none;
    }

    #lm-live .lm-sidebar {
        gap: 8px;
    }
}

/* Preserve widescreen presentation proportions */

#lm-live .lm-stage {
    container-type: size;
    align-items: center;
    justify-content: center;
}

#lm-live .lm-presentation {
    flex: 0 0 auto;
    width: min(100%, calc(max(0px, 100cqh - 150px) * 16 / 9));
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    margin: 0 auto;
}

#lm-live .lm-controls,
#lm-live .lm-webinar-details {
    width: 100%;
}

#lm-live .lm-presentation video {
    object-fit: contain;
    background: #000;
}

@media (max-width: 700px) {
    #lm-live .lm-presentation {
        width: min(100%, calc(max(0px, 100cqh - 65px) * 16 / 9));
    }
}

/* WEBINAR JOINING SCREEN */

#lm-live .lm-join-screen {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: #10151e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px;
    overflow-y: auto;
}

#lm-live .lm-join-screen[hidden] {
    display: none !important;
}

#lm-live .lm-join-brand {
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -1.5px;
    text-align: center;
}

#lm-live .lm-join-brand span {
    color: #68dfc5;
}

#lm-live .lm-join-brand small {
    display: block;
    color: #8d9caf;
    font-size: 10px;
    letter-spacing: 3px;
}

#lm-live .lm-join-card {
    width: 100%;
    max-width: 400px;
    background: #19212d;
    border: 1px solid #344356;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 20px 60px #0003;
}

#lm-live .lm-join-card h2 {
    font-size: 26px;
    color: #e9edf5;
    text-align: center;
    margin: 0 0 6px;
}

#lm-live .lm-join-card p {
    color: #8d9caf;
    font-size: 13px;
    margin: 0;
    text-align: center;
}

#lm-live .lm-join-webinar {
    padding: 16px;
    background: #111925;
    border-radius: 10px;
    margin: 24px 0;
}

#lm-live .lm-join-webinar small {
    color: #68dfc5;
    font-size: 10px;
    letter-spacing: 1.5px;
}

#lm-live .lm-join-webinar h3 {
    color: #e9edf5;
    font-size: 16px;
    margin: 6px 0;
}

#lm-live .lm-join-webinar p {
    text-align: left;
}

#lm-live #lm-join-form label {
    display: block;
    color: #e9edf5;
    font-size: 13px;
    margin-bottom: 8px;
}

#lm-live #lm-display-name {
    width: 100%;
    background: #111925;
    border: 1px solid #344356;
    border-radius: 9px;
    color: #e9edf5;
    padding: 13px;
    font-size: 14px;
    margin-bottom: 8px;
    outline: none;
}

#lm-live #lm-display-name:focus {
    border-color: #68dfc5;
}

#lm-live #lm-join-form small {
    color: #8d9caf;
    font-size: 11px;
}

#lm-live .lm-join-notice {
    color: #8d9caf;
    font-size: 12px;
    margin: 20px 0;
}

#lm-live #lm-join-form button {
    width: 100%;
    background: #269c83;
    color: #ffffff;
    border: none;
    border-radius: 9px;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#lm-live #lm-join-form button:hover {
    background: #218873;
}

#lm-live .lm-join-footer,
#lm-live .lm-join-tagline {
    color: #8d9caf;
    font-size: 11px;
    text-align: center;
}

#lm-live .lm-join-footer {
    margin-top: 16px;
}

@media (max-height: 650px) {
    #lm-live .lm-join-screen {
        justify-content: flex-start;
    }
}
