/* HostFlow — Domain Search Popup */

.hf-domain-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    width: 1400px;
    max-width: 95vw;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: hfFadeIn 0.2s ease-out;
}

@keyframes hfFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Overlay darkens the background */
.hf-domain-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Popup header */
.hf-domain-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--color-primary, #f6593a);
    border-bottom: none;
}

.hf-domain-popup-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.hf-domain-popup-close {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    color: #fff;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}

.hf-domain-popup-close:hover {
    background: rgba(255,255,255,0.35);
}

/* Results list */
.hf-domain-results {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

.hf-domain-result {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    gap: 12px;
}

.hf-domain-result:nth-child(even) {
    background: #f9fafb;
}

.hf-domain-result:last-child {
    border-bottom: none;
}

/* Status icon */
.hf-domain-status {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.hf-domain-status--available {
    background: #e8f5e9;
    color: #2e7d32;
}

.hf-domain-status--taken {
    background: #ffebee;
    color: #c62828;
}

/* Flag */
.hf-domain-flag {
    flex-shrink: 0;
    width: 32px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hf-domain-flag .fi {
    font-size: 1.5em;
    line-height: 1;
    border-radius: 2px;
}

.hf-domain-flag .fa-solid {
    font-size: 1.2rem;
    color: #999;
}

.hf-domain-flag .fa-robot {
    color: #d4a017;
}

/* Domain name */
.hf-domain-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
}

.hf-domain-tld {
    color: #999;
    font-weight: 400;
}

.hf-domain-result--taken .hf-domain-name {
    color: #999;
}

/* Action button */
.hf-domain-action {
    flex-shrink: 0;
    text-align: center;
}

.hf-domain-action .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 44px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    cursor: pointer;
    border: none;
}

.hf-domain-action .btn-loading {
    background: #e0e0e0;
    color: transparent;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hf-domain-action .btn-register {
    background: #2e7d32;
    color: #fff;
}

.hf-domain-action .btn-register:hover {
    background: #1b5e20;
    transform: translateY(-1px);
}

.hf-domain-action .btn-taken {
    background: #fff0f0;
    color: #c62828;
    cursor: default;
    pointer-events: none;
    border: 1px solid #f5d5d5;
}

/* Loading state */
.hf-domain-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    color: #999;
    gap: 10px;
}

.hf-domain-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #333;
    border-radius: 50%;
    animation: hfSpin 0.6s linear infinite;
}

@keyframes hfSpin {
    to { transform: rotate(360deg); }
}

/* Error state */
.hf-domain-error {
    padding: 20px;
    text-align: center;
    color: #c62828;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    .hf-domain-result {
        flex-wrap: wrap;
        gap: 8px;
    }

    .hf-domain-name {
        flex-basis: calc(100% - 36px);
    }

    .hf-domain-action {
        width: 100%;
        min-width: auto;
    }

    .hf-domain-action .btn {
        width: 100%;
    }
}
