/* ==========================================================================
   AMBUSH STANDS PLANNER — PREMIUM VISUAL SYSTEM (GLASSMORPHIC DARK MODE)
   ========================================================================== */

/* Variables and Theme Tokens */
:root {
    --ap-primary: #3D0A10;
    --ap-primary-light: #5A0F17;
    --ap-accent: #E8443A;
    --ap-accent-glow: rgba(232, 68, 58, 0.25);
    --ap-black: #080808;
    --ap-dark: #121212;
    --ap-slate: #1c1c1c;
    --ap-gray: #8e8e93;
    --ap-gray-light: #d1d1d6;
    --ap-white: #fafafa;
    --ap-font-display: 'Outfit', sans-serif;
    --ap-font-body: 'Inter', sans-serif;
    --ap-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. PLANNER LAUNCHER (FLOAT BUTTON) */
.ambush-planner-launcher {
    position: fixed;
    bottom: 96px; /* Positioned perfectly above the WhatsApp button */
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: row-reverse; /* Circle on the right (aligned with WhatsApp), text on the left */
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
}

/* Float button circular core */
.ambush-planner-launcher-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ap-black);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    transition: all 0.5s var(--ap-ease);
    position: relative;
    overflow: hidden;
}

/* Glow ring animation */
.ambush-planner-launcher-circle::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--ap-accent);
    opacity: 0.4;
    animation: apPulseRing 3s ease-out infinite;
    pointer-events: none;
}

.ambush-planner-launcher-circle svg {
    width: 24px;
    height: 24px;
    stroke: var(--ap-accent);
    stroke-width: 1.5;
    fill: none;
    transition: transform 0.5s var(--ap-ease);
}

/* Elegant pill banner adjacent to the button (permanently visible on the left) */
.ambush-planner-launcher-pill {
    background: rgba(18, 18, 18, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 18px;
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 1; /* Permanently visible so users always know its function */
    transform: translateX(0);
    transition: all 0.4s var(--ap-ease);
    white-space: nowrap;
}

.ambush-planner-launcher-pill span {
    display: block;
    font-family: var(--ap-font-display);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ap-accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.2;
}

.ambush-planner-launcher-pill p {
    margin: 2px 0 0;
    font-family: var(--ap-font-body);
    font-size: 0.78rem;
    color: var(--ap-gray-light);
    line-height: 1.2;
    font-weight: 500;
}

/* Hover States for Launcher */
.ambush-planner-launcher:hover .ambush-planner-launcher-circle {
    transform: scale(1.05) translateY(-2px);
    border-color: rgba(232, 68, 58, 0.3);
    box-shadow: 0 12px 36px rgba(232, 68, 58, 0.15);
}

.ambush-planner-launcher:hover .ambush-planner-launcher-circle svg {
    transform: rotate(45deg);
    stroke: var(--ap-white);
}

.ambush-planner-launcher:hover .ambush-planner-launcher-pill {
    border-color: rgba(232, 68, 58, 0.35);
    box-shadow: 0 12px 32px rgba(232, 68, 58, 0.15), 0 0 0 1px rgba(232, 68, 58, 0.1);
    background: rgba(26, 10, 12, 0.95); /* Elegant deep crimson-tinted background hover */
}

/* Notification dot on launcher */
.ambush-planner-launcher-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: var(--ap-accent);
    border-radius: 50%;
    border: 2px solid var(--ap-black);
    animation: blink 2s ease infinite;
}

/* 2. PLANNER MAIN CONTAINER (WINDOW) */
.ambush-planner-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 390px;
    height: 590px;
    z-index: 1000;
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.8),
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ambush-planner-window.ap-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Background grid overlay in planner */
.ambush-planner-window::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
}

/* 3. PLANNER HEADER */
.ambush-planner-header {
    padding: 20px 24px;
    background: linear-gradient(180deg, rgba(61, 10, 16, 0.3) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.ambush-planner-header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ambush-planner-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--ap-primary);
    border: 1px solid var(--ap-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ambush-planner-header-avatar img {
    width: 22px;
    height: auto;
    max-height: 22px;
    object-fit: contain;
}

.ambush-planner-header-avatar-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #25D366;
    border-radius: 50%;
    border: 2px solid var(--ap-black);
}

.ambush-planner-header-title h4 {
    margin: 0;
    font-family: var(--ap-font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ap-white);
    letter-spacing: -0.01em;
}

.ambush-planner-header-title span {
    display: block;
    font-family: var(--ap-font-body);
    font-size: 0.68rem;
    color: var(--ap-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1px;
}

.ambush-planner-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--ap-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.ambush-planner-close-btn:hover {
    color: var(--ap-white);
    background: rgba(255, 255, 255, 0.06);
}

.ambush-planner-close-btn svg {
    width: 18px;
    height: 18px;
}

/* 4. CHAT MESSAGES CONTAINER */
.ambush-planner-chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 2;
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Chat */
.ambush-planner-chat-area::-webkit-scrollbar {
    width: 5px;
}
.ambush-planner-chat-area::-webkit-scrollbar-track {
    background: transparent;
}
.ambush-planner-chat-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.ambush-planner-chat-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Message Bubble Styles */
.ambush-planner-msg {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 85%;
    animation: apSlideUp 0.5s var(--ap-ease) forwards;
}

/* Bot Message Styling */
.ambush-planner-msg.ap-bot {
    align-self: flex-start;
}

.ambush-planner-msg-bubble {
    padding: 14px 18px;
    border-radius: 14px;
    font-family: var(--ap-font-body);
    font-size: 0.88rem;
    line-height: 1.6;
}

.ambush-planner-msg.ap-bot .ambush-planner-msg-bubble {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    border-top-left-radius: 4px;
}

/* User Message Styling */
.ambush-planner-msg.ap-user {
    align-self: flex-end;
}

.ambush-planner-msg.ap-user .ambush-planner-msg-bubble {
    background: var(--ap-primary);
    border: 1px solid rgba(232, 68, 58, 0.2);
    color: var(--ap-white);
    border-top-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(61, 10, 16, 0.15);
}

/* Time indicator inside bubble */
.ambush-planner-msg-time {
    font-size: 0.65rem;
    color: var(--ap-gray);
    margin-left: 4px;
}
.ambush-planner-msg.ap-user .ambush-planner-msg-time {
    align-self: flex-end;
    margin-right: 4px;
}

/* 5. INTERACTIVE CHOICES & INPUTS */
.ambush-planner-choices-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    animation: apSlideUp 0.5s var(--ap-ease) forwards;
}

.ambush-planner-choice-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--ap-white);
    padding: 12px 16px;
    border-radius: 10px;
    font-family: var(--ap-font-body);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s var(--ap-ease);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ambush-planner-choice-btn:hover {
    background: rgba(232, 68, 58, 0.08);
    border-color: var(--ap-accent);
    transform: translateX(4px);
}

.ambush-planner-choice-btn::after {
    content: '→';
    font-size: 0.9rem;
    color: var(--ap-accent);
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s var(--ap-ease);
}

.ambush-planner-choice-btn:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* 6. CURATED RECOMMENDATION CARD (The Curator Showcase) */
.ambush-planner-curator-card {
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.95) 0%, rgba(30, 10, 12, 0.4) 100%);
    border: 1px solid rgba(232, 68, 58, 0.18);
    border-radius: 12px;
    padding: 18px;
    margin-top: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    animation: apFadeIn 0.6s var(--ap-ease) forwards;
}

.ambush-planner-curator-badge {
    background: rgba(232, 68, 58, 0.1);
    border: 1px solid rgba(232, 68, 58, 0.25);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--ap-font-display);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--ap-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.ambush-planner-curator-title {
    font-family: var(--ap-font-display);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ap-white);
    margin: 0 0 6px 0;
}

.ambush-planner-curator-desc {
    font-family: var(--ap-font-body);
    font-size: 0.78rem;
    color: var(--ap-gray-light);
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.ambush-planner-curator-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.ambush-planner-curator-spec-item {
    font-family: var(--ap-font-body);
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ambush-planner-curator-spec-item::before {
    content: '✓';
    color: var(--ap-accent);
    font-weight: bold;
}

/* Action button inside recommendation */
.ambush-planner-curator-action {
    width: 100%;
    background: var(--ap-accent);
    color: var(--ap-white);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-family: var(--ap-font-body);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s var(--ap-ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ambush-planner-curator-action:hover {
    background: #d63a30;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 68, 58, 0.3);
}

/* 7. CONVERSATIONAL FORM INPUTS (The Briefing Express) */
.ambush-planner-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 18px;
    border-radius: 12px;
    animation: apSlideUp 0.5s var(--ap-ease) forwards;
}

.ambush-planner-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ambush-planner-form-group label {
    font-family: var(--ap-font-display);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ap-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ambush-planner-form-group input,
.ambush-planner-form-group select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px 12px;
    font-family: var(--ap-font-body);
    font-size: 0.82rem;
    color: var(--ap-white);
    outline: none;
    transition: all 0.3s;
}

.ambush-planner-form-group select option {
    background: #141414 !important;
    color: #ffffff !important;
    font-family: var(--ap-font-body) !important;
    font-size: 0.85rem !important;
}

.ambush-planner-form-group input:focus,
.ambush-planner-form-group select:focus {
    border-color: var(--ap-accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(232, 68, 58, 0.15);
}

.ambush-planner-submit-btn {
    background: var(--ap-accent);
    color: var(--ap-white);
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-family: var(--ap-font-body);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.3s var(--ap-ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ambush-planner-submit-btn:disabled {
    background: var(--ap-slate);
    color: var(--ap-gray);
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.ambush-planner-submit-btn.ap-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid var(--ap-white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: apSpin 0.8s linear infinite;
}

/* Dual Column Inputs for City and Time */
.ambush-planner-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 8. TYPING INDICATOR */
.ambush-planner-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    border-top-left-radius: 4px;
    align-self: flex-start;
    width: fit-content;
    animation: apSlideUp 0.3s var(--ap-ease) forwards;
}

.ambush-planner-typing span {
    width: 6px;
    height: 6px;
    background: var(--ap-accent);
    border-radius: 50%;
    opacity: 0.4;
    animation: apTypingDot 1.4s infinite ease-in-out;
}

.ambush-planner-typing span:nth-child(2) { animation-delay: 0.2s; }
.ambush-planner-typing span:nth-child(3) { animation-delay: 0.4s; }

/* 9. KEYFRAME ANIMATIONS */
@keyframes apPulseRing {
    0% { transform: scale(0.95); opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes apSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes apFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes apTypingDot {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-4px); opacity: 1; }
}

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

/* 10. RESPONSIVE MEDIA QUERIES (MOBILE OPTIMIZATION) */
@media (max-width: 500px) {
    .ambush-planner-launcher {
        bottom: 84px;
        right: 16px;
    }
    .ambush-planner-launcher-pill {
        display: none; /* Hide floating labels on small mobiles to avoid crowding */
    }
    .ambush-planner-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }
}


/* ==========================================================================
   AMBUSH SERVICES HEADER DROPDOWN (STUDIO RED ICONS & CLEAN TITLES)
   ========================================================================== */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-dropdown-trigger .dropdown-chevron {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger,
.nav-dropdown.active-touch .nav-dropdown-trigger {
    color: #ffffff !important;
}

.nav-dropdown:hover .nav-dropdown-trigger .dropdown-chevron,
.nav-dropdown:focus-within .nav-dropdown-trigger .dropdown-chevron,
.nav-dropdown.active-touch .nav-dropdown-trigger .dropdown-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--color-accent, var(--accent, #E8443A));
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-30%) translateY(6px);
    width: 570px;
    max-width: 92vw;
    background: rgba(10, 8, 12, 0.96);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px 6px;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.9), 0 0 1px 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
    z-index: 1050;
}

/* Invisible hover bridge */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.active-touch .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-30%) translateY(0);
}

.nav-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 9px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav-dropdown-item::after {
    display: none !important;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    transform: translateY(-1px) !important;
}

.dropdown-item-icon {
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
}

.dropdown-item-icon svg {
    width: 14px !important;
    height: 14px !important;
    stroke: var(--color-accent, var(--accent, #E8443A)) !important;
    stroke-width: 1.6 !important;
    fill: none !important;
    transition: transform 0.2s ease !important;
}

.nav-dropdown-item:hover .dropdown-item-icon svg {
    transform: scale(1.15) !important;
}

.dropdown-item-title {
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.82) !important;
    letter-spacing: 0.015em !important;
    text-transform: none !important;
    font-family: 'Outfit', sans-serif !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    transition: color 0.2s ease !important;
}

.nav-dropdown-item:hover .dropdown-item-title {
    color: #ffffff !important;
}
