/* ==========================================================================
   VI Domain Search — Matches "Caribbean Precision" Design System
   ========================================================================== */

.vids {
    --vids-deep-ocean: #0B1D3A;
    --vids-teal: #146C94;
    --vids-caribbean: #19A7CE;
    --vids-caribbean-light: #64CDD5;
    --vids-coral: #FF6B35;
    --vids-coral-hover: #E85A28;
    --vids-sand: #FAF8F5;
    --vids-white: #FFFFFF;
    --vids-gray-100: #F3F4F6;
    --vids-gray-300: #D1D5DB;
    --vids-gray-500: #6B7280;
    --vids-gray-800: #1F2937;
    --vids-gray-900: #111827;
    --vids-green: #059669;
    --vids-green-light: #D1FAE5;
    --vids-red: #DC2626;
    --vids-red-light: #FEE2E2;
    --vids-font-display: 'Bricolage Grotesque', Georgia, serif;
    --vids-font-body: 'Figtree', -apple-system, sans-serif;
    --vids-radius: 12px;
    --vids-radius-lg: 20px;
    --vids-radius-pill: 100px;

    font-family: var(--vids-font-body);
    max-width: 800px;
    margin: 0 auto;
}

/* ---- Search Bar ---- */

.vids__search {
    margin-bottom: 32px;
}

.vids__input-wrap {
    display: flex;
    align-items: center;
    background: var(--vids-white);
    border: 2px solid var(--vids-gray-300);
    border-radius: var(--vids-radius-pill);
    padding: 6px 6px 6px 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.vids__input-wrap:focus-within {
    border-color: var(--vids-caribbean);
    box-shadow: 0 0 0 4px rgba(25, 167, 206, 0.15), 0 4px 24px rgba(25, 167, 206, 0.1);
}

.vids__search-icon {
    width: 22px;
    height: 22px;
    stroke: var(--vids-gray-500);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    margin-right: 12px;
    transition: stroke 0.25s ease;
}

.vids__input-wrap:focus-within .vids__search-icon {
    stroke: var(--vids-caribbean);
}

.vids__input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--vids-font-body);
    font-size: 1.1rem;
    color: var(--vids-gray-900);
    background: transparent;
    min-width: 0;
    padding: 12px 0;
}

.vids__input::placeholder {
    color: var(--vids-gray-500);
    font-weight: 400;
}

.vids__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--vids-coral);
    color: var(--vids-white);
    border: none;
    border-radius: var(--vids-radius-pill);
    font-family: var(--vids-font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.vids__btn:hover {
    background: var(--vids-coral-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(255, 107, 53, 0.45);
}

.vids__btn:active {
    transform: translateY(0);
}

/* Loading spinner */
.vids__spinner {
    display: none;
    width: 20px;
    height: 20px;
    stroke: var(--vids-white);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 47;
    stroke-dashoffset: 47;
    animation: vids-spin 0.8s linear infinite;
}

.vids__btn--loading .vids__btn-text { display: none; }
.vids__btn--loading .vids__spinner { display: block; }
.vids__btn--loading { pointer-events: none; opacity: 0.85; }

@keyframes vids-spin {
    0% { stroke-dashoffset: 47; transform: rotate(0deg); }
    50% { stroke-dashoffset: 12; }
    100% { stroke-dashoffset: 47; transform: rotate(360deg); }
}

.vids__hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--vids-gray-500);
    margin-top: 12px;
}

/* ---- Hero variant (for homepage) ---- */

.vids--hero .vids__input-wrap {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.98);
}

.vids--hero .vids__hint {
    color: rgba(255, 255, 255, 0.6);
}

/* ---- Results ---- */

.vids__results {
    animation: vids-fadeIn 0.4s ease;
}

@keyframes vids-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.vids__results-header {
    margin-bottom: 20px;
}

.vids__results-title {
    font-family: var(--vids-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--vids-gray-900);
}

.vids__results-title span {
    color: var(--vids-caribbean);
}

.vids__results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual result row */
.vids__result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--vids-white);
    border: 1px solid var(--vids-gray-100);
    border-radius: var(--vids-radius);
    transition: all 0.25s ease;
    animation: vids-slideIn 0.4s ease both;
}

@keyframes vids-slideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.vids__result:hover {
    box-shadow: 0 4px 16px rgba(11, 29, 58, 0.08);
}

.vids__result--available {
    border-left: 3px solid var(--vids-green);
}

.vids__result--taken {
    opacity: 0.6;
}

.vids__result--taken:hover {
    opacity: 0.8;
}

/* Domain name display */
.vids__result-domain {
    display: flex;
    align-items: baseline;
    gap: 1px;
    min-width: 0;
}

.vids__result-name {
    font-family: var(--vids-font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--vids-gray-900);
}

.vids__result-tld {
    font-family: var(--vids-font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--vids-caribbean);
}

.vids__result--taken .vids__result-name,
.vids__result--taken .vids__result-tld {
    color: var(--vids-gray-500);
}

/* Status / price / action */
.vids__result-status {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.vids__result-price {
    font-family: var(--vids-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vids-gray-900);
}

.vids__result-period {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--vids-gray-500);
}

/* Badges */
.vids__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--vids-radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.vids__badge--available {
    background: var(--vids-green-light);
    color: var(--vids-green);
}

.vids__badge--taken {
    background: var(--vids-red-light);
    color: var(--vids-red);
}

.vids__badge--premium {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: #92400E;
}

/* Register button */
.vids__result-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: var(--vids-coral);
    color: var(--vids-white) !important;
    border-radius: var(--vids-radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

.vids__result-btn:hover {
    background: var(--vids-coral-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
}

/* Results footer */
.vids__results-footer {
    margin-top: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(25, 167, 206, 0.06), rgba(20, 108, 148, 0.04));
    border-radius: var(--vids-radius);
    text-align: center;
}

.vids__results-footer p {
    color: var(--vids-gray-500);
    font-size: 0.95rem;
    margin: 0;
}

.vids__results-footer a {
    color: var(--vids-caribbean) !important;
    font-weight: 600;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

.vids__results-footer a:hover {
    color: var(--vids-teal) !important;
}

/* ---- Error ---- */

.vids__error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--vids-red-light);
    border: 1px solid #FECACA;
    border-radius: var(--vids-radius);
    color: var(--vids-red);
    font-size: 0.95rem;
    font-weight: 500;
    animation: vids-fadeIn 0.3s ease;
}

.vids__error svg {
    width: 20px;
    height: 20px;
    stroke: var(--vids-red);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
    .vids__input-wrap {
        flex-wrap: wrap;
        border-radius: var(--vids-radius);
        padding: 8px;
        gap: 8px;
    }

    .vids__search-icon {
        margin-left: 8px;
    }

    .vids__input {
        font-size: 1rem;
        padding: 10px 4px;
    }

    .vids__btn {
        width: 100%;
        border-radius: 8px;
        padding: 14px;
    }

    .vids__result {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .vids__result-status {
        width: 100%;
        justify-content: space-between;
    }
}
