/* Policy Modal System CSS - Updated for Task 18 Standardization */

/* Import standardized popup/modal styles */
@import url('popup-modal-standardization.css');

/* Policy-specific container sizing */
.policy-modal-container {
    width: 800px;
}

/* Modal Header */
.policy-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.policy-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.policy-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.policy-modal-close:hover {
    color: #374151;
    background-color: #f3f4f6;
}

/* Modal Content */
.policy-modal-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
}

.policy-modal-content h1,
.policy-modal-content h2,
.policy-modal-content h3 {
    color: #111827;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.policy-modal-content h1 {
    font-size: 1.875rem;
    font-weight: 700;
}

.policy-modal-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.policy-modal-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.policy-modal-content p {
    margin-bottom: 1rem;
    color: #374151;
}

.policy-modal-content ul,
.policy-modal-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.policy-modal-content li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.policy-modal-content strong {
    font-weight: 600;
    color: #111827;
}

.policy-modal-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.policy-modal-content a:hover {
    color: #1d4ed8;
}

/* Reference Notice */
.policy-modal-reference-notice {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #92400e;
}

.policy-modal-reference-notice strong {
    color: #78350f;
}

/* Modal Footer */
.policy-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.policy-modal-footer button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.policy-modal-footer button:hover {
    background-color: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .policy-modal-container {
        width: 95vw;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .policy-modal-header,
    .policy-modal-content,
    .policy-modal-footer {
        padding: 1rem;
    }
    
    .policy-modal-title {
        font-size: 1.25rem;
    }
}

/* Scrollbar Styling */
.policy-modal-content::-webkit-scrollbar {
    width: 6px;
}

.policy-modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.policy-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.policy-modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animation for content loading */
.policy-modal-content.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.policy-modal-loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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