/* corner-banner.css */

/* Reset / base */
* {
    box-sizing: border-box;
}

/* ───────────────── SF Pro Rounded (fullpage ad buttons) ─────────────────── */
@font-face {
    font-family: "SF Pro Rounded";
    src: url("https://cdn.jsdelivr.net/npm/@fontpkg/sf-pro-rounded@21.0.0/SF-Pro-Rounded-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SF Pro Rounded";
    src: url("https://cdn.jsdelivr.net/npm/@fontpkg/sf-pro-rounded@21.0.0/SF-Pro-Rounded-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ───────────────── Full-Page Ad (all layout/styles from nomin.js) ─────────────────── */
.fullpage-ad {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    background-color: #000;
}

.fullpage-ad-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: brightness(0.9);
}

.fullpage-ad-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.35) 35%,
            rgba(0, 0, 0, 0.2) 60%,
            rgba(0, 0, 0, 0.15) 100%);
}

.fullpage-ad-content-shell {
    position: relative;
    z-index: 2;
    padding: 0 48px 56px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.fullpage-ad-buttons-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 32px;
}

/* Full-page ad buttons – exact frosted-glass pill styling (takes precedence) */
.fullpage-ad-pill-btn {
    transition: all 0.2s ease !important;
    border-radius: 999px !important;
    border: none !important;
    padding: 24px 40px !important;
    min-width: clamp(280px, 38vw, 480px) !important;
    min-height: clamp(64px, 8vh, 88px) !important;
    background: rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #FFFFFF !important;
    font-family: "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(1.35rem, 2.1vw, 1.9rem) !important;
    line-height: 1.3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.fullpage-ad-pill-btn:hover,
.fullpage-ad-pill-btn:focus {
    transform: scale(1.02) !important;
    background: rgba(255, 255, 255, 0.38) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    outline: 2px solid rgba(255, 255, 255, 0.6) !important;
    outline-offset: 2px !important;
}

.fullpage-ad-pill-btn:active {
    transform: scale(0.99) !important;
    background: rgba(255, 255, 255, 0.32) !important;
}

.fullpage-ad-gif-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Full-page ad – font on container and buttons */
.fullpage-ad,
.fullpage-ad .fullpage-ad-pill-btn,
.fullpage-ad .adBtn {
    font-family: "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.fullpage-ad video {
    display: block;
}

/* L-banner active: hide player control UI so it doesn't collide with the ad */
#player.l-banner-active .vjs-control-bar,
#player.l-banner-active .vjs-control-bar * {
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

#player.l-banner-active {
    pointer-events: none;
}

.l-banner-preview {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: grid;
    pointer-events: auto;
    z-index: 2147483647;

    /* Grid: left banner + video area, bottom banner */
    grid-template-columns: var(--l-left-width) 1fr;
    grid-template-rows: 1fr var(--l-bottom-height);
}

.l-banner-segment {
    position: relative;
    background: #1f2937;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Left segment */
.l-banner-segment.segment-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    background: #000;
}

.video-spacer {
    grid-row: 1;
    grid-column: 2;
}

/* Bottom segment */
.l-banner-segment.segment-2 {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    background: transparent;
}

.l-banner-video-slot {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    background: transparent;
}

.segment-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.segment-content {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.segment-content img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Match in-editor LBannerEditor preview: contain for segment 1, cover for segment 2 */
.segment-1 .segment-content img {
    object-fit: contain;
}

.segment-2 .segment-content img {
    object-fit: cover;
}

.segment-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
}

.segment-placeholder p {
    margin-top: 1rem;
    font-size: 14px;
}

.preview-poll-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    gap: 1.5rem;
    font-size: clamp(1rem, 2vw, 1.5rem);
    position: relative;
    z-index: 1;
}

.preview-poll-content {
    flex: 1;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-poll-question {
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.25;
    opacity: 0.95;
}

.preview-poll-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-poll-button {
    padding: clamp(0.75rem, 2vw, 1.25rem) clamp(1.25rem, 3vw, 2rem);
    font-size: clamp(1.1rem, 2.2vw, 1.75rem);
    font-weight: 600;
    border-radius: 12px;
    flex-shrink: 0;
    color: white;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: clamp(48px, 8vh, 72px);
}

.preview-poll-button-1 {
    background: rgba(14, 165, 233, 0.3);
    border: 1px solid #0ea5e9;
}

.preview-poll-button-2 {
    background: rgba(16, 185, 129, 0.3);
    border: 1px solid #10b981;
}

.preview-poll-button-3 {
    background: rgba(168, 85, 247, 0.3);
    border: 1px solid #a855f7;
}

.preview-poll-button-4 {
    background: rgba(236, 72, 153, 0.3);
    border: 1px solid #ec4899;
}

.l-banner-preview .modern-poll-container {
    background: none !important;
    border-radius: 0 !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden !important;
}

.l-banner-preview .corner-banner-kitchen-layout,
.l-banner-preview .poll-layout-wrapper,
.l-banner-preview .kitchen-content.kitchen-content-full-width {
    height: 100% !important;
    min-height: 100% !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}

.l-banner-preview .modern-poll-hero-image {
    height: 100% !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}

.l-banner-preview .modern-poll-hero-image-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0 !important;
}

.layer-indicator-label {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}


/* Main canvas (full video area) */
.corner-banner-canvas {
    width: 1280px;
    height: 720px;
    border-radius: 12px;
    background: transparent;
    position: absolute;
    inset: 0;
    overflow: visible;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    pointer-events: none;
    z-index: 1000;
}

/* Container wrapper */
.corner-banner-container {
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 20px;
    box-sizing: border-box;
}

/* Dynamic sizing + corner positioning */
.corner-banner-container-dynamic {
    width: 360px;
    min-height: 220px;
    height: auto;
    max-width: calc(100% - 40px);
    animation-duration: 0.5s;
    margin-top: 40px;
    margin-bottom: 32px;
    position: relative;
    overflow: visible;
}

.corner-banner-container-dynamic.top-corner {
    max-height: calc(100% - 40px - 32px);
}

.corner-banner-container-dynamic.bottom-corner {
    max-height: calc(100% - 40px);
}

/* Kitchen layout (flex column) */
.corner-banner-kitchen-layout {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Poll wrapper */
.poll-layout-wrapper {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    position: relative;
}

/* Content area */
.kitchen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: transparent;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
    z-index: 2;
}

.kitchen-content-full-width {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

/* Modern poll card */
.modern-poll-container {
    width: 360px;
    max-width: 360px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(139, 92, 246, 0.95) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 2;
    min-height: 220px;
}

/* Hero image */
.modern-poll-hero-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.modern-poll-hero-image-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Poll content (question + buttons) */
.modern-poll-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 1.25rem;
}

.thank-you-content {
    min-height: 180px;
    align-items: center;
    justify-content: center;
}

.modern-poll-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.modern-poll-subquestion {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Buttons */
.modern-poll-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.modern-poll-buttons.buttons-count-1 {
    justify-content: center;
}

.modern-poll-buttons.buttons-count-1 .modern-poll-button {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 300px;
    width: auto;
}

.modern-poll-buttons.buttons-count-2 {
    justify-content: center;
    flex-wrap: nowrap;
}

.modern-poll-buttons.buttons-count-2 .modern-poll-button {
    flex: 0 1 auto;
    min-width: 120px;
    max-width: calc(50% - 0.375rem);
}

/* Button styles */
.modern-poll-button {
    flex: 1;
    min-width: 120px;
    max-width: calc(50% - 0.375rem);
    padding: 0.875rem 1rem;
    border: 2px solid rgba(20, 184, 166, 0.8);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: rgba(31, 41, 55, 0.9);
    color: white;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modern-poll-button:hover {
    background: rgba(55, 65, 81, 0.95);
    border-color: #14b8a6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.modern-poll-button:active {
    transform: translateY(0);
}

/* QR view */
.qr-code-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
    padding: 1.25rem 1.5rem;
    background: #374151;
    border-radius: 12px;
    color: white;
    margin: 0;
}

.qr-code-view-full-width {
    background: transparent;
    padding: 0;
}

.qr-code-text {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: white;
    line-height: 1.3;
}

.qr-code-subtext {
    font-size: 0.9375rem;
    margin: 0;
    color: white;
    font-weight: 500;
}

.qr-code-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
}

.qr-code-branding {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    margin-top: 0.25rem;
}

.poll-button:focus,
.modern-poll-button:focus {
    outline: none;
    /* Remove default outline */
    border: 3px solid #32ffe8;
    /* Teal border for highlight */
    box-shadow: 0 0 8px rgba(50, 255, 232, 0.8);
    /* Glow */
    transform: scale(1.05);
    /* Slight zoom */
    transition: all 0.15s ease;
    /* Smooth */
}

/* L-Banner main layout */
.l-banner-layout {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 230px 1fr;
    grid-template-rows: 1fr 162px;
    background: #000;
    z-index: 20;
}

/* Left banner */
#l-banner-left {
    grid-row: 1 / span 2;
    grid-column: 1;
    overflow: hidden;
    background: #1f2937;
}

/* Video column */
#video-column {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-rows: 1fr 162px;
}

/* Actual video */
#video-column #player {
    grid-row: 1;
    overflow: hidden;
}

/* Bottom banner */
#l-banner-bottom {
    grid-row: 2;
    background: #1f2937;
}

/* L-banner QR sublayer: larger text, QR image, and branding (L-banner only) */
/* QR sublayer bg image: cover entire segment-2 with no gaps */
.l-banner-segment.segment-2 [data-sublayer-index]>img:first-of-type {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

.l-banner-segment.segment-2 .l-banner-qr-content {
    transform: translate(-50%, -50%) scale(0.92) !important;
}

.l-banner-segment.segment-2 .l-banner-qr-text {
    font-size: clamp(1.35rem, 3vw, 1.85rem) !important;
    line-height: 1.35;
    margin: 0 0 0.5em;
    font-weight: 600;
}

.l-banner-segment.segment-2 .l-banner-qr-image {
    width: clamp(95px, 14vw, 130px) !important;
    padding: 5px !important;
    display: block;
    margin: 0.4em auto;
}

.l-banner-segment.segment-2 .l-banner-qr-branding {
    font-size: clamp(1.05rem, 2.2vw, 1.35rem) !important;
    margin: 0.4em 0 0;
    opacity: 0.95;
}

.video-player-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Smooth resize */
.video-player-container,
#player {
    transition: width 300ms ease, height 300ms ease, margin 300ms ease;
}

/* When L-Banner is active */
.video-player-container.lbanner-active {
    margin-left: var(--lbanner-left-width);
    margin-bottom: var(--lbanner-bottom-height);
    width: calc(100% - var(--lbanner-left-width));
    height: calc(100% - var(--lbanner-bottom-height));
}

#player-shell.with-lbanner #player {
    inset: 0 230px 162px 0;
    /* left banner + bottom banner */
}

/* ───────────────── Lower-third ad unit only (separate from L-banner) ───────────────── */
@keyframes lower-third-right-image-sway {
    0% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(28px, -8px) scale(1.04);
    }

    50% {
        transform: translate(48px, 0) scale(1);
    }

    75% {
        transform: translate(28px, 8px) scale(1.04);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.lower-third-preview .lower-third-right-image-wrap {
    animation: lower-third-right-image-sway 3.2s ease-in-out infinite;
}

.lower-third-preview {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: grid;
    pointer-events: auto;
    z-index: 2147483647;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
}

.lower-third-preview .lower-third-segment {
    position: relative;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14%;
    min-height: 240px;
    grid-row: 2;
    grid-column: 1;
}

.lower-third-preview .lower-third-segment-content {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.lower-third-preview .lower-third-segment-content img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.lower-third-preview .lower-third-poll-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    gap: 0.75rem;
    font-size: 0.75rem;
    position: relative;
    z-index: 1;
}

.lower-third-preview .lower-third-poll-content {
    flex: 1;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lower-third-preview .lower-third-poll-question {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 600;
    opacity: 0.95;
}

.lower-third-preview .lower-third-poll-buttons {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.lower-third-preview .lower-third-poll-button {
    padding: 1rem 1.85rem;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    border-radius: 10px;
    flex-shrink: 0;
    color: white;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.lower-third-preview .lower-third-poll-button-1 {
    background: rgba(14, 165, 233, 0.3);
    border: 1px solid #0ea5e9;
}

.lower-third-preview .lower-third-poll-button-2 {
    background: rgba(16, 185, 129, 0.3);
    border: 1px solid #10b981;
}

.lower-third-preview .lower-third-poll-button-3 {
    background: rgba(168, 85, 247, 0.3);
    border: 1px solid #a855f7;
}

.lower-third-preview .lower-third-poll-button-4 {
    background: rgba(236, 72, 153, 0.3);
    border: 1px solid #ec4899;
}

.lower-third-preview .lower-third-qr-content {
    transform: translate(-50%, -50%) scale(1) !important;
}

.lower-third-preview .lower-third-qr-text {
    font-size: clamp(1.25rem, 2.8vw, 1.65rem);
    line-height: 1.35;
    margin: 0 0 0.5em;
    font-weight: 600;
}

.lower-third-preview .lower-third-qr-image {
    width: clamp(110px, 16vw, 150px) !important;
    padding: 6px;
    display: block;
    margin: 0.4em auto;
}

.lower-third-preview .lower-third-qr-branding {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    margin: 0.4em 0 0;
    opacity: 0.95;
}

#player.lower-third-active .vjs-control-bar,
#player.lower-third-active .vjs-control-bar * {
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

#player.lower-third-active {
    pointer-events: none;
}