/* Consent Modal Overlay */
.consent-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.consent-overlay.visible {
    display: flex;
}

.consent-modal {
    background: var(--bg-primary, #fff);
    border-radius: var(--radius-lg, 16px);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: consentSlideIn 0.3s ease;
}

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

.consent-header {
    padding: 24px 24px 0;
    text-align: center;
}

.consent-header h2 {
    margin: 0 0 8px;
    font-size: 1.4em;
    color: var(--text-primary, #2d3748);
}

.consent-header p {
    margin: 0;
    color: var(--text-secondary, #718096);
    font-size: 0.95em;
    line-height: 1.5;
}

.consent-body {
    padding: 24px;
}

.consent-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.consent-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md, 10px);
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.5);
}

.consent-checkbox-item:hover {
    border-color: var(--color-primary, #4299e1);
    background: rgba(66, 153, 225, 0.05);
}

.consent-checkbox-item.checked {
    border-color: var(--color-primary, #4299e1);
    background: rgba(66, 153, 225, 0.08);
}

.consent-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--color-primary, #4299e1);
}

.consent-checkbox-label {
    flex: 1;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--text-primary, #2d3748);
}

.consent-checkbox-label a {
    color: var(--color-primary, #4299e1);
    text-decoration: none;
    font-weight: 600;
}

.consent-checkbox-label a:hover {
    text-decoration: underline;
}

.consent-footer {
    padding: 0 24px 24px;
    text-align: center;
}

.consent-accept-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md, 10px);
    background: var(--color-primary, #4299e1);
    color: white;
    font-size: 1.05em;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.consent-accept-btn.enabled {
    cursor: pointer;
    opacity: 1;
}

.consent-accept-btn.enabled:hover {
    background: var(--color-primary-dark, #3182ce);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.consent-note {
    margin-top: 16px;
    font-size: 0.85em;
    color: var(--text-secondary, #a0aec0);
    line-height: 1.4;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .consent-modal {
        max-height: 95vh;
        border-radius: var(--radius-md, 10px);
    }

    .consent-header {
        padding: 20px 16px 0;
    }

    .consent-body {
        padding: 16px;
    }

    .consent-footer {
        padding: 0 16px 20px;
    }

    .consent-checkbox-item {
        padding: 12px;
    }
}

/* Document Viewer Modal */
.doc-viewer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.doc-viewer-overlay.visible {
    display: flex;
}

.doc-viewer-card {
    background: var(--bg-primary, #fff);
    border-radius: var(--radius-lg, 16px);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: docViewerSlideIn 0.25s ease;
}

@keyframes docViewerSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.doc-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid var(--color-primary, #4299e1);
    flex-shrink: 0;
}

.doc-viewer-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-viewer-title-row h3 {
    margin: 0;
    font-size: 1.2em;
    color: var(--text-primary, #2d3748);
}

.doc-viewer-title-row h3 i {
    color: var(--color-primary, #4299e1);
    margin-right: 4px;
}

.doc-viewer-badge {
    background: var(--color-primary, #4299e1);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.doc-viewer-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-secondary, #718096);
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.doc-viewer-close:hover {
    background: #f7fafc;
    color: var(--text-primary, #2d3748);
}

.doc-viewer-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    color: var(--text-primary, #2d3748);
    line-height: 1.7;
    font-size: 0.95em;
}

.doc-viewer-body h4 {
    color: var(--color-primary, #4299e1);
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 1.05em;
}

.doc-viewer-body h4:first-child {
    margin-top: 0;
}

.doc-viewer-body p {
    margin-bottom: 12px;
}

.doc-viewer-body ul {
    margin-bottom: 12px;
    padding-left: 24px;
}

.doc-viewer-body li {
    margin-bottom: 6px;
}

.doc-viewer-body a {
    color: var(--color-primary, #4299e1);
}

.doc-viewer-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    flex-shrink: 0;
}

.doc-viewer-footer .btn {
    min-width: 200px;
    justify-content: center;
}

/* Mobile adjustments for viewer */
@media (max-width: 480px) {
    .doc-viewer-overlay {
        padding: 10px;
    }

    .doc-viewer-card {
        max-height: 90vh;
    }

    .doc-viewer-header {
        padding: 16px;
    }

    .doc-viewer-body {
        padding: 16px;
    }

    .doc-viewer-footer {
        padding: 12px 16px;
    }
}
