/* ============================================
   SNAPPYNAME - Generator Styles
   ============================================ */

/* ============================================
   CSS VARIABLES - Dark Theme Harmonization
   ============================================ */
:root {
    /* Core Colors - Inherited from landing.css */
    --bg-page: #000000;
    --text-primary: #ffffff;
    --text-secondary: #9aa0a6;
    --text-tertiary: rgba(255, 255, 255, 0.4);

    /* Primary Amber/Orange */
    --google-blue: #f59e0b;
    --google-blue-dark: #ea580c;
    --blue-light: #f59e0b;

    /* Gradient Amber */
    --gradient-gemini-start: #f59e0b;
    --gradient-gemini-mid: #f97316;
    --gradient-gemini-end: #ea580c;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.2);
    --glass-border-active: rgba(245, 158, 11, 0.4);

    /* Glow Effects */
    --glow-blue: rgba(245, 158, 11, 0.4);
    --glow-blue-strong: rgba(245, 158, 11, 0.6);
    --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.3);
    --shadow-glow-strong: 0 0 60px rgba(245, 158, 11, 0.5);

    /* UI Components */
    --nav-bg: rgba(60, 64, 67, 0.90);

    /* Dimensions */
    --radius-pill: 100px;
    --radius-card: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

/* ============================================
   PERFORMANCE FIX - Disable backdrop-blur globally
   backdrop-blur is GPU-intensive and causes high CPU usage.
   ============================================ */
*,
*::before,
*::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}


/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade in animation for results */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

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

@keyframes blinkSlow {

    0%,
    30%,
    70%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.animate-blink-slow {
    /* Re-enabled: lightweight opacity animation on small text element */
    animation: blinkSlow 1.5s ease-in-out infinite;
}

@keyframes scalePulse {
    0% {
        transform: scale(1);
        color: #fb923c;
    }

    20% {
        transform: scale(1);
        color: #fb923c;
    }

    40% {
        transform: scale(1.04);
        color: #1a1a1a;
    }

    100% {
        transform: scale(1);
        color: #fb923c;
    }
}

.animate-scale-pulse {
    animation: scalePulse 0.30s ease-out;
}

/* Drill-down slide animations */
@keyframes slideFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.drill-slide-forward {
    animation: slideFromRight 0.25s ease-out;
}

.drill-slide-backward {
    animation: slideFromLeft 0.25s ease-out;
}

/* ============================================
   RESULTS TABLE
   ============================================ */

.results-table-header {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 52px; /* sits just below the sticky toolbar */
    z-index: 10;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.results-table-header span {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
}

.results-table-body {
    /* No scroll — list flows full length on the page */
}

.overlay-scrollable {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

.overlay-scrollable::-webkit-scrollbar {
    width: 6px;
}

.overlay-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.overlay-scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 3px;
}

.overlay-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

.combobox-dropdown {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

.combobox-dropdown::-webkit-scrollbar {
    width: 6px;
}

.combobox-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.combobox-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 3px;
}

.combobox-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

.result-row {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease,
        border-color 0.15s ease;
    animation: fadeIn 0.15s ease-out forwards;
    opacity: 0;
}

.result-row:hover {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.15);
}

.result-row .row-name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.15s ease;
}

.result-row:hover .row-name {
    color: rgb(251, 191, 36);
}

.result-row .row-pattern {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.result-row .row-length {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    font-variant-numeric: tabular-nums;
}

/* Row action buttons */
.result-row .row-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.result-row .row-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.15s ease;
}

.result-row .row-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

.result-row .row-action-btn.active {
    background: rgba(251, 191, 36, 0.15);
    color: rgb(251, 191, 36);
    border-color: rgba(251, 191, 36, 0.3);
}

.result-row .row-action-btn.active-swap {
    background: rgba(249, 115, 22, 0.15);
    color: rgb(249, 115, 22);
    border-color: rgba(249, 115, 22, 0.3);
}

.result-row .row-action-btn.active-connector {
    background: rgba(249, 115, 22, 0.15);
    color: rgb(249, 115, 22);
    border-color: rgba(249, 115, 22, 0.3);
}

.result-row .row-action-btn.active-connector-off {
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    border-color: transparent;
}

.result-row .row-action-btn.check-btn {
    background: rgba(245, 158, 11, 0.9);
    color: white;
    border-color: transparent;
}

.result-row .row-action-btn.check-btn:hover {
    background: rgb(245, 158, 11);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Hide pattern and length columns on small screens */
@media (max-width: 767px) {

    .results-table-header .col-pattern,
    .results-table-header .col-length,
    .result-row .col-pattern,
    .result-row .col-length {
        display: none;
    }
}

/* Result rows stagger effect (first 15 rows) */
.result-row:nth-child(1) {
    animation-delay: 0ms;
}

.result-row:nth-child(2) {
    animation-delay: 15ms;
}

.result-row:nth-child(3) {
    animation-delay: 30ms;
}

.result-row:nth-child(4) {
    animation-delay: 45ms;
}

.result-row:nth-child(5) {
    animation-delay: 60ms;
}

.result-row:nth-child(6) {
    animation-delay: 75ms;
}

.result-row:nth-child(7) {
    animation-delay: 90ms;
}

.result-row:nth-child(8) {
    animation-delay: 105ms;
}

.result-row:nth-child(9) {
    animation-delay: 120ms;
}

.result-row:nth-child(10) {
    animation-delay: 135ms;
}

.result-row:nth-child(11) {
    animation-delay: 150ms;
}

.result-row:nth-child(12) {
    animation-delay: 165ms;
}

.result-row:nth-child(13) {
    animation-delay: 180ms;
}

.result-row:nth-child(14) {
    animation-delay: 195ms;
}

.result-row:nth-child(15) {
    animation-delay: 210ms;
}

/* ============================================
   DNS AVAILABILITY BADGES
   ============================================ */

.dns-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 9999px;
    white-space: nowrap;
    line-height: 1;
}

.dns-checking {
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: pulse 1.5s ease-in-out infinite;
}

.dns-available {
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.dns-taken {
    color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.dns-error {
    color: rgba(251, 191, 36, 0.6);
    background: transparent;
    border: none;
    padding: 2px;
}

.dns-pending {
    color: rgba(255, 255, 255, 0.15);
    background: transparent;
    border: none;
    font-size: 11px;
}

/* Available row subtle highlight */
.result-row:has(.dns-available) {
    background: rgba(52, 211, 153, 0.03);
}

.result-row:has(.dns-available):hover {
    background: rgba(52, 211, 153, 0.07);
    border-color: rgba(52, 211, 153, 0.15);
}

.result-row:has(.dns-available):hover .row-name {
    color: #34d399;
}

/* Spin animation for DNS checking spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   BOTTOM BAR
   ============================================ */

/* Bottom bar slide up */
.bottom-bar {
    animation: slideUp 0.3s ease-out forwards;
}

/* Pulse effect on generate button when ready - DISABLED for CPU optimization */
/* .pulse-ready {
    animation: pulse 2s ease-in-out infinite;
} */

/* ============================================
   CUSTOM SCROLLBAR - Dark Blue Theme
   ============================================ */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--glass-bg);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--glow-blue);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--google-blue);
}

/* ============================================
   RESPONSIVE - GENERATOR
   ============================================ */

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .config-panel {
        max-height: 500px;
    }
}

/* ============================================
   COMPONENT ENHANCEMENTS
   ============================================ */

/* Header input glow effect */
.input-container:focus-within {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

/* Word button hover effect */
.word-btn {
    transition: all 0.15s ease;
}

.word-btn:hover {
    transform: scale(1.05);
}

.word-btn.selected {
    box-shadow: 0 0 0 2px var(--color-primary);
}



/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

/* Accordion transition */
.accordion-content {
    transition: max-height 0.3s ease;
    overflow: hidden;
}

/* Tab indicator */
.tab-indicator {
    transition: transform 0.2s ease, width 0.2s ease;
}

/* Dialog backdrop */
.dialog-backdrop {
    transition: opacity 0.2s ease;
}

/* Badge remove button */
.badge-remove {
    transition: color 0.15s ease;
}

.badge-remove:hover {
    color: #dc2626;
}

/* ============================================
   COMBOBOX COMPONENT (shadcn/ui style)
   ============================================ */

/* Combobox popover animations */
@keyframes comboboxFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-in {
    animation: comboboxFadeIn 200ms ease-out forwards;
}

/* Smooth fade for better UX */
.fade-in-0 {
    animation-timing-function: ease-out;
}

.zoom-in-95 {
    transform-origin: top center;
}

/* Combobox option hover effect */
.combobox-option {
    cursor: pointer;
    transition: background-color 150ms ease;
}

.combobox-option:hover {
    background-color: rgb(237 233 254);
    /* violet-100 */
}

.combobox-option-selected {
    background-color: rgb(124 58 237);
    /* violet-600 */
    color: white;
}

/* Chevron icon rotation animation */
.combobox-chevron {
    transition: transform 200ms ease;
}

.combobox-chevron-open {
    transform: rotate(180deg);
}

/* Improve combobox z-index layering */
.combobox-popover {
    z-index: 50;
}

/* Combobox trigger focus ring enhancement */
.combobox-trigger:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-color: var(--color-primary);
}

/* ============================================
   ACCESSIBILITY - Reduced Motion Support
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   RESPONSIVE: Tablet Actions (<= 1024px)
   ============================================ */

/* Default: full labels visible, short labels hidden */
.label-short { display: none !important; }
.label-full { display: inline !important; }
.actions-col { width: 460px !important; }
.connector-btn { width: 75px !important; }

@media (max-width: 1024px) {
    .label-short { display: inline !important; }
    .label-full { display: none !important; }
    .actions-col { width: 260px !important; }
    .connector-btn { width: 55px !important; }
}