/* ResellerClub TLD Availability Styles */

/* Main availability container */
.tld-availability-container {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Domain search section */
.domain-search-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.domain-search-container h2 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.domain-search-container p {
    margin: 0 0 30px 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Search form */
.domain-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 10px;
    align-items: stretch;
}

.domain-search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #333333;
    transition: all 0.3s ease;
}

.domain-search-input:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.domain-search-input.invalid {
    background: #ffebee;
    border: 2px solid #e57373;
}

.domain-search-btn {
    padding: 15px 30px;
    background: #ffffff;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.domain-search-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.domain-search-btn:disabled {
    background: #6c757d;
    color: #ffffff;
    cursor: not-allowed;
    transform: none;
}

.domain-search-btn.loading {
    position: relative;
    color: transparent;
}

.domain-search-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Popular extensions */
.popular-extensions {
    margin-top: 25px;
}

.popular-extensions h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.extensions-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.popular-ext-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.popular-ext-btn:hover,
.popular-ext-btn.selected {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Validation and indicators */
.validation-message {
    display: none;
    color: #e57373;
    font-size: 12px;
    margin-top: 5px;
}

.availability-indicator {
    display: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.availability-indicator.available {
    background: #e8f5e8;
    color: #2e7d32;
}

.availability-indicator.unavailable {
    background: #ffebee;
    color: #c62828;
}

/* Search results */
#search-results {
    display: none;
    margin-top: 30px;
}

.search-results-container {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

/* Main result */
.main-result {
    padding: 30px;
    border-bottom: 1px solid #dee2e6;
}

.main-result.available {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border-left: 4px solid #4caf50;
}

.main-result.unavailable {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border-left: 4px solid #f44336;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #333333;
}

.domain-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.domain-status.available {
    background: #4caf50;
    color: #ffffff;
}

.domain-status.unavailable {
    background: #f44336;
    color: #ffffff;
}

/* Pricing section */
.pricing-section {
    margin-bottom: 25px;
}

.pricing-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333333;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.price-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-item.featured {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.price-label {
    font-weight: 500;
    color: #495057;
}

.price-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #28a745;
}

.price-item.featured .price-value {
    color: #e67e22;
    font-size: 1.3rem;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.add-domain-btn {
    background: #28a745;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-domain-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.add-domain-btn.loading {
    position: relative;
    color: transparent;
}

.add-domain-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.add-domain-btn.added {
    background: #6c757d;
    cursor: not-allowed;
}

.add-domain-btn:disabled,
.add-domain-btn.unavailable {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Suggestions section */
.suggestions-section {
    padding: 30px;
    background: #f8f9fa;
}

.suggestions-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.suggestion-item {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.suggestion-item.available {
    border-left: 4px solid #28a745;
}

.suggestion-item.unavailable {
    border-left: 4px solid #dc3545;
    opacity: 0.7;
}

.suggestion-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333333;
}

.suggestion-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 15px;
}

.suggestion-status {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 15px;
}

/* Unavailable section */
.unavailable-section {
    text-align: center;
    padding: 20px;
}

.unavailable-section p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Error and no results */
.search-error,
.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.search-error h3,
.no-results h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: #495057;
}

.search-error p,
.no-results p {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
}

/* Loading states */
#search-loading,
#bulk-search-loading,
#suggestions-loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Bulk search */
.bulk-search-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.bulk-search-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #495057;
}

#bulk-domains-input {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
}

#bulk-domains-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.bulk-search-btn {
    background: #17a2b8;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.bulk-search-btn:hover {
    background: #138496;
}

/* Messages */
.notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.notice-success {
    background: #e8f5e8;
    border: 1px solid #81c784;
    color: #2e7d32;
}

.notice-error {
    background: #ffebee;
    border: 1px solid #e57373;
    color: #c62828;
}

.notice-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1565c0;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.suggestion-item,
.main-result {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive design */
@media (max-width: 768px) {
    .domain-search-container {
        padding: 30px 20px;
    }
    
    .domain-search-container h2 {
        font-size: 2rem;
    }
    
    .domain-search-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .domain-search-input,
    .domain-search-btn {
        padding: 12px 16px;
    }
    
    .extensions-grid {
        gap: 8px;
    }
    
    .popular-ext-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .result-header h2 {
        font-size: 1.5rem;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .suggestions-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .main-result,
    .suggestions-section {
        padding: 20px;
    }
}

/* Print styles */
@media print {
    .domain-search-container,
    .bulk-search-section,
    .action-buttons {
        display: none;
    }
    
    .main-result,
    .suggestions-section {
        background: #ffffff !important;
        border: 1px solid #000000;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .domain-search-container {
        background: #000000;
        color: #ffffff;
        border: 2px solid #ffffff;
    }
    
    .domain-search-input {
        border: 2px solid #000000;
    }
    
    .domain-search-btn {
        border: 2px solid #000000;
    }
}

