/* Homepage hero — directory search default + single swap to AI */

.hero-search-box {
    position: relative;
    z-index: 2;
}

.hero-registry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.hero-registry-head__title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(15px, 2vw, 17px);
    font-weight: 600;
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1.35;
}

.hero-registry-head__text {
    max-width: 16rem;
}

.hero-registry-head__title i {
    font-size: 17px;
    opacity: 0.92;
    flex-shrink: 0;
}

.hero-swap-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #0d9488 100%);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.hero-swap-ai-btn__label {
    font-size: 14px;
    font-weight: 700;
}

.hero-swap-ai-btn__sub {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.92;
}

.hero-swap-ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.hero-swap-ai-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

.hero-swap-ai-btn i {
    font-size: 15px;
}

.hero-ai-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.hero-ai-head__brand {
    flex: 1 1 200px;
    min-width: 0;
}

.hero-ai-head__title {
    margin: 0 0 4px;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(15px, 2.2vw, 17px);
    font-weight: 700;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.hero-ai-head__title i {
    color: #0d9488;
    font-size: 16px;
}

.hero-ai-head__accent {
    color: #0d9488;
    font-weight: 700;
}

.hero-ai-head__tagline {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.45;
    max-width: 28rem;
}

.hero-swap-registry-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(13, 148, 136, 0.35);
    background: #fff;
    color: #0f766e;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hero-swap-registry-btn:hover {
    background: #f0fdfa;
    border-color: #0d9488;
}

.hero-ai-head__hint {
    display: none;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    align-items: center;
    gap: 8px;
    line-height: 1.35;
}

.hero-ai-head__hint i {
    color: #2563eb;
}

.hero-mode-panel--ai[hidden] {
    display: none !important;
}

.hero-mode--ai .hero-mode-panel--registry {
    display: none !important;
}

.search-box:has(.hero-mode--ai) .filters {
    display: none !important;
}

.hero-mode--registry .hero-mode-panel--ai {
    display: none !important;
}

.hero-search-box .search-box-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.hero-search-box .search-tabs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.hero-search-box .search-tab {
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.hero-search-box .search-tab i {
    margin-right: 4px;
    font-size: 11px;
    opacity: 0.85;
}

.hero-search-box .search-tab:hover {
    border-color: rgba(13, 148, 136, 0.35);
    color: #0f766e;
}

.hero-search-box .search-tab.active {
    background: linear-gradient(135deg, #0d9488, #059669);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.28);
}

.hero-search-box .search-inputs {
    display: grid !important;
}

@media (max-width: 640px) {
    .hero-registry-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-swap-ai-btn {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .hero-registry-head__text {
        max-width: none;
    }

    .hero-ai-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-search-box .search-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-swap-ai-btn,
    .hero-search-box .search-tab {
        transition: none;
    }
    .hero-swap-ai-btn:hover {
        transform: none;
    }
}

/* Registry search must stay visible (overrides legacy global rules) */
.hero-search-box.hero-mode--registry .hero-mode-panel--registry .search-box-top {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

.hero-search-box.hero-mode--registry .hero-mode-panel--registry .search-tabs {
    display: flex !important;
}

.hero-search-box.hero-mode--registry .hero-mode-panel--registry .search-inputs {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

@media (max-width: 768px) {
    .hero-search-box.hero-mode--registry .hero-mode-panel--registry .search-inputs {
        display: flex !important;
        flex-direction: column !important;
    }

    .hero-search-box.hero-mode--registry .hero-mode-panel--registry .search-actions-row {
        display: grid !important;
    }
}
