/* Custom styles for MediaAlpha Insurance Exchange */

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Form enhancements */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #ecfdf5;
    border-left-color: #059669;
    color: #047857;
}

.alert-error {
    background-color: #fef2f2;
    border-left-color: #dc2626;
    color: #b91c1c;
}

.alert-warning {
    background-color: #fffbeb;
    border-left-color: #d97706;
    color: #92400e;
}

.alert-info {
    background-color: #eff6ff;
    border-left-color: #2563eb;
    color: #1d4ed8;
}

/* Result card styles */
.result-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    background: white;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.result-card:hover {
    border-color: #1e40af;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e40af, #059669);
}

/* Bid highlight */
.bid-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
    display: flex;
    align-items: center;
}

.bid-amount::before {
    content: '$';
    font-size: 1.25rem;
    margin-right: 0.125rem;
}

/* Phone number styling */
.phone-number {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e40af;
    background: #eff6ff;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    display: inline-block;
    margin: 0.5rem 0;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background-color: #d1fae5;
    color: #047857;
}

.status-expired {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design enhancements */
@media (max-width: 768px) {
    .result-card {
        margin-bottom: 1rem;
    }
    
    .bid-amount {
        font-size: 1.25rem;
    }
    
    .phone-number {
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .result-card {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .phone-number {
        background: #374151;
        color: #60a5fa;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .result-card {
        break-inside: avoid;
        box-shadow: none;
        border: 2px solid #1e40af;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
*:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .result-card {
        border-width: 2px;
    }
    
    .alert {
        border-width: 2px;
    }
}