/* 
   WOVEN CORE STYLES
   Consolidated from indexnew.php for site-wide use.
*/

body { font-family: 'Satoshi', sans-serif; overflow-x: hidden; scroll-behavior: smooth; }
h1, h2, h3, h4, h5, h6 { font-family: 'Satoshi', sans-serif; }

/* Backwards-compat: map legacy utility class `font-geist` to Satoshi */
.font-geist { font-family: 'Satoshi', sans-serif !important; }
h1, h2, h3, h4, h5, h6 { font-family: 'Satoshi', sans-serif; }

/* High-Converting Buttons */
.sales-btn {
    background: linear-gradient(135deg, #ff8200 0%, #e67500 100%);
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 10px 20px -5px rgba(255, 130, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.sales-btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: rgba(255,255,255,0.2);
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.6s ease;
}
.sales-btn:hover::after { transform: rotate(45deg) translateY(100%); }
.sales-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px -8px rgba(255, 130, 0, 0.6);
}

.sales-btn-outline {
    background: transparent;
    color: #ff8200;
    border: 2px solid #ff8200;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}
.sales-btn-outline:hover {
    background: #fff4e6;
    transform: translateY(-2px);
}

/* Interactive Tabs */
.tab-btn { -webkit-tap-highlight-color: transparent; }
.tab-btn.active {
    background-color: #ff8200;
    color: white;
    box-shadow: 0 8px 15px rgba(255, 130, 0, 0.25);
    transform: translateY(-2px);
    border-color: #ff8200;
}
.tab-content { display: none; animation: fadeInUp 0.4s ease forwards; }
.tab-content.active { display: grid; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input styling */
.form-input-line {
    border: none;
    border-bottom: 2px solid #e5e7eb;
    background: transparent;
    outline: none;
    transition: border-color 0.3s ease;
    border-radius: 0;
}
.form-input-line:focus { border-bottom-color: #ff8200; }

/* Mobile Menu Transitions */
#mobileMenu { transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.hamburger-line { transition: transform 0.3s ease, opacity 0.3s ease; transform-origin: center; }
.menu-open .line-1 { transform: translateY(8px) rotate(45deg); }
.menu-open .line-2 { opacity: 0; }
.menu-open .line-3 { transform: translateY(-8px) rotate(-45deg); }

/* Removed global cursor:none to preserve accessibility; cursor is enabled only
    for the small custom cursor elements when JS toggles `body.desktop-cursor`. */
#cur {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #1d7a7a;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    mix-blend-mode: difference;
    top: 0;
    left: 0;
    will-change: transform;
    display: none; /* Hidden by default, shown via JS on desktop */
}
body.desktop-cursor #cur { display: block; }

#cur-trail {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(29, 122, 122, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999998;
    transform: translate(-50%, -50%);
    top: 0;
    left: 0;
    will-change: transform;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    display: none;
}
body.desktop-cursor #cur-trail { display: block; }

/* ── SUPERCHARGED CSS-ONLY CURSOR STATES ── */
body:has(a:hover, button:hover, input:hover, textarea:hover, .sug-pill:hover, #dynamic-island:hover, #left-ai-tag:hover) #cur { width: 16px !important; height: 16px !important; }
body:has(a:hover, button:hover, input:hover, textarea:hover, .sug-pill:hover, #dynamic-island:hover, #left-ai-tag:hover) #cur-trail { width: 60px !important; height: 60px !important; border-color: rgba(255,130,0,.6) !important; }

body:has(#island-panel:hover):not(:has(a:hover, button:hover, input:hover, textarea:hover, .sug-pill:hover)) #cur { width: 14px !important; height: 14px !important; }
body:has(#island-panel:hover):not(:has(a:hover, button:hover, input:hover, textarea:hover, .sug-pill:hover)) #cur-trail { width: 52px !important; height: 52px !important; border-color: rgba(179,136,255,.6) !important; }

#neural { position: fixed; inset: 0; z-index: 10; pointer-events: none; opacity: 0.6; }

/* Dark Mode Transitions */
.dark .bg-white { background-color: #0f172a !important; }
.dark .bg-slate-50 { background-color: #020617 !important; }
.dark .text-dark { color: #f8fafc !important; }
.dark .text-gray-600 { color: #94a3b8 !important; }
.dark .text-gray-500 { color: #64748b !important; }
.dark .border-gray-100 { border-color: #1e293b !important; }

/* Theme Toggle Button */
.theme-toggle {
    cursor: pointer; padding: 8px; border-radius: 50%;
    transition: background 0.3s; display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: rgba(0,0,0,0.05); }
.dark .theme-toggle:hover { background: rgba(255,255,255,0.1); }

/* --- AI Assistant Styles --- */
.ai-highlight { position: relative; transition: all 0.5s ease; }
.ai-highlight::after {
    content: ''; position: absolute; inset: -8px; border-radius: 12px;
    background: linear-gradient(90deg, #4285f4, #b388ff, #ff8a80);
    z-index: -1; opacity: 0; transition: opacity 0.5s ease; filter: blur(8px);
}
.ai-highlight.active::after { opacity: 0.7; animation: pulseGlow 2s infinite; }

/* ── Scrollbar ── */
.custom-scrollbar::-webkit-scrollbar { width: 3px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* ── Typing cursor ── */
.ai-typing-cursor::after { content: '▌'; animation: blink 1s step-start infinite; color: #b388ff; }
@keyframes blink { 50% { opacity: 0; } }

/* ── Suggestion pills ── */
.sug-pill { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.sug-pill:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(179,136,255,0.2); }

/* ── Date/Time Picker Input Styling ── */
input[type="date"], input[type="time"] {
    padding: 0.75rem 2.75rem 0.75rem 1rem !important;
    border-radius: 1rem !important;
    border: 1px solid rgba(148, 163, 184, 0.6) !important;
    background-color: rgba(255, 255, 255, 0.85) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 1.4rem 1.4rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="date"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M6 2a1 1 0 0 1 1 1v1h10V3a1 1 0 1 1 2 0v1h1a2 2 0 0 1 2 2v2H4V6a2 2 0 0 1 2-2h1V3a1 1 0 0 1 1-1zm13 7H4v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Zm-2 2v7H6v-7h12Z'/></svg>"); }
input[type="time"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm1 11.414V7a1 1 0 0 0-2 0v6a1 1 0 0 0 .293.707l3 3a1 1 0 0 0 1.414-1.414Z'/></svg>"); }

input[type="date"]:focus, input[type="time"]:focus {
    outline: none !important;
    border-color: #1d7a7a !important;
    box-shadow: 0 0 0 4px rgba(29, 122, 122, 0.12) !important;
}

.dark input[type="date"],
.dark input[type="time"] {
    background-color: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: #f8fafc !important;
}

.dark input[type="date"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M6 2a1 1 0 0 1 1 1v1h10V3a1 1 0 1 1 2 0v1h1a2 2 0 0 1 2 2v2H4V6a2 2 0 0 1 2-2h1V3a1 1 0 0 1 1-1zm13 7H4v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Zm-2 2v7H6v-7h12Z'/></svg>"); }
.dark input[type="time"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm1 11.414V7a1 1 0 0 0-2 0v6a1 1 0 0 0 .293.707l3 3a1 1 0 0 0 1.414-1.414Z'/></svg>"); }

/* Ensure FontAwesome icons inside dashboard page views inherit the current theme text color
   so calendar/clock icons flip between dark (white) and light (dark) automatically. */
.page-view i[class*="fa-"], .page-view .fa, .icon-container i[class*="fa-"], .sidebar-item i[class*="fa-"] {
    color: inherit !important;
    transition: color 0.12s ease;
}

/* Reinforce that date/time input SVGs use the element color */
input[type="date"], input[type="time"] { -webkit-text-fill-color: currentColor; }

/* Ensure calendar/clock icons inside dashboard content follow surrounding text color
   (makes them white in dark mode and dark in light mode). Targets common dashboard
   containers so we don't globally override intentionally-colored icons. */
main i[class*="fa-calendar"], main i[class*="fa-clock"], main i[class*="fa-time"],
main i[class*="fa-regular fa-calendar"], main i[class*="fa-regular fa-clock"],
main .stat-card i, main .ev-card i, main .agenda-day-header i, main .view-btn i {
    color: inherit !important;
}

/* ═══════════════════════════════════════════════
   CONSOLIDATED FROM THEME.CSS & PAGE INLINE STYLES
   ════════════════════════════════════════════════ */

/* Accessibility: focus ring only on keyboard navigation (not mouse clicks) */
:focus-visible {
    outline: 3px solid rgba(29,122,122,0.24);
    outline-offset: 3px;
}
:focus:not(:focus-visible) {
    outline: none;
}

/* Skip link (visually hidden, appears on keyboard focus) */
.skip-link {
    position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
    left: 1rem; top: 1rem; width: auto; height: auto; z-index: 99999;
    background: #ffffff; color: #111827; padding: .5rem .75rem; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Toast / live region container (hidden by default) */
#toast-container { position: fixed; bottom: 1rem; right: 1rem; z-index: 999999; pointer-events: none; }
#toast-container .toast { pointer-events: auto; margin-top: .5rem; }

/* ── Theme Button Variants (from theme.css) ── */
.themeBtn {
    color: #fff;
    background-color: #0d9488;
    padding: 10px 27px;
    border-radius: 8px;
    transition: 0.3s ease-in-out;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.themeBtn:hover { background-color: #36454f; }

.themeGreenBtn {
    color: #fff;
    background-color: #35cf68;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 5px 6px rgba(0,0,0,0.61);
    border: solid 1px #36454f;
    transition: 0.3s ease-in-out;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.themeGreenBtn:hover { background-color: #36454f; }

/* ── Background Utility Classes (from theme.css) ── */
.bg-rosePink { background-color: #fddae4; }
.bg-lite-yellow { background-color: #fdfcda; }
.bg-lite-teal { background-color: #b9f8f3; }

/* ── Navigation Helpers ── */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    padding-left: 1rem;
}
.mobile-submenu.open { max-height: 500px; }

.burger-icon span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 9999px;
    transition: all 0.3s ease-in-out;
}
.burger-icon span:nth-child(2) { margin: 5px 0; }
.burger-icon.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-icon.open span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.burger-icon.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.submenu.open-desktop { opacity: 1 !important; visibility: visible !important; transform: scale(1) !important; }

/* ── Cookie Modal ── */
.modal-overlay { z-index: 9999; }
.modal-container { max-height: 90vh; overflow-y: auto; }
.toggle-checkbox {
    left: 0;
    transition: left 0.2s ease-in-out, border-color 0.2s ease-in-out;
    top: 0;
    margin: 0;
}
.toggle-checkbox:checked { left: 16px; border-color: #1d7a7a; }
.toggle-label { transition: background-color 0.2s ease-in-out; }
.toggle-checkbox:checked + .toggle-label { background-color: #1d7a7a; }

/* ── Card Hover (common pattern) ── */
.card {
    padding: 10px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.1);
}

/* ── Home Hero ── */
.hero-container { min-height: 75vh; position: relative; overflow: hidden; }
.content-wrapper { position: relative; z-index: 10; overflow: hidden; }
@media (max-width: 1023px) {
    .hero-container::before { width: 100%; height: 60%; background-repeat: no-repeat; background-position: left; }
    .single-image-container { height: 24rem; }
}

/* ── Common Utility ── */
.assistant_url { font-weight: 700; color: #1d7a7a; cursor: pointer; padding: 5px; }

/* ── No focus ring on animated logo (prevents teal browser outline during animation) ── */
.woven-animated-logo,
.woven-animated-logo:focus,
.woven-animated-logo:focus-visible,
.woven-animated-logo * { outline: none !important; box-shadow: none !important; }

/* ── Theme Toggle Icons — CSS only, no JS manipulation ── */
.theme-icon-moon { display: inline; }
.theme-icon-sun  { display: none; }
html.dark .theme-icon-moon { display: none; }
html.dark .theme-icon-sun  { display: inline; }

/* ── Dark-Mode Grain Texture ── */
html.dark body::after,
.dark body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.028;
}

/* ── Mask / Fade Utilities ── */
.mask-image-bottom {
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}

/* ── Off-canvas (settings panel, no scrollbar) ── */
.off-canvas-menu { scrollbar-width: none; -ms-overflow-style: none; }
.off-canvas-menu::-webkit-scrollbar { display: none; }

/* ── Scroll Highlight ── */
.woven-scroll-highlight {
    outline: 2px solid rgba(29,122,122,0.4);
    outline-offset: 4px;
    border-radius: 8px;
    transition: outline-color 0.5s ease;
}

/* ── Reduced-motion: disable all heavy animations/transitions ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    #neural, #confettiCanvas { display: none !important; }
}
