/* Insurance Policy Management System - Frontend Styles */

/* General Styles */
.ipm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Card Enhancements */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-weight: 600;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #d9a411;
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-check-input:checked {
    background-color: #d9a411;
    border-color: #d9a411;
}

/* Button Styles */
.btn {
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: #d9a411;
    border-color: #d9a411;
}

.btn-primary:hover {
    background-color: #0052a3;
    border-color: #0052a3;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #218838;
}

/* Alert Styles */
.alert {
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1.25rem;
}

/* Nav Tabs */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    color: #666;
    font-weight: 500;
    padding: 12px 24px;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    color: #d9a411;
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: #d9a411;
    border-bottom: 3px solid #d9a411;
    background-color: transparent;
}

/* Search Results */
#search-results {
    animation: fadeIn 0.3s ease-in;
    max-width: 1320px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Policy Cards */
.policy-card {
    height: 100%;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.policy-card:hover {
    border-color: #d9a411;
}

.policy-card .card-header {
    background: linear-gradient(135deg, #d9a411 0%, #0052a3 100%);
}

.policy-card .card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 4px;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.modal-footer {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Dashboard Styles */
.dashboard-stat-card {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.dashboard-stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #d9a411;
    margin-bottom: 10px;
}

.dashboard-stat-card p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Affiliate Link Display */
.affiliate-link-box {
    background-color: #f8f9fa;
    border: 2px dashed #d9a411;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.affiliate-link-box input {
    border: none;
    background-color: transparent;
    font-family: monospace;
    color: #d9a411;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid #d9a411;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .dashboard-stat-card h3 {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .btn, .nav-tabs, .modal {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 2px solid #d9a411;
    outline-offset: 2px;
}

/* Custom Checkbox and Radio Styles */
.form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.15em;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Info Box Styles */
.info-box {
    background-color: #e7f3ff;
    border-left: 4px solid #d9a411;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
}

.info-box h6 {
    color: #d9a411;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.active {
    background-color: #28a745;
}

.status-indicator.inactive {
    background-color: #dc3545;
}

.status-indicator.pending {
    background-color: #ffc107;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
}