/* Legal AI Search Styles - Light Professional Theme */

#legal-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    min-height: 100vh;
    color: #1e293b;
}

.legal-search-form {
    background: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    padding: 45px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    position: relative;
}

.legal-search-form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8, #6366f1);
    border-radius: 20px 20px 0 0;
}

.legal-search-form h2 {
    color: #1e293b;
    font-size: 1.8em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.legal-search-form h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
}

/* FIXED COUNTRY DROPDOWN - Replace this section in your CSS file */

#country-select {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    
    /* CRITICAL: Force native appearance and text visibility */
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    
    /* Ensure background and text are visible */
    background-color: white !important;
    background-image: none !important;
    color: #374151 !important;
    
    /* Remove any text styling that might hide content */
    text-indent: 0 !important;
    text-overflow: visible !important;
    overflow: visible !important;
    white-space: nowrap !important;
    
    /* Font styling */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 500 !important;
    line-height: normal !important;
}

#country-select:focus {
    outline: none;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15) !important;
    background-color: white !important;
}

/* Ensure dropdown options are visible */
#country-select option {
    background-color: white !important;
    color: #374151 !important;
    padding: 10px !important;
    font-size: 16px !important;
    font-weight: normal !important;
}

#country-select option:checked,
#country-select option:hover {
    background-color: #3b82f6 !important;
    color: white !important;
}

/* Browser-specific fixes */
#country-select::-ms-expand {
    display: block !important;
}

/* Force visibility for all browsers */
select#country-select {
    background: white !important;
    color: #374151 !important;
}

/* Alternative fix for stubborn cases */
.form-group select {
    background-color: white !important;
    color: #374151 !important;
    appearance: auto !important;
}

#country-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

#country-select option {
    background: white;
    color: #374151;
    padding: 10px;
}

#legal-question {
    width: 100%;
    min-height: 130px;
    padding: 18px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    color: #374151;
    font-size: 16px;
    transition: all 0.3s ease;
    resize: vertical;
    line-height: 1.6;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

#legal-question:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

#legal-question::placeholder {
    color: #9ca3af;
}

#search-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.25);
}

#search-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

#search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Sample Questions */
.sample-questions {
    margin-top: 40px;
    padding: 35px;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 16px;
}

.sample-questions h3 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.3em;
}

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

.sample-question {
    padding: 15px 20px;
    background: white;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: block;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sample-question:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: #3b82f6;
    color: #1d4ed8;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Search Results */
#search-results {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-in;
}

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

.legal-response {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.response-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 25px 30px;
}

.response-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.cached-indicator {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.answer-content {
    padding: 35px;
    line-height: 1.7;
    color: #374151;
    font-size: 16px;
}

.answer-content p {
    margin-bottom: 16px;
}

.answer-content h3, .answer-content h4 {
    color: #1e293b;
    margin-top: 24px;
    margin-bottom: 12px;
}

.answer-content ul, .answer-content ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.answer-content li {
    margin-bottom: 8px;
}

.result-actions {
    padding: 25px 35px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.legal-disclaimer {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 25px 35px;
    margin: 35px;
    margin-bottom: 0;
}

.legal-disclaimer h4 {
    color: #92400e;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.legal-disclaimer p {
    color: #92400e;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error Messages */
.error-message {
    background: #fee2e2;
    border: 2px solid #f87171;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.error-message h3 {
    color: #dc2626;
    margin: 0 0 15px 0;
}

.error-message p {
    color: #dc2626;
    margin: 0;
}

/* Feature Boxes */
.feature-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-box {
    background: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    padding: 35px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-box:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: #3b82f6;
}

.feature-box h3 {
    color: #1e293b;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 15px;
}

.feature-box p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    #legal-search-container {
        padding: 15px;
    }
    
    .legal-search-form {
        padding: 30px 25px;
    }
    
    .legal-search-form h2 {
        font-size: 1.5em;
    }
    
    .question-buttons {
        grid-template-columns: 1fr;
    }
    
    .feature-boxes {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .answer-content {
        padding: 25px;
    }
    
    .legal-disclaimer {
        margin: 25px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .legal-search-form {
        padding: 25px 20px;
    }
    
    #search-btn {
        padding: 16px 25px;
        font-size: 16px;
    }
    
    .response-header {
        padding: 20px;
    }
    
    .response-header h3 {
        font-size: 20px;
    }
}