/* Custom Styles for Cosmic Cranachan */

/* Text Selection Color */
::selection {
    background-color: #1543B4 !important;
    color: #ffffff !important;
}

::-moz-selection {
    background-color: #1543B4 !important;
    color: #ffffff !important;
}

/* Smooth scroll */
#cursor,
#cursor-follower {
    display: none !important;
}

/* Disable JS cursor globally */
html {
    scroll-behavior: smooth;
}

/* Base body styles */
body {
    cursor: url('assets/cursor.png'), auto;
    /* Use custom image cursor */
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Force custom cursor on all interactive elements */
body,
a,
button,
[role="button"],
input,
select,
textarea,
label,
.cursor-pointer {
    cursor: url('assets/cursor.png'), auto !important;
}

/* Fix for dropdown links to show normal hand cursor */
.about-panel a,
.dropdown-panel a,
.capabilities-panel a,
.resources-panel a {
    cursor: pointer !important;
}

/* Hide scrollbar for cleaner look */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobile menu open state */
.mobile-menu-open {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Navigation scrolled state */
.nav-scrolled {
    background-color: rgba(10, 25, 47, 0.98) !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 40px -10px rgba(2, 12, 27, 0.7) !important;
}

/* Make top-level nav links white when scrolled */
#navigation.nav-scrolled>div.hidden.lg\:flex>a:not(.bg-red-600),
#navigation.nav-scrolled>div.hidden.lg\:flex>div.group>a {
    color: white !important;
}

/* Lighter blue for active links and hover state on dark scrolled nav */
#navigation.nav-scrolled>div.hidden.lg\:flex>a.active-nav-link,
#navigation.nav-scrolled>div.hidden.lg\:flex>a:not(.bg-red-600):hover,
#navigation.nav-scrolled>div.hidden.lg\:flex>div.group>a:hover {
    color: #60a5fa !important;
}

/* Mobile burger menu icon color when scrolled */
#navigation.nav-scrolled #mobile-menu-btn {
    color: white !important;
}

/* Dropdown open state */
.dropdown-open .dropdown-panel {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}



.dropdown-open .dropdown-arrow {
    transform: rotate(180deg) !important;
}

/* Pulse-slow animation removed for performance */

/* Manifesto text (no word splitting needed) */

/* Service card initial state for GSAP animation */
.service-card {
    will-change: transform, opacity;
}





/* Stat label initial state */
.stat-label {
    will-change: transform, opacity;
}

/* Stat divider initial state */
.stat-divider {
    will-change: transform;
    transform-origin: center top;
}

/* Touch device cursor fix */
@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto !important;
    }

    #cursor,
    #cursor-follower {
        display: none !important;
        /* Hide JS cursor elements */
    }
}



/* Paper Background Texture */
.paper-bg {
    background-image: url('assets/paper-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* CTA Horizon Effect */
.cta-horizon-container {
    perspective: 1000px;
    overflow: hidden;
    background: #000;
}

/* U-Shape (Concave) Horizon Glow */
.horizon-glow {
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(78, 120, 237, 0.278) 60%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

/* U-Shape (Concave) Horizon Edge */
.horizon-edge {
    position: absolute;
    top: -60%;
    left: -10%;
    width: 120%;
    height: 150%;
    background: transparent;
    border-radius: 50%;
    border-bottom: 2px solid rgba(85, 142, 247, 0.8);
    box-shadow: 0 10px 60px rgba(85, 142, 247, 0.196), inset 0 -20px 40px rgba(85, 142, 247, 0.083);
    z-index: 1;
    pointer-events: none;
}

/* Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* Horizontal Scroll Snap */
.snap-x-mandatory {
    scroll-snap-type: x mandatory;
}

.snap-center {
    scroll-snap-align: center;
}

/* Hide scrollbar but keep functionality */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Glassmorphism Card (no backdrop-filter for performance) */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================
   Realistic Wooden Awards Rack Theme
   ========================================= */

.awards-rack {
    background-image: url('assets/wood-texture.png');
    background-size: 500px;
    /* Adjust based on texture resolution */
    background-repeat: repeat;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8);
    border-top: 8px solid #232c3e;
    border-bottom: 8px solid #232c3e;
}

/* Engraved Text Effect */
.text-shadow-engraved {
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2), -1px -1px 0 rgba(0, 0, 0, 0.8);
}

/* Wooden Plate for Header */
.wooden-plate {
    background: linear-gradient(180deg, #2e414e 0%, #2e414e 100%);
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Individual Cubby/Compartment */
.award-cubby {
    position: relative;
    height: 280px;
    /* Fixed height for uniformity */
    background: #281815;
    /* Darker recess color */
    border: 8px solid #232c3e;
    /* Frame */
    border-radius: 4px;
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.9),
        /* Internal deep shadow */
        0 5px 10px rgba(0, 0, 0, 0.5);
    /* External drop shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease;
    padding: 20px;
}

.award-cubby:hover {
    transform: translateY(-2px);
}

/* Spotlight Effect in Cubby */
.spotlight {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.15) 0%, transparent 60%);
    pointer-events: none;
    mix-blend-mode: soft-light;
    animation: flicker 10s infinite;
}

@keyframes flicker {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* 3D Award Image Positioning */
.award-img {
    position: relative;
    max-height: 154px;
    width: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.6));
    transform: perspective(600px) rotateX(10deg);
    /* Slight tilt back */
    transition: all 0.4s ease;
    margin-bottom: auto;
    z-index: 2;
}

.award-cubby:hover .award-img {
    transform: perspective(400px) rotateX(0deg) scale(1.1);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.8));
}

/* Brass Plaque Nameplate */
.award-plaque {
    background: linear-gradient(to bottom, #f0e68c, #daa520, #b8860b);
    padding: 4px 12px;
    border-radius: 2px;
    border: 1px solid #8b4513;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    z-index: 3;
    position: relative;
}

/* Realistic Screw Heads on Plaque */
.award-plaque::before,
.award-plaque::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #3e2723;
    border-radius: 50%;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.8);
}

.award-plaque::before {
    left: 4px;
}

.award-plaque::after {
    right: 4px;
}

/* Organic blobs for Hero (static, no blur or animation for performance) */
.blob {
    position: absolute;
    z-index: 0;
    opacity: 0.15;
    background: radial-gradient(circle, currentColor 0%, transparent 70%) !important;
}

/* =========================================
   Tech Ecosystem Custom Styles
   ========================================= */

.tech-content-grid {
    transition: opacity 0.4s ease-in-out;
}

/* Active tab text color transition */
.tech-tab.active span {
    color: #fff !important;
}

.tech-tab.active {
    background: rgba(255, 255, 255, 0.05);
}

@media (min-width: 1024px) {
    .tech-tab.active {
        background: transparent;
        border-color: transparent;
    }
}

/* Make sure hidden grids don't block clicks */
.tech-content-grid.pointer-events-none {
    pointer-events: none;
}

/* Custom Thin Scrollbar for Tech Stack Grid */
.tech-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.tech-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.tech-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 163, 224, 0.3);
    /* Matches cosmic-berry */
    border-radius: 10px;
}

.tech-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 163, 224, 0.6);
}

/* Back to Top Button */
.button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgb(20, 20, 20);
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 0px 0px 4px rgba(160, 193, 255, 0.253);
    cursor: pointer;
    transition-duration: 0.3s;
    overflow: hidden;
    position: relative;
}

.svgIcon {
    width: 12px;
    transition-duration: 0.3s;
}

.svgIcon path {
    fill: white;
}

.button:hover {
    width: 140px;
    border-radius: 50px;
    transition-duration: 0.3s;
    background-color: rgb(0, 33, 115);
    align-items: center;
}

.button:hover .svgIcon {
    /* width: 20px; */
    transition-duration: 0.3s;
    transform: translateY(-200%);
}

.button::before {
    position: absolute;
    bottom: -20px;
    content: "Back to Top";
    color: white;
    /* transition-duration: .3s; */
    font-size: 0px;
}

.button:hover::before {
    font-size: 13px;
    opacity: 1;
    bottom: unset;
    /* transform: translateY(-30px); */
    transition-duration: 0.3s;
}

/* 3D Transform Utility for Hero Visual */
.preserve-3d {
    transform-style: preserve-3d;
}

/* Reverse Marquee Animation (Moves Right) */
@keyframes marquee-reverse {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.animate-marquee-reverse {
    animation: marquee-reverse 35s linear infinite;
}

.animate-marquee-reverse:hover {
    animation-play-state: paused;
}

/* Adjust the original marquee to match speed */
.animate-marquee {
    animation: marquee 35s linear infinite;
}

/* Chatbot UI Styles */
.chatbot-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #3b82f6, #4f46e5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-trigger:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.6);
}

.chatbot-trigger i {
    transition: transform 0.3s ease;
}

.chatbot-trigger:hover i {
    animation: bounceIcon 1s ease infinite;
}

@keyframes bounceIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.chatbot-window {
    position: fixed;
    bottom: 6.5rem;
    right: 2rem;
    width: 380px;
    height: 520px;
    background: rgba(15, 23, 42, 0.85);
    /* Cosmic dark with opacity */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    display: flex;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

.chatbot-window.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    padding: 1.2rem 1.5rem;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.2), rgba(79, 70, 229, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #3b82f6, #4f46e5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    position: relative;
}

.chatbot-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border: 2px solid #0f172a;
    border-radius: 50%;
}

.chatbot-title {
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.chatbot-subtitle {
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chatbot-close {
    color: #94a3b8;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.chatbot-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.chatbot-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
    color: #cbd5e1;
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
}

/* Custom Scrollbar for Chat Body */
.chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.chatbot-body::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chatbot-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-message {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    line-height: 1.5;
    animation: slideInMsg 0.3s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes slideInMsg {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.bot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
}

.chat-message.user {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.chatbot-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.chatbot-input-container {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 0.25rem;
    transition: border-color 0.3s;
}

.chatbot-input-container:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.chatbot-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}

.chatbot-input::placeholder {
    color: #64748b;
}

.chatbot-send {
    background: linear-gradient(135deg, #3b82f6, #4f46e5);
    color: white;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.chatbot-send:active {
    transform: scale(0.95);
}

.chatbot-typing-indicator {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    border-bottom-left-radius: 0.25rem;
    align-self: flex-start;
    width: fit-content;
}

.chatbot-typing-indicator.active {
    display: flex;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
        transform: translateY(100%);
    }

    .chatbot-trigger {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* =========================================
   Dynamic Connect Cards UI (Hover Effects)
   ========================================= */

.dynamic-hover-card {
    background-color: #042b4b;
    height: 320px;
    max-width: 320px;
    /* Base width */
    z-index: 0;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    transform: translateY(0) scale(1);
    position: relative;
    overflow: hidden;

    /* Hardware acceleration & optimized transitions */
    will-change: transform, max-width, box-shadow;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Pseudo element for gradient transitions (much more performant than animating background) */
.dynamic-hover-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #1543B4, #244ab0);
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
    pointer-events: none;
}

/* Ensure contents stay above pseudo background */
.dynamic-hover-card>* {
    position: relative;
    z-index: 10;
}

/* On hover, take on the "active/highlighted" design */
.dynamic-hover-card:hover {
    max-width: 325px;
    /* Keep horizontal expansion minimal */
    z-index: 20;
    /* Pop to front */
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25), 0 0 25px rgba(249, 115, 22, 0.3);
    transform: translateY(-4px) scale(1.01);
}

.dynamic-hover-card:hover::before {
    opacity: 1;
}

/* Base button styling (matches 'Click Here' button) */
.dynamic-hover-card .card-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: bold;
    padding: 0.625rem 1.5rem;
    /* py-2.5 px-6 */
    border-radius: 9999px;
    min-width: fit-content;
    width: max-content;
    font-size: 0.875rem;
    /* text-sm */
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hovered button styling (matches "Connect on WhatsApp" button) */
.dynamic-hover-card:hover .card-btn {
    background-color: white;
    color: #2326a9;
    padding: 0.75rem 1.5rem;
    /* py-3 px-6 */
    width: 100%;
    /* expands to full width */
    border-color: white;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Adjust card icon color */
.dynamic-hover-card:hover .card-icon {
    color: white !important;
}

/* Light text transition */
.dynamic-hover-card:hover .card-text-light {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Divider line transition */
.dynamic-hover-card:hover .card-divider {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* Desktop spacing adjustments because we removed inline styles */
@media (min-width: 768px) {
    .center-card {
        z-index: 10;
    }
}

.dynamic-hover-card .card-btn {
    text-align: center;
    box-sizing: border-box;
    /* Ensure padding doesn't affect 100% width negatively */
}

/* Ensure flex container handles the expanding widths gracefully */
.contact-cards-container {
    align-items: center;
}

/* Multi-step Form Active States */
.select-option.active-option {
    background-color: rgba(37, 99, 235, 0.15);
    /* Tailwind brand-blue with opacity */
    border-color: rgba(37, 99, 235, 0.8);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.5);
}

.select-option.active-option .text-gray-300,
.select-option.active-option .text-gray-400 {
    color: white;
}

/* Premium Input & Autofill Fixes */
.premium-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #3b82f6;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

/* Force Autofill to stay dark/themed */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #0a192f inset !important;
    transition: background-color 5000s ease-in-out 0s;
}
/* =========================================
   Window Frame Hover Cards UI
   ========================================= */

.window-frame-card {
    will-change: transform, box-shadow;
    transform: translateZ(0); /* Force hardware acceleration */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.window-frame-card:hover {
    transform: translateY(-8px);
}

/* Base timing and easing for the sliding glass pane */
.frame-glass {
    will-change: transform;
    transition-property: transform;
    transition-duration: 0.6s;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base timing and easing for the glowing border frame */
.frame-border {
    will-change: transform;
    transition-property: transform;
    transition-duration: 0.7s;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ensure child elements inside card buttons don't block clicks */
.window-frame-card button *, 
.window-frame-card a * {
    pointer-events: none;
}
/* =========================================
   Command Center Upgrades
   ========================================= */

/* Scrollable Chip Carousel Mask */
.chip-carousel-mask {
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

/* Minimalist AI Thinking Dots */
.ai-thinking-dot {
    animation: aiThink 1.4s infinite ease-in-out both;
}
.ai-thinking-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-thinking-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes aiThink {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
/* --- ADD TO BOTTOM OF styles.css --- */

/* Fix for Chip Icon Hover */
.suggestion-chip:hover i {
    color: rgb(5, 42, 115);
    transform: translateX(2px);
}

/* Ensure chips are always above the mask for better interaction */
.suggestion-chip {
    position: relative;
    z-index: 50;
    white-space: nowrap;
    user-select: none;
}
/* --- Optimized Chat Bubble UI (Insta DM Style) --- */

#chat-window {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px !important;
    background-color: #ffffff; /* Clean white background */
}

/* Base message bubble */
.chat-msg-container {
    display: flex;
    width: 100%;
    margin-bottom: 4px;
}

.chat-bubble {
    max-width: 75%;
    padding: 10px 16px;
    line-height: 1.5;
    position: relative;
}

/* Agent (Left Side) */
.agent-container {
    justify-content: flex-start;
    gap: 8px;
}

.agent-bubble {
    background: #f1f5f9; /* Soft gray */
    color: #1e293b;
    border-radius: 18px 18px 18px 4px;
    border: 1px solid #e2e8f0;
}

/* User (Right Side) */
.user-container {
    justify-content: flex-end;
}

.user-bubble {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    text-align: left;
}

/* Avatar sizing fix */
.chat-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

/* Chips Carousel Adjustment */
.chip-carousel-mask {
    margin-top: 8px;
    padding-left: 2px;
}

.suggestion-chip {
    font-size: 12px !important; /* Smaller text for chips */
    padding: 6px 12px !important;
}
/* Unified Chat Container */
.command-center-right {
    background: transparent !important; /* Remove any outer gray backgrounds */
}

/* Instagram-style dynamic bubbles */
.chat-msg-container {
    display: flex;
    width: 100%;
    margin-bottom: 8px;
    animation: messageIn 0.3s ease-out forwards;
}

.user-container { justify-content: flex-end; }
.agent-container { justify-content: flex-start; }

.chat-bubble {
    display: inline-block;
    max-width: fit-content;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-bubble {
    background: #0095f6; /* Instagram blue */
    color: white;
    border-radius: 18px 18px 4px 18px;
    margin-left: auto;
}

.agent-bubble {
    background: #efefef; /* Soft gray bubble */
    color: #262626;
    border-radius: 18px 18px 18px 4px;
}

/* Message animation */
@keyframes messageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide scrollbar while keeping functionality */
#chat-window {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#chat-window::-webkit-scrollbar {
    display: none;
}
/* --- Fix for Header Corner Overlap --- */
.command-center-right .flex-1.flex.flex-col > div:first-child {
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
}

/* Ensure the header background doesn't leak over the rounding */
.command-center-right .bg-white.rounded-\[2rem\] {
    isolation: isolate;
}

/* =========================================
   Agent Card Hub Styles
   ========================================= */

/* Base card */
.agent-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    text-align: left;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
    width: 100%;
}

/* Mobile: compact horizontal cards */
@media (max-width: 1023px) {
    .agent-card {
        min-width: 160px;
        width: auto;
        padding: 12px 14px;
    }
    .agent-card-tags {
        display: none !important;
    }
}

.agent-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

/* Active card */
.agent-card.active {
    border-color: var(--agent-color, #1e3a8a);
    background: linear-gradient(135deg, var(--agent-bg, rgba(30,58,138,0.04)), #fff 80%);
    box-shadow: 0 4px 24px color-mix(in srgb, var(--agent-color, #1e3a8a) 15%, transparent);
    transform: translateY(-1px);
}

/* Inherit custom properties from avatar to card level */
.agent-card.active {
    --agent-color: inherit;
    --agent-bg: inherit;
}

/* Inner row layout */
.agent-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* Avatar ring */
.agent-avatar-ring {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    padding: 3px;
    border: 2px solid transparent;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    position: relative;
}

.agent-avatar-ring.active {
    border-color: var(--agent-color, #1e3a8a);
    animation: avatarRingPulse 2.5s ease-in-out infinite;
}

/* Avatar circle */
.agent-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--agent-bg, rgba(30,58,138,0.08));
    color: var(--agent-color, #1e3a8a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.35s ease;
}

.agent-card.active .agent-avatar {
    background: var(--agent-color, #1e3a8a);
    color: #fff;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--agent-color, #1e3a8a) 30%, transparent);
}

/* Agent info */
.agent-info {
    flex: 1;
    min-width: 0;
}

.agent-name {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.agent-card.active .agent-name {
    color: var(--agent-color, #1e3a8a);
}

.agent-role {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 0.01em;
}

/* Status dot */
.agent-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.agent-status-dot.active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,0.4);
    animation: dotPulse 2s ease-in-out infinite;
}

/* Tags row */
.agent-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    padding-left: 58px; /* align with text after avatar */
}

.agent-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: #f1f5f9;
    color: #64748b;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.agent-card.active .agent-tag {
    background: color-mix(in srgb, var(--agent-color, #1e3a8a) 8%, white);
    color: var(--agent-color, #1e3a8a);
    border-color: color-mix(in srgb, var(--agent-color, #1e3a8a) 15%, transparent);
}

/* Animations */
@keyframes avatarRingPulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--agent-color, #1e3a8a) 20%, transparent); }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--agent-color, #1e3a8a) 0%, transparent); }
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.3); }
}

/* Fix inherited custom properties on active card */
.agent-card[data-agent="sales"].active {
    --agent-color: #1e3a8a;
    --agent-bg: rgba(30,58,138,0.04);
}
.agent-card[data-agent="marketing"].active {
    --agent-color: #059669;
    --agent-bg: rgba(5,150,105,0.04);
}
.agent-card[data-agent="dev"].active {
    --agent-color: #7c3aed;
    --agent-bg: rgba(124,58,237,0.04);
}