/* =========================================
   FLOP CORN — Homepage Movie AI Buddy
   Floating, responsive movie-help widget
========================================= */

.fc-movie-buddy,
.fc-movie-buddy * { box-sizing: border-box; }

.fc-movie-buddy {
    --fc-buddy-yellow: #ffd21c;
    --fc-buddy-panel: #111111;
    --fc-buddy-panel-raised: #191919;
    --fc-buddy-line: rgba(255, 255, 255, .10);
    --fc-buddy-muted: #a8a8a8;
    font-family: "DM Sans", sans-serif;
    color: #f7f7f7;
}

.fc-buddy-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10030;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 66px;
    padding: 10px 17px 10px 11px;
    border: 1px solid rgba(255, 210, 28, .45);
    border-radius: 20px;
    color: #111;
    background: linear-gradient(135deg, #ffe36c 0%, #ffd21c 52%, #ffbf00 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .38), 0 4px 24px rgba(255, 210, 28, .20);
    cursor: pointer;
    text-align: left;
    transition: transform .22s ease, box-shadow .22s ease;
}

.fc-buddy-launcher:hover {
    transform: translateY(-3px);
    box-shadow: 0 17px 44px rgba(0, 0, 0, .42), 0 5px 27px rgba(255, 210, 28, .28);
}

.fc-buddy-launcher:focus-visible,
.fc-buddy-close:focus-visible,
.fc-buddy-full-link:focus-visible,
.fc-buddy-suggestion:focus-visible,
.fc-buddy-send:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.fc-buddy-launcher-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border-radius: 14px;
    background: #151515;
    color: var(--fc-buddy-yellow);
    font-size: 20px;
}

.fc-buddy-online-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    border: 2px solid #ffd21c;
    border-radius: 50%;
    background: #39d98a;
}

.fc-buddy-launcher-copy { display: flex; flex-direction: column; gap: 3px; }
.fc-buddy-launcher-copy strong { font: 800 15px/1.1 "Outfit", sans-serif; letter-spacing: -.2px; }
.fc-buddy-launcher-copy small { font-size: 11px; font-weight: 600; opacity: .78; }
.fc-buddy-launcher-chevron { margin-left: 5px; font-size: 13px; transition: transform .2s ease; }
.fc-movie-buddy.is-open .fc-buddy-launcher-chevron { transform: rotate(180deg); }

.fc-buddy-panel {
    position: fixed;
    right: 24px;
    bottom: 103px;
    z-index: 10031;
    display: flex;
    flex-direction: column;
    width: min(410px, calc(100vw - 32px));
    height: min(650px, calc(100dvh - 130px));
    min-height: 420px;
    overflow: hidden;
    border: 1px solid rgba(255, 210, 28, .25);
    border-radius: 24px;
    background: var(--fc-buddy-panel);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .58), 0 0 0 1px rgba(255,255,255,.025);
    transform-origin: bottom right;
    animation: fcBuddyPanelIn .2s ease-out;
}

.fc-buddy-panel[hidden] { display: none !important; }
@keyframes fcBuddyPanelIn {
    from { opacity: 0; transform: translateY(9px) scale(.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.fc-buddy-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 16px 14px;
    background: radial-gradient(ellipse at top left, rgba(255,210,28,.15), transparent 68%), #151515;
    border-bottom: 1px solid var(--fc-buddy-line);
}

.fc-buddy-brand-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 15px;
    color: #111;
    background: var(--fc-buddy-yellow);
    font-size: 20px;
}

.fc-buddy-heading { min-width: 0; flex: 1; }
.fc-buddy-heading strong { display: block; margin: 0 0 4px; font: 800 17px/1.1 "Outfit", sans-serif; letter-spacing: -.25px; }
.fc-buddy-heading p { margin: 0; color: #b9b9b9; font-size: 11px; line-height: 1.35; }
.fc-buddy-status { display: inline-flex; align-items: center; gap: 5px; color: #d7d7d7; }
.fc-buddy-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #38d987; box-shadow: 0 0 8px rgba(56,217,135,.6); }

.fc-buddy-header-actions { display: flex; align-items: center; gap: 6px; }
.fc-buddy-full-link,
.fc-buddy-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 11px;
    color: #dedede;
    background: rgba(255,255,255,.045);
    text-decoration: none;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.fc-buddy-full-link:hover,
.fc-buddy-close:hover { color: var(--fc-buddy-yellow); border-color: rgba(255,210,28,.35); background: rgba(255,210,28,.08); }

.fc-buddy-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 13px;
    min-height: 0;
    overflow-y: auto;
    padding: 17px 14px 12px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,210,28,.35) transparent;
}

.fc-buddy-message { display: flex; align-items: flex-start; gap: 8px; max-width: 100%; }
.fc-buddy-message.user { justify-content: flex-end; }
.fc-buddy-avatar {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    border-radius: 10px;
    color: #111;
    background: var(--fc-buddy-yellow);
    font-size: 13px;
}
.fc-buddy-message.user .fc-buddy-avatar { order: 2; background: #343434; color: #fff; }
.fc-buddy-bubble {
    max-width: calc(100% - 38px);
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 4px 14px 14px 14px;
    background: var(--fc-buddy-panel-raised);
    color: #ededed;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.fc-buddy-message.user .fc-buddy-bubble {
    order: 1;
    border-color: rgba(255,210,28,.2);
    border-radius: 14px 4px 14px 14px;
    background: rgba(255,210,28,.12);
    color: #fff5c8;
}
.fc-buddy-bubble strong { display: block; margin-bottom: 3px; color: var(--fc-buddy-yellow); font-size: 11px; font-weight: 800; }
.fc-buddy-bubble p { margin: 0; white-space: pre-wrap; }
.fc-buddy-message.user .fc-buddy-bubble strong { color: #fff; }

.fc-buddy-suggestions { padding: 0 14px 11px; }
.fc-buddy-suggestions-label { margin: 0 0 8px; color: var(--fc-buddy-muted); font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.fc-buddy-suggestion-list { display: flex; flex-wrap: wrap; gap: 7px; }
.fc-buddy-suggestion {
    padding: 8px 10px;
    border: 1px solid rgba(255,210,28,.21);
    border-radius: 99px;
    color: #f9e8a0;
    background: rgba(255,210,28,.055);
    font: 600 11px/1.2 "DM Sans", sans-serif;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.fc-buddy-suggestion:hover { transform: translateY(-1px); border-color: rgba(255,210,28,.55); background: rgba(255,210,28,.12); }
.fc-buddy-suggestions[hidden] { display: none !important; }

.fc-buddy-movie-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 1px 0 2px 37px; }
.fc-buddy-movie-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: #191919; }
.fc-buddy-movie-card img { display: block; width: 100%; height: 125px; object-fit: cover; background: #222; }
.fc-buddy-movie-info { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 5px; padding: 9px; }
.fc-buddy-movie-info strong { display: -webkit-box; overflow: hidden; width: 100%; color: #fff; font: 700 12px/1.3 "Outfit", sans-serif; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.fc-buddy-movie-meta { color: #aaa; font-size: 10px; }
.fc-buddy-movie-info button { display: flex; align-items: center; justify-content: space-between; gap: 5px; width: 100%; margin-top: auto; padding: 7px 8px; border: 0; border-radius: 8px; color: #141414; background: var(--fc-buddy-yellow); font: 800 10px "DM Sans", sans-serif; cursor: pointer; }
.fc-buddy-movie-info button:hover { background: #ffe36c; }

.fc-buddy-typing { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0 1px; }
.fc-buddy-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--fc-buddy-yellow); animation: fcBuddyTyping 1s ease-in-out infinite; }
.fc-buddy-typing span:nth-child(2) { animation-delay: .15s; }
.fc-buddy-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes fcBuddyTyping { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.fc-buddy-composer-wrap { padding: 10px 13px 12px; border-top: 1px solid var(--fc-buddy-line); background: #121212; }
.fc-buddy-composer { display: flex; align-items: center; gap: 8px; padding: 5px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: #202020; transition: border-color .18s ease, box-shadow .18s ease; }
.fc-buddy-composer:focus-within { border-color: rgba(255,210,28,.65); box-shadow: 0 0 0 3px rgba(255,210,28,.08); }
.fc-buddy-input { width: 100%; min-width: 0; height: 38px; padding: 0 8px; border: 0 !important; outline: none !important; color: #fff !important; background: transparent !important; box-shadow: none !important; font: 500 13px "DM Sans", sans-serif; }
.fc-buddy-input::placeholder { color: #888; }
.fc-buddy-send { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 37px; border: 0; border-radius: 11px; color: #101010; background: var(--fc-buddy-yellow); cursor: pointer; transition: transform .18s ease, opacity .18s ease; }
.fc-buddy-send:hover { transform: scale(1.04); }
.fc-buddy-send:disabled { cursor: wait; opacity: .55; }
.fc-buddy-disclaimer { margin: 8px 0 0; color: #767676; text-align: center; font-size: 10px; line-height: 1.4; }
.fc-buddy-full-mobile { display: none; }

html.light-mode .fc-movie-buddy { color: #181818; }
html.light-mode .fc-buddy-panel { --fc-buddy-panel: #fff; --fc-buddy-panel-raised: #f5f4ef; --fc-buddy-line: rgba(0,0,0,.09); border-color: rgba(140,110,0,.22); box-shadow: 0 24px 80px rgba(0,0,0,.22); }
html.light-mode .fc-buddy-header, html.light-mode .fc-buddy-composer-wrap { background: #f9f8f2; }
html.light-mode .fc-buddy-heading p, html.light-mode .fc-buddy-status { color: #606060; }
html.light-mode .fc-buddy-full-link, html.light-mode .fc-buddy-close { border-color: rgba(0,0,0,.11); color: #333; background: rgba(0,0,0,.035); }
html.light-mode .fc-buddy-bubble { color: #242424; border-color: rgba(0,0,0,.07); }
html.light-mode .fc-buddy-message.user .fc-buddy-bubble { color: #322900; }
html.light-mode .fc-buddy-message.user .fc-buddy-bubble strong { color: #322900; }
html.light-mode .fc-buddy-movie-card { background: #fff; border-color: rgba(0,0,0,.1); }
html.light-mode .fc-buddy-movie-info strong { color: #171717; }
html.light-mode .fc-buddy-composer { background: #fff; border-color: rgba(0,0,0,.13); }
html.light-mode .fc-buddy-input { color: #161616 !important; }

@media (max-width: 768px) {
    .fc-buddy-launcher { right: 13px; bottom: 78px; min-height: 58px; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 18px; }
    .fc-buddy-launcher-icon { width: 40px; height: 40px; flex-basis: 40px; border-radius: 13px; }
    .fc-buddy-launcher-copy strong { font-size: 14px; }
    .fc-buddy-launcher-copy small { font-size: 10px; }
    .fc-buddy-launcher-chevron { margin-left: 1px; }
    .fc-buddy-panel { right: 8px; bottom: 145px; width: calc(100vw - 16px); height: min(590px, calc(100dvh - 168px)); min-height: 340px; border-radius: 20px; }
    .fc-buddy-header { padding: 13px 12px; gap: 9px; }
    .fc-buddy-brand-icon { width: 39px; height: 39px; flex-basis: 39px; border-radius: 13px; }
    .fc-buddy-heading strong { font-size: 15px; }
    .fc-buddy-heading p { font-size: 10px; }
    .fc-buddy-header-actions { gap: 4px; }
    .fc-buddy-full-link, .fc-buddy-close { width: 31px; height: 31px; flex-basis: 31px; }
    .fc-buddy-messages { padding: 13px 11px 10px; }
    .fc-buddy-suggestions { padding: 0 11px 10px; }
    .fc-buddy-suggestion { font-size: 10px; padding: 8px 9px; }
    .fc-buddy-movie-grid { margin-left: 0; }
    .fc-buddy-movie-card img { height: 112px; }
    .fc-buddy-composer-wrap { padding: 9px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 360px) {
    .fc-buddy-launcher { right: 9px; }
    .fc-buddy-launcher-copy small { display: none; }
    .fc-buddy-panel { right: 5px; width: calc(100vw - 10px); }
    .fc-buddy-movie-grid { gap: 7px; }
    .fc-buddy-movie-card img { height: 92px; }
}

@media (prefers-reduced-motion: reduce) {
    .fc-movie-buddy *, .fc-movie-buddy *::before, .fc-movie-buddy *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
