/**
 * Domain Search Widget Styles
 *
 * Clean, modern design for domain availability checking
 */

/* === Container === */
.domain-search-container {
    background: transparent;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 24px;
}

.domain-search-container h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text, #151515);
}

/* === Search Input Group === */
.domain-search-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.domain-search-group input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text, #151515);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.domain-search-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.domain-search-group select {
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text, #151515);
    cursor: pointer;
    min-width: 120px;
    transition: border-color 0.2s ease;
}

.domain-search-group select:focus {
    outline: none;
    border-color: var(--accent, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.domain-search-group button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    background: var(--accent, #007bff);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.domain-search-group button:hover:not(:disabled) {
    background: var(--accent-dark, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.domain-search-group button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* === Actions === */
.domain-search-actions {
    display: none; /* Caché pour l'instant */
}

#show-suggestions {
    display: none; /* Bouton suggestions caché */
}

/* === Loading Indicator === */
#domain-loading {
    display: none;
    text-align: center;
    padding: 24px;
    color: #666;
}

#domain-loading::before {
    content: '⏳';
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
    animation: spin 2s linear infinite;
}

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

/* === Results Container === */
#domain-results {
    margin-top: 20px;
}

.domain-result {
    background: transparent;
    border-radius: 12px;
    padding: 20px 0;
    border: none;
}

.domain-result.available {
    background: transparent;
}

.domain-result.unavailable {
    background: transparent;
}

.domain-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.domain-result-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.domain-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.domain-status.available {
    background: #28a745;
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.domain-status.unavailable {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* === Pricing Breakdown === */
.domain-pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    background: transparent;
    border: none;
}

.pricing-column {
    background: rgba(26, 26, 26, 0.47);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: none;
}

.pricing-label {
    font-size: 13px;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-amount {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1;
    color: #ffffff;
    margin: 0;
}

.pricing-details {
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    opacity: 0.9;
}

.pricing-breakdown {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Old styles removed - not needed */
.pricing-row,
.pricing-row.highlight,
.pricing-row.warning,
.pricing-row.total {
    display: none;
}

/* === Domain Description === */
.domain-description {
    background: rgba(231, 241, 255, 0.7);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #004085;
    border-left: 3px solid #007bff;
}

.domain-description.info {
    background: rgba(255, 243, 205, 0.7);
    color: #856404;
    border-left-color: #ffc107;
}

/* === Error Display === */
.domain-error {
    background: #fff5f5;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-icon {
    font-size: 24px;
    color: #dc3545;
}

.error-message {
    color: #721c24;
    font-weight: 500;
}

/* === Rate Limit Info === */
.rate-limit-info {
    display: none; /* Caché - info technique */
}

/* === Suggestions Container === */
#domain-suggestions {
    margin-top: 32px;
}

.suggestions-header {
    margin-bottom: 24px;
}

.suggestions-header h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.suggestions-header p {
    color: #666;
    font-size: 14px;
}

/* === Suggestions Grid === */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.suggestion-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.suggestion-item.available {
    border-color: #28a745;
}

.suggestion-item.available:hover {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
    transform: translateY(-2px);
}

.suggestion-item.unavailable {
    opacity: 0.6;
    background: #f8f9fa;
}

.suggestion-domain {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.domain-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.suggestion-price {
    font-size: 18px;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 4px;
}

.suggestion-price.free {
    color: #28a745;
}

.suggestion-monthly {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.suggestion-item button {
    width: 100%;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.suggestion-item button:hover {
    background: #218838;
}

/* === Domain Selection Display === */
#domain-selection-display {
    margin-top: 24px;
}

.domain-selected {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-icon {
    font-size: 24px;
    color: #28a745;
}

.selected-domain {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #155724;
}

.domain-selected .btn-small {
    padding: 6px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.domain-selected .btn-small:hover {
    background: #545b62;
}

/* === Button Styles === */
.btn-primary {
    padding: 12px 32px;
    background: var(--accent, #007bff);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: var(--accent-dark, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.btn-small {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .domain-search-group {
        flex-direction: column;
    }

    .domain-search-group input[type="text"],
    .domain-search-group select,
    .domain-search-group button {
        width: 100%;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
    }

    .domain-result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pricing-row {
        flex-direction: column;
        gap: 8px;
    }
}

/* === Dark Mode Support (Optional) === */
@media (prefers-color-scheme: dark) {
    .domain-search-container {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .domain-search-container h2,
    .domain-result-header h3,
    .domain-name {
        color: #ffffff;
    }

    .domain-search-group input[type="text"],
    .domain-search-group select {
        background: #3a3a3a;
        color: #e0e0e0;
        border-color: #4a4a4a;
    }

    .domain-result {
        background: #3a3a3a;
    }

    .domain-pricing,
    .suggestion-item {
        background: #2a2a2a;
        border-color: #4a4a4a;
    }
}
