/* Disclaimer Modal Styles - Enhanced for Accessibility & Readability */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* Accessibility improvements */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    /* Improved readability */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    /* Focus management for screen readers */
    outline: none;
}

.modal-content:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 30px 10px;
    border-bottom: 2px solid #e74c3c;
}

.modal-header h2 {
    margin: 0;
    color: #e74c3c;
    font-size: 24px;
    font-weight: 600;
    /* Improved contrast ratio for accessibility */
    text-shadow: none;
}

.modal-header a {
    font-size: 14px;
    margin-top: 10px;
    display: inline-block;
    /* Enhanced link accessibility */
    text-decoration: underline;
    color: #007bff;
    transition: color 0.2s ease;
}

.modal-header a:hover,
.modal-header a:focus {
    color: #0056b3;
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.aamc-disclaimer {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.modal-body {
    padding: 20px 30px;
    line-height: 1.6;
    /* Enhanced readability */
    font-size: 16px; /* Increased from implied 14px for better readability */
}

.modal-body p {
    margin: 0 0 15px 0;
    color: #2c3e50; /* Higher contrast than #333 */
    /* Improved text rendering */
    text-rendering: optimizeLegibility;
}

.disclaimer-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
    color: #2c3e50; /* Higher contrast */
    /* Focus management for keyboard navigation */
    position: relative;
}

.disclaimer-section h3 {
    margin: 0 0 12px 0; /* Slightly increased spacing */
    color: #c0392b; /* Higher contrast red */
    font-size: 18px; /* Increased from 16px for better hierarchy */
    font-weight: 600;
    /* Improved accessibility */
    text-rendering: optimizeLegibility;
}

.disclaimer-section p {
    margin: 0 0 8px 0; /* Added bottom margin for better spacing */
    font-size: 15px; /* Increased from 14px for better readability */
    color: #2c3e50; /* Higher contrast */
    line-height: 1.7; /* Improved line spacing */
}

.disclaimer-section p:last-child {
    margin-bottom: 0;
}

.disclaimer-section ul {
    margin: 10px 0;
    padding-left: 20px;
    line-height: 1.7;
}

.disclaimer-section li {
    margin: 8px 0; /* Increased spacing between list items */
    font-size: 15px;
    color: #2c3e50;
}

.acknowledgment-section {
    margin-top: 25px;
    padding: 15px;
    background-color: #f0f7ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #27ae60;
    color: white;
}

.btn-primary:hover {
    background-color: #219a52;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.app-blocked {
    pointer-events: none;
    opacity: 0.3;
}

/* Screen reader only content */
.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;
}

/* Additional accessibility improvements */
.modal-footer .btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.checkbox-container input[type="checkbox"]:focus + .checkmark {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modal-content {
        border: 2px solid;
    }
    
    .disclaimer-section {
        border-left-width: 6px;
    }
    
    .modal-header h2 {
        color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal-content,
    .modal-header a {
        transition: none;
    }
}
