/**
 * Clanto GDPR Center - Policy Modal Styles
 * Pure CSS - No build required
 */

.cgc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cgc-modal-open {
    opacity: 1;
    visibility: visible;
}

.cgc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.cgc-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.cgc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.cgc-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.cgc-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cgc-modal-close:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

.cgc-modal-close:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.cgc-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cgc-modal-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.cgc-modal-document {
    line-height: 1.6;
    color: #333;
}

.cgc-modal-document h1,
.cgc-modal-document h2,
.cgc-modal-document h3,
.cgc-modal-document h4,
.cgc-modal-document h5,
.cgc-modal-document h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #1a1a1a;
}

.cgc-modal-document h1 { font-size: 2rem; }
.cgc-modal-document h2 { font-size: 1.5rem; }
.cgc-modal-document h3 { font-size: 1.25rem; }

.cgc-modal-document p {
    margin-bottom: 1rem;
}

.cgc-modal-document ul,
.cgc-modal-document ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.cgc-modal-document li {
    margin-bottom: 0.5rem;
}

.cgc-modal-document a {
    color: #0066cc;
    text-decoration: underline;
}

.cgc-modal-document a:hover {
    color: #0052a3;
}

.cgc-modal-meta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.cgc-modal-meta p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.cgc-version-info {
    font-weight: 500;
}

.cgc-acceptance-info {
    color: #28a745;
}

.cgc-modal-history {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.cgc-modal-history h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.cgc-history-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0066cc;
}

.cgc-history-version {
    font-weight: 600;
    color: #1a1a1a;
}

.cgc-history-date {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.cgc-history-summary {
    font-size: 0.9rem;
    color: #333;
    margin-top: 0.5rem;
}

.cgc-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.cgc-user-consent-status {
    margin: 2rem 0;
}

.cgc-user-consent-status h3 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.cgc-consent-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.cgc-consent-table th,
.cgc-consent-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.cgc-consent-table th {
    font-weight: 600;
    color: #1a1a1a;
    width: 30%;
}

.cgc-consent-table td {
    color: #333;
}

.cgc-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.cgc-status-granted {
    background: #d4edda;
    color: #155724;
}

.cgc-status-denied {
    background: #f8d7da;
    color: #721c24;
}

.cgc-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .cgc-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .cgc-modal-header {
        padding: 1rem;
    }
    
    .cgc-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .cgc-modal-body {
        padding: 1rem;
    }
    
    .cgc-modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .cgc-modal-footer .button {
        width: 100%;
    }
    
    .cgc-consent-actions {
        flex-direction: column;
    }
    
    .cgc-consent-actions .button {
        width: 100%;
    }
}
