/* ===== MODERN DOMAIN SEARCH STYLES ===== */
.whmcs-domain-search-widget {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.whmcs-domain-search-widget.whmcs-domain-fullwidth {
    width: 100%;
}

/* ===== SEARCH FORM ENHANCED ===== */
.whmcs-domain-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
}

.whmcs-domain-input {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 56px;
}

.whmcs-domain-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.15);
    transform: translateY(-1px);
}

.whmcs-domain-input::placeholder {
    color: #8a94a6;
    font-weight: 400;
}

.whmcs-domain-button {
    padding: 16px 32px;
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 56px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
    position: relative;
    overflow: hidden;
}

.whmcs-domain-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.whmcs-domain-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #004499, #003366);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.whmcs-domain-button:hover:not(:disabled)::before {
    left: 100%;
}

.whmcs-domain-button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== LOADING STATES ===== */
.whmcs-loading {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.whmcs-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 102, 204, 0.3);
    border-radius: 50%;
    border-top-color: #0066cc;
    animation: whmcs-spin 0.8s linear infinite;
    margin-right: 12px;
}

@keyframes whmcs-spin {
    to { transform: rotate(360deg); }
}

/* ===== DOMAIN RESULT CARDS - MODERN DESIGN ===== */
.whmcs-domain-result {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whmcs-domain-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.whmcs-domain-available {
    border-top: 4px solid #38a169;
}

.whmcs-domain-taken {
    border-top: 4px solid #e53e3e;
}

.whmcs-domain-error {
    border-top: 4px solid #d69e2e;
}

/* Result Header */
.whmcs-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 12px;
}

.whmcs-domain-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whmcs-domain-name::before {
    content: '🌐';
    font-size: 18px;
}

.whmcs-domain-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.whmcs-domain-status.available {
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: white;
}

.whmcs-domain-status.taken {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
}

/* Action Buttons - Modern */
.whmcs-result-actions {
    padding: 20px 24px;
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid #f1f5f9;
}

.whmcs-add-to-cart {
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
    position: relative;
    overflow: hidden;
}

.whmcs-add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.whmcs-add-to-cart:hover:not(:disabled) {
    background: linear-gradient(135deg, #2f855a, #276749);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.4);
}

.whmcs-add-to-cart:hover:not(:disabled)::before {
    left: 100%;
}

.whmcs-add-to-cart:disabled {
    background: #a0aec0;
    transform: none;
    box-shadow: none;
}

.whmcs-button-icon {
    font-size: 16px;
}

/* ===== WHOIS INFORMATION - MODERN ===== */
.whmcs-whois-info {
    padding: 0 24px 24px;
}

.whmcs-toggle-whois {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.whmcs-toggle-whois::before {
    content: '🔍';
    font-size: 12px;
}

.whmcs-toggle-whois:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.whmcs-whois-details {
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.whmcs-whois-details pre {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2d3748;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* ===== DOMAIN SUGGESTIONS - MODERN GRID ===== */
.whmcs-domain-suggestions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.whmcs-suggestions-title {
    font-weight: 700;
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whmcs-suggestions-title::before {
    content: '💡';
    font-size: 16px;
}

.whmcs-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.whmcs-suggestion-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.whmcs-suggestion-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: all 0.3s ease;
}

.whmcs-suggestion-item.available::before {
    background: linear-gradient(180deg, #38a169, #2f855a);
}

.whmcs-suggestion-item.taken::before {
    background: linear-gradient(180deg, #e53e3e, #c53030);
}

.whmcs-suggestion-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.whmcs-suggestion-domain {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.whmcs-suggestion-domain::before {
    content: '🔗';
    font-size: 14px;
    opacity: 0.7;
}

.whmcs-suggestion-status {
    font-size: 13px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.whmcs-suggestion-status.available {
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    color: #22543d;
}

.whmcs-suggestion-status.taken {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #742a2a;
}

.whmcs-suggestion-add-to-cart {
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 8px rgba(56, 161, 105, 0.3);
}

.whmcs-suggestion-add-to-cart:hover:not(:disabled) {
    background: linear-gradient(135deg, #2f855a, #276749);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.4);
}

/* ===== SUCCESS ANIMATIONS ===== */
@keyframes whmcs-success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.whmcs-domain-available {
    animation: whmcs-success-pulse 0.6s ease-in-out;
}

/* ===== EMPTY STATE ===== */
.whmcs-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.whmcs-empty-state::before {
    content: '🔍';
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .whmcs-domain-form {
        flex-direction: column;
    }
    
    .whmcs-domain-button {
        width: 100%;
    }
    
    .whmcs-result-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    
    .whmcs-suggestions-grid {
        grid-template-columns: 1fr;
    }
    
    .whmcs-domain-input,
    .whmcs-domain-button {
        min-height: 52px;
    }
    
    .whmcs-domain-result {
        margin-bottom: 16px;
    }
    
    .whmcs-result-header,
    .whmcs-result-actions,
    .whmcs-whois-info {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .whmcs-domain-result {
        border-radius: 12px;
    }
    
    .whmcs-suggestion-item {
        padding: 16px;
    }
    
    .whmcs-domain-name {
        font-size: 18px;
    }
    
    .whmcs-domain-status {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .whmcs-domain-search-widget {
        color-scheme: light dark;
    }
    
    .whmcs-domain-input {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .whmcs-domain-input:focus {
        border-color: #0066cc;
        background: #2d3748;
    }
    
    .whmcs-domain-result {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .whmcs-domain-name {
        color: #f7fafc;
    }
    
    .whmcs-whois-details {
        background: linear-gradient(135deg, #2d3748, #1a202c);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .whmcs-whois-details pre {
        color: #cbd5e0;
    }
}

/* ===== SMOOTH TRANSITIONS ===== */
.whmcs-domain-search-widget * {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* ===== FOCUS VISIBLE FOR ACCESSIBILITY ===== */
.whmcs-domain-button:focus-visible,
.whmcs-add-to-cart:focus-visible,
.whmcs-toggle-whois:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}
/* ===== LAYOUT VARIATIONS ===== */
.whmcs-domain-fullwidth .whmcs-domain-form {
    display: flex;
    gap: 12px;
}

.whmcs-domain-compact .whmcs-domain-form {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.whmcs-domain-inline .whmcs-domain-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.whmcs-domain-inline .whmcs-domain-input {
    flex: 1;
    min-height: 48px;
    padding: 12px 16px;
}

.whmcs-domain-inline .whmcs-domain-button {
    min-height: 48px;
    padding: 12px 20px;
    white-space: nowrap;
}

/* Animation Classes */
.whmcs-animation-slide .whmcs-domain-result {
    animation: slideDown 0.4s ease-out;
}

.whmcs-animation-fade .whmcs-domain-result {
    animation: fadeIn 0.6s ease-out;
}

.whmcs-animation-bounce .whmcs-domain-result {
    animation: bounceIn 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Form Focus State */
.whmcs-form-focused .whmcs-domain-input {
    border-color: #0066cc;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.15);
}

/* Responsive Layout Adjustments */
@media (max-width: 768px) {
    .whmcs-domain-inline .whmcs-domain-form {
        flex-direction: column;
    }
    
    .whmcs-domain-inline .whmcs-domain-input,
    .whmcs-domain-inline .whmcs-domain-button {
        width: 100%;
    }
    
    .whmcs-domain-compact .whmcs-domain-form {
        max-width: 100%;
    }
}

/* Elementor Specific Adjustments */
.elementor-widget-whmcs_domain_search .whmcs-domain-search-widget {
    font-family: inherit;
}

/* Ensure Elementor controls work properly */
.elementor-widget-whmcs_domain_search {
    min-height: 50px;
}