/**
 * MTV AI Chat Banner Widget Styles
 *
 * Pixel-perfect implementation from Figma JSON: Banner 1, 1728x1024 frame.
 * All values extracted from /tmp/figma-images/banner1-full.json
 *
 * @package MTV_AI_Chat
 * @since 1.1.0
 */

/* ===== Hero Container (1:9 Banner 1) ===== */
.mtv-banner-hero {
    position: relative;
    width: 100%;
    min-height: 650px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background image blur (Figma 1:10: LAYER_BLUR radius=4, blurType=NORMAL)
   Single blur only — no additional backdrop-filter on overlay */
.mtv-banner-hero::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: inherit;
    background-size: cover;
    background-position: center top;
    filter: blur(4px);
    z-index: 0;
}

/* Orange gradient overlay (Figma 1:11: GRADIENT_LINEAR + BACKGROUND_BLUR PROGRESSIVE)
   Progressive blur cannot be replicated in CSS — using gradient only, blur is on ::before */
.mtv-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(237, 139, 0, 0.08) 0%,
        rgba(237, 139, 0, 0) 29%,
        rgba(237, 139, 0, 0) 90%
    );
    pointer-events: none;
    z-index: 1;
}

/* White ellipse (Figma 1:13: 1248x688, #fff 70% opacity, LAYER_BLUR 250px) */
.mtv-banner-ellipse {
    position: absolute;
    width: 1248px;
    height: 688px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    background: rgba(255, 255, 255, 0.70);
    border-radius: 50%;
    filter: blur(250px);
    pointer-events: none;
    z-index: 2;
}

/* ===== Content Area (Figma 1:12: 1200x541, VERTICAL layout, gap 48) ===== */
.mtv-banner-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 50px 32px 60px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ===== Badge (Figma 1:64: 152x152, IMAGE 50% opacity, LAYER_BLUR 2px) ===== */
.mtv-banner-badge {
    position: absolute;
    top: 10px;
    right: 0;
    width: 152px;
    height: 152px;
    z-index: 4;
    object-fit: contain;
    opacity: 0.5;
}

/* ===== Heading Section (Figma 1:14: VERTICAL layout, gap 16) ===== */
.mtv-banner-text {
    margin-bottom: 0;
}

/* Main heading (Figma 1:15: Inter 600 60px, #174182, stroke #fff 20% 2px, text-shadow) */
.mtv-banner-heading {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 60px;
    font-weight: 600;
    color: #174182;
    margin: 0 0 16px;
    line-height: 1.21;
    position: relative;
    max-width: 1095px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.80);
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.20);
}

/* "Done Right!" script (Figma: Abril Fatface, #ed7b00-ish from design) */
.mtv-banner-script {
    font-family: 'Abril Fatface', Georgia, serif;
    font-weight: 400;
    font-style: normal;
    color: #ed7b00;
    position: relative;
    display: inline-block;
}

/* Swoosh underline SVG (Figma 1:17: stroke #d87e00, 3px) */
.mtv-banner-swoosh {
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
}

/* Description (Figma 1:16: Inter 400 24px, #000 60%, shadow) */
.mtv-banner-description {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 24px;
    color: rgba(0, 0, 0, 0.60);
    max-width: 1016px;
    line-height: 1.5;
    margin: 0;
    text-shadow: 0 2px 4px rgba(27, 28, 29, 0.04);
}

/* ===== Chat Card (Figma 1:18: HORIZONTAL, gap 12, pad 24, bottom-aligned) =====
   Fills: #fff 60% + #ea8b25 6%
   Stroke: GRADIENT #ed8b00 → #fff at 63%, 2px INSIDE
   Shadow: offset(0,48) blur=100 rgba(17,12,46,0.15)
   BACKGROUND_BLUR: 60px
   cornerRadius: 16, clipsContent: true */
.mtv-banner-chat-card {
    background:
        linear-gradient(rgba(234, 139, 37, 0.06), rgba(234, 139, 37, 0.06)),
        linear-gradient(rgba(255, 255, 255, 0.60), rgba(255, 255, 255, 0.60));
    border-radius: 16px;
    box-shadow: 0 48px 100px rgba(17, 12, 46, 0.15);
    display: flex;
    align-items: stretch; /* Mascot stretches full height, content pinned to bottom */
    overflow: hidden; /* Figma: clipsContent=true */
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    padding: 24px;
    gap: 12px;
    position: relative;
}

/* Gradient border (Figma: GRADIENT stroke #ed8b00→#fff at 63%, 2px, INSIDE) */
.mtv-banner-chat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #ed8b00 0%, #ffffff 63%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

/* Decorative blurred orange glow (Figma 1:19: 104x104, #efa233, LAYER_BLUR 120px) */
.mtv-banner-chat-card::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 104px;
    width: 104px;
    height: 104px;
    background: #efa233;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

/* ===== Chat Left Side (Figma 1:20: 760x240, VERTICAL, gap 16) ===== */
.mtv-banner-chat-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding: 0;
    max-width: 760px;
    z-index: 1;
}

/* Chat title (Figma 1:21: Inter 500 20px, #000 80%) */
.mtv-banner-chat-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.80);
    margin: 0;
    line-height: 1.2;
}

/* Inner chat area (Figma 1:22: 760x200, VERTICAL, gap 24, pad 16,
   fill #fff 60%, stroke #000 10% 1px INSIDE, radius 8, primaryAxisAlignItems=MAX) */
.mtv-banner-chat-inner {
    background: rgba(255, 255, 255, 0.60);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Figma: primaryAxisAlignItems=MAX → push content to bottom */
    gap: 24px;
    min-height: 200px;
}

/* ===== Suggestion Chips (Figma 1:23: HORIZONTAL WRAP, gap 8, center-aligned) ===== */
.mtv-banner-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* Chip buttons (Figma 1:24: stroke #000 12%, 1px INSIDE, radius 100, pad 2/12) */
.mtv-banner-chip {
    background: transparent !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 100px !important;
    padding: 2px 12px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 14px !important;
    color: #525866 !important;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
    line-height: 1.7 !important;
    white-space: nowrap;
    letter-spacing: -0.154px;
}

.mtv-banner-chip:hover {
    border-color: #ed8b00 !important;
    color: #ed8b00 !important;
    background-color: rgba(237, 139, 0, 0.05) !important;
}

.mtv-banner-chip:active {
    transform: scale(0.97);
}

/* ===== Widget Overrides (banner mode) ===== */
.mtv-banner-chat-widget {
    max-width: 100% !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.mtv-banner-chat-widget .mtv-ai-chat-header {
    display: none !important;
}

.mtv-banner-chat-widget .mtv-ai-chat-input-area {
    border-top: none;
    padding: 0;
    background: transparent;
}

/* Input form (Figma 1:38: fill #fff, stroke #000 10% 1px INSIDE, radius 1000, 728x48) */
.mtv-banner-chat-widget .mtv-ai-chat-form {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 1000px;
    padding: 8px 8px 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    flex-shrink: 0;
}

/* Input textarea (Figma 1:42: Inter 400 16px, #868c98) */
.mtv-banner-chat-widget .mtv-ai-chat-input {
    border: none !important;
    box-shadow: none !important;
    padding: 0 4px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 30px !important;
    color: #868c98;
    border-radius: 0;
    background: transparent;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    resize: none;
    overflow: hidden;
}

.mtv-banner-chat-widget .mtv-ai-chat-input:focus {
    box-shadow: none !important;
    border: none !important;
    outline: none;
    color: #000000;
}

/* Send button (Figma 1:43: 32x32, #ed8b00, radius 100, shadow) */
.mtv-banner-chat-widget button.mtv-ai-chat-send {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 100px;
    background: #ed8b00;
    box-shadow: 0 1px 2px rgba(13, 13, 18, 0.06);
}

.mtv-banner-chat-widget .mtv-ai-chat-powered {
    display: none;
}

/* Messages area when active */
.mtv-banner-chat-widget .mtv-ai-chat-messages {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

/* Sparkle icon (Figma 1:40: 24x24, #ed8b00) */
.mtv-banner-sparkle {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mtv-banner-sparkle svg {
    display: block;
}

/* ===== Mascot Section (Figma 1:46: 380x200, cornerRadius 8, clipsContent=true) =====
   Uses a single pre-composed image containing mascot, speech bubble, phone text,
   and decorative circles on an orange (#EA8B25) background.
   Container stretches full card height; image is vertically centered. */
.mtv-banner-mascot {
    width: 380px;
    min-height: 200px;
    align-self: stretch;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #EA8B25;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mascot image: covers container, keeps head/face visible */
.mtv-banner-mascot-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
}

/* ===== Responsive: Small Desktop (13" laptops ~1440px) ===== */
@media (max-width: 1440px) {
    .mtv-banner-heading {
        font-size: 48px;
    }

    .mtv-banner-description {
        font-size: 22px;
    }
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
    .mtv-banner-hero {
        min-height: 550px;
    }

    .mtv-banner-heading {
        font-size: 42px;
        line-height: 1.24;
    }

    .mtv-banner-description {
        font-size: 20px;
        line-height: 1.5;
    }

    .mtv-banner-badge {
        width: 120px;
        height: 120px;
    }

    .mtv-banner-mascot {
        width: 300px;
    }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
    .mtv-banner-hero {
        min-height: auto;
    }

    .mtv-banner-content {
        padding: 30px 16px 40px;
        gap: 24px;
    }

    .mtv-banner-heading {
        font-size: 32px;
        line-height: 1.25;
    }

    .mtv-banner-description {
        font-size: 18px;
        line-height: 1.5;
    }

    .mtv-banner-badge {
        width: 90px;
        height: 90px;
        top: 5px;
        right: -10px;
    }

    /* Stack chat card vertically */
    .mtv-banner-chat-card {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .mtv-banner-chat-left {
        gap: 12px;
    }

    .mtv-banner-chat-title {
        font-size: 16px;
    }

    .mtv-banner-chip {
        font-size: 13px !important;
        padding: 2px 10px !important;
    }

    .mtv-banner-chat-inner {
        min-height: 160px;
    }

    /* Mascot full width at bottom when stacked */
    .mtv-banner-mascot {
        width: 100%;
        min-height: 200px;
        height: 200px;
        align-self: auto;
    }

    .mtv-banner-mascot-img {
        height: 100% !important;
        object-fit: contain;
        object-position: center center;
    }
}

/* ===== Responsive: Small Mobile ===== */
@media (max-width: 480px) {
    .mtv-banner-heading {
        font-size: 26px;
        line-height: 1.31;
    }

    .mtv-banner-swoosh {
        display: none;
    }

    .mtv-banner-badge {
        width: 70px;
        height: 70px;
    }

    .mtv-banner-chips {
        gap: 6px;
    }

    .mtv-banner-chip {
        font-size: 12px !important;
        padding: 2px 8px !important;
    }

    .mtv-banner-chat-widget .mtv-ai-chat-input {
        font-size: 16px; /* Prevent iOS zoom */
    }

}
