/*
 * UIKit Dark Theme Overrides
 * 
 * This file contains style overrides for UIKit components in dark theme.
 * Use [data-theme="dark"] selector for dark theme specific styles.
 */

/* ============================================
   UIKit Checkbox Overrides (CTA scope)
   ============================================ */

.cta-checkbox-scope input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.96) !important;
    border-radius: 4px !important;
    background: transparent !important;
    accent-color: #0052FF !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.cta-checkbox-scope input[type="checkbox"]:checked {
    background-color: #0052FF !important;
    border-color: #0052FF !important;
}

.cta-checkbox-scope input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(0, 82, 255, 0.55) !important;
    outline-offset: 2px !important;
}

.cta-checkbox-scope input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 1) !important;
}

/* UIKit Checkbox row: top-align with multi-line label; gap matches former flex gap-3 */
.cta-checkbox-scope .flex.items-center {
    align-items: flex-start !important;
    gap: 0.75rem !important;
}

/* UIKit label utilities (text-gray-900, text-sm, font-medium, ms-2) → Figma CTA typography */
.cta-checkbox-scope label {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 130% !important;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-inline-start: 0 !important;
    cursor: pointer !important;
}

/* ============================================
   Dark Theme Overrides
   ============================================ */

[data-theme="dark"] {
    /* Add dark theme specific overrides here */
}

/* ============================================
   Home testimonial carousel (UIKit) — mobile spacing
   Main height fix: fade slides in UIKit; this tightens below-controls row on small viewports.
   ============================================ */

@media (max-width: 640px) {
    .home-testimonial-section .home-testimonials-carousel [aria-label="Slide controls"] {
        margin-top: 1.5rem !important;
        gap: 1rem !important;
    }
}

/* ============================================
   MarketingSite footer dropdown (UIKit DropdownMenu)
   Keep current footer styling across dark/light + RTL + mobile.
   ============================================ */

.footer-root .footer-company-dropdown {
    display: inline-flex;
}

/* Trigger should look like existing footer inline button link */
.footer-root .dropdown-menu-wrapper.footer-company-dropdown > button,
.footer-root .footer-company-dropdown > button {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font: inherit !important;
    color: inherit !important;
    line-height: inherit !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

/* Let `.footer-link:hover` drive hover color on the inner label */
.footer-root .footer-company-dropdown > button:hover {
    color: inherit !important;
}

.footer-root .dropdown-menu-wrapper.footer-company-dropdown > button:focus-visible,
.footer-root .footer-company-dropdown > button:focus-visible {
    outline: 2px solid rgba(0, 82, 255, 0.55) !important;
    outline-offset: 2px !important;
}

/* RTL: chevron should be on the opposite side of the label */
html[dir="rtl"] .footer-root .dropdown-menu-wrapper.footer-company-dropdown > button,
html[dir="rtl"] .footer-root .footer-company-dropdown > button {
    flex-direction: row-reverse !important;
}

/* Ensure the chevron tracks the same color as the label */
.footer-root .footer-company-chevron {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.footer-root .footer-company-dropdown > button:hover .footer-company-chevron {
    color: #ffffff;
}

[data-theme="light"] .footer-root .footer-company-chevron {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .footer-root .footer-company-dropdown > button:hover .footer-company-chevron {
    color: #1c1e21;
}

/* Menu container: match previous hard-coded menu surface */
.footer-root .footer-company-dropdown [role="menu"] {
    background-color: #1f2937 !important; /* gray-800 */
    border: 1px solid #374151 !important; /* gray-700 */
    border-radius: 0.5rem !important;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important; /* shadow-xl */
    width: 10rem !important; /* w-40 */
    padding: 0.5rem 0 !important; /* py-2 */
}

/* Keep UIKit mobile positioning behavior (don't override position/left/right/width there) */
@media (max-width: 640px) {
    .footer-root .footer-company-dropdown [role="menu"] {
        width: auto !important;
    }
}

[data-theme="light"] .footer-root .footer-company-dropdown [role="menu"] {
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Menu list spacing: keep tight like original */
.footer-root .footer-company-dropdown [role="menu"] > ul {
    padding: 0 !important;
}

/* Items: match previous hover + colors */
.footer-root .footer-company-item {
    padding: 0.5rem 0.75rem !important; /* px-3 py-2 */
    color: #d1d5db !important; /* gray-300 */
    justify-content: flex-start !important;
    text-align: left !important;
}

html[dir="rtl"] .footer-root .footer-company-item {
    text-align: right !important;
}

.footer-root .footer-company-item:hover,
.footer-root .footer-company-item:focus {
    background-color: rgba(55, 65, 81, 0.5) !important; /* gray-700/50 */
    color: #ffffff !important;
}

[data-theme="light"] .footer-root .footer-company-item {
    color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .footer-root .footer-company-item:hover,
[data-theme="light"] .footer-root .footer-company-item:focus {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #1c1e21 !important;
}

/* ============================================
   MarketingSite header dropdown + mobile company accordion (UIKit)
   ============================================ */

.header-root .header-company-dropdown {
    display: inline-flex;
}

.header-root .dropdown-menu-wrapper.header-company-dropdown > button,
.header-root .header-company-dropdown > button,
.header-root .header-company-trigger {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.header-root .header-company-dropdown > button:hover,
.header-root .header-company-trigger:hover {
    color: #ffffff !important;
}

.header-root .header-company-dropdown [role="menu"] {
    width: 380px !important;
    margin-top: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px !important;
    padding: 8px !important;
}

.header-root .header-company-dropdown [role="menu"] > ul {
    gap: 6px !important;
}

.header-root .header-company-item {
    gap: 16px !important;
    padding: 6px !important;
    border-radius: 16px !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.header-root .header-company-item:hover,
.header-root .header-company-item:focus {
    background: rgba(255, 255, 255, 0.08) !important;
}

.header-root .company-dropdown__icon {
    width: 47px;
    height: 47px;
    border-radius: 12px;
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 82, 255, 0.18);
}

.header-root .company-dropdown__icon svg {
    filter: drop-shadow(0 2px 6px rgba(0, 82, 255, 0.2));
}

[data-theme="light"] .header-root .header-company-trigger,
[data-theme="light"] .header-root .header-company-dropdown > button {
    color: rgba(0, 0, 0, 0.7) !important;
}

[data-theme="light"] .header-root .header-company-dropdown [role="menu"] {
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .header-root .header-company-item:hover,
[data-theme="light"] .header-root .header-company-item:focus {
    background-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .header-root .company-dropdown__title {
    color: #1c1e21 !important;
}

[data-theme="light"] .header-root .company-dropdown__desc {
    color: rgba(0, 0, 0, 0.5) !important;
}

.mobile-company-accordion {
    width: 100%;
}

.mobile-company-accordion h2 > button {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-family: 'Heebo', sans-serif !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    line-height: 140% !important;
    text-align: start !important;
}

.mobile-company-accordion h2 > button:hover,
.mobile-company-accordion h2 > button:focus,
.mobile-company-accordion h2 > button:focus-visible {
    background: transparent !important;
}

[data-theme="light"] .mobile-company-accordion h2 > button.hover\:bg-gray-100:hover,
[data-theme="light"] .mobile-company-accordion h2 > button.hover\:bg-gray-100:active,
[data-theme="light"] .mobile-company-accordion h2 > button.hover\:bg-gray-100:focus,
[data-theme="light"] .mobile-company-accordion h2 > button.hover\:bg-gray-100:focus-visible,
[data-theme="light"] .mobile-company-accordion h2 > button[aria-expanded="true"],
[data-theme="light"] .mobile-company-accordion h2 > button[aria-expanded="false"] {
    background-color: transparent !important;
}

.mobile-company-accordion h2 > button > span {
    text-align: start !important;
}

html[dir="rtl"] .mobile-company-accordion h2 > button {
    flex-direction: row-reverse !important;
}

.mobile-company-accordion [role="region"] > div {
    padding: 4px 0 0 !important;
    border-top: none !important;
}

[data-theme="light"] .mobile-company-accordion h2 > button {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* ============================================
   Home testimonial carousel — RTL below-controls arrows
   Older UIKit builds use rtl:-scale-x-100 on both SVGs without dir=ltr on the row, so in Hebrew
   flex swaps button sides and both chevrons flip → inward / wrong semantics. Newer UIKit sets
   dir=ltr on the row and drops the flip; these rules are harmless when that is already in place.
   ============================================ */

html[dir="rtl"] .home-testimonials-carousel [aria-label="Slide controls"] {
    direction: ltr !important;
}

html[dir="rtl"] .home-testimonials-carousel [aria-label="Slide controls"] svg {
    transform: none !important;
}

/* ============================================
   Home testimonial carousel — light mode arrow visibility
   If UIKit applies dark-mode classes (e.g. due to lingering `html.dark`),
   currentColor can become white and arrows disappear on white backgrounds.
   This forces a dark currentColor in light theme.
   ============================================ */

[data-theme="light"] .home-testimonial-section .home-testimonials-carousel [aria-label="Slide controls"] {
    color: #374151 !important; /* gray-700 */
}

[data-theme="light"] .home-testimonial-section .home-testimonials-carousel [aria-label="Slide controls"] svg {
    color: #374151 !important; /* affects currentColor on the path */
}

[data-theme="light"] .home-testimonial-section .home-testimonials-carousel [aria-label="Slide controls"] svg path {
    stroke: #374151 !important;
}
