/* ════════════════════════════════════════════════════════════════════════════
   Employee Data Retention Policy Modal — Premium Light Theme
   ════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Overlay ──────────────────────────────────────────────────────────────── */
#dpdp-policy-modal.dpdp-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#dpdp-policy-modal.dpdp-overlay--visible {
    opacity: 1;
}

#dpdp-policy-modal.dpdp-overlay--closing {
    opacity: 0;
}

/* ── Backdrop ─────────────────────────────────────────────────────────────── */
.dpdp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(100, 116, 139, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── Modal Container ──────────────────────────────────────────────────────── */
.dpdp-modal {
    position: relative;
    z-index: 1;
    width: min(780px, 96vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 0 0 1px rgba(148, 163, 184, 0.1),
        0 20px 60px rgba(15, 23, 42, 0.15),
        0 4px 16px rgba(15, 23, 42, 0.06);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

#dpdp-policy-modal.dpdp-overlay--visible .dpdp-modal {
    transform: translateY(0) scale(1);
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.dpdp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px 20px;
    background: linear-gradient(135deg, #f0f7ff 0%, #f0fdf4 100%);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.dpdp-header-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.dpdp-header-sub {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #10b981;
}

.dpdp-header-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dpdp-meta-badges {
    margin-left: auto;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.dpdp-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
}

.dpdp-badge-green {
    background: #f0fdf4;
    color: #059669;
    border-color: #a7f3d0;
}

/* ── Scroll Body ──────────────────────────────────────────────────────────── */
.dpdp-scroll-body {
    overflow-y: auto;
    padding: 8px 28px 16px;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    background: #ffffff;
}

.dpdp-scroll-body::-webkit-scrollbar {
    width: 5px;
}
.dpdp-scroll-body::-webkit-scrollbar-track {
    background: transparent;
}
.dpdp-scroll-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.dpdp-section {
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

.dpdp-section:last-child {
    border-bottom: none;
}

.dpdp-section-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.dpdp-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.dpdp-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: #475569;
}

.dpdp-text strong {
    color: #1e293b;
    font-weight: 600;
}

/* ── Sub-headings (7.1, 9.1, etc.) ───────────────────────────────────────── */
#dpdp-policy-modal .dpdp-sub-title {
    margin: 14px 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    padding-left: 4px;
    border-left: 3px solid #3b82f6;
}

/* ── Bullet Lists ─────────────────────────────────────────────────────────── */
#dpdp-policy-modal .dpdp-list {
    margin: 6px 0 0 0;
    padding-left: 20px;
    list-style: none;
}

#dpdp-policy-modal .dpdp-list li {
    position: relative;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.7;
    padding-left: 8px;
}

#dpdp-policy-modal .dpdp-list li::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #10b981);
}

/* ── Definitions ──────────────────────────────────────────────────────────── */
#dpdp-policy-modal .dpdp-def-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#dpdp-policy-modal .dpdp-def-item {
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.6;
}

#dpdp-policy-modal .dpdp-def-term {
    font-weight: 700;
    color: #1e293b;
    margin-right: 6px;
}

#dpdp-policy-modal .dpdp-def-desc {
    color: #475569;
}

/* ── Highlight (for [Insert Date]) ───────────────────────────────────────── */
#dpdp-policy-modal .dpdp-highlight {
    display: inline-block;
    padding: 2px 10px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* ── Approval Section ─────────────────────────────────────────────────────── */
#dpdp-policy-modal .dpdp-approval-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

#dpdp-policy-modal .dpdp-approval-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#dpdp-policy-modal .dpdp-approval-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    min-width: 110px;
    flex-shrink: 0;
}

#dpdp-policy-modal .dpdp-approval-line {
    flex: 1;
    height: 1px;
    border-bottom: 1.5px dashed #cbd5e1;
    margin-bottom: 2px;
}

/* ── End Note ─────────────────────────────────────────────────────────────── */
#dpdp-policy-modal .dpdp-end-note {
    margin: 20px 0 0;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.06em;
}

/* ── Header alias fixes ───────────────────────────────────────────────────── */
#dpdp-policy-modal .dpdp-header-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

#dpdp-policy-modal .dpdp-header-text {
    flex: 1;
}

#dpdp-policy-modal .dpdp-header-badges {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}


.dpdp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.dpdp-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 12px;
    transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.dpdp-card:hover {
    background: #f0f7ff;
    border-color: #bfdbfe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.dpdp-card-icon {
    font-size: 20px;
    margin-bottom: 8px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dpdp-icon-blue   { background: #eff6ff; }
.dpdp-icon-purple { background: #f5f3ff; }
.dpdp-icon-green  { background: #f0fdf4; }
.dpdp-icon-orange { background: #fff7ed; }
.dpdp-icon-red    { background: #fef2f2; }

.dpdp-card-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.dpdp-card-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
}

/* ── Retention Table ──────────────────────────────────────────────────────── */
.dpdp-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.dpdp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.dpdp-table thead tr {
    background: #f0f7ff;
}

.dpdp-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3b82f6;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.dpdp-table td {
    padding: 9px 14px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.dpdp-table tbody tr:last-child td {
    border-bottom: none;
}

.dpdp-table tbody tr:hover td {
    background: #f8fafc;
    color: #1e293b;
}

.dpdp-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
}

.dpdp-chip-red {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* ── Principles ───────────────────────────────────────────────────────────── */
.dpdp-principles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dpdp-principle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    transition: background 0.2s, border-color 0.2s;
}

.dpdp-principle:hover {
    background: #f0f7ff;
    border-color: #bfdbfe;
}

.dpdp-principle strong {
    display: block;
    color: #1e293b;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.dpdp-principle-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.dpdp-principle-desc {
    font-size: 12px;
    color: #64748b;
}

/* ── Rights ───────────────────────────────────────────────────────────────── */
.dpdp-rights {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dpdp-right-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #475569;
    padding: 9px 14px;
    background: #f0fdf4;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.dpdp-right-item:hover {
    background: #dcfce7;
    border-color: #6ee7b7;
}

.dpdp-right-item span {
    color: #065f46;
    font-weight: 500;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.dpdp-footer {
    padding: 18px 28px 22px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ── Checkbox ─────────────────────────────────────────────────────────────── */
.dpdp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    flex: 1;
    min-width: 200px;
}

.dpdp-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dpdp-custom-cb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.dpdp-checkbox-label:hover .dpdp-custom-cb {
    border-color: #3b82f6;
    background: #eff6ff;
}

.dpdp-checkbox-label input[type="checkbox"]:checked + .dpdp-custom-cb {
    background: linear-gradient(135deg, #3b82f6, #10b981);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.dpdp-checkbox-label input[type="checkbox"]:checked + .dpdp-custom-cb::after {
    content: '';
    display: block;
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.dpdp-cb-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
    transition: color 0.2s;
}

.dpdp-checkbox-label:hover .dpdp-cb-text {
    color: #334155;
}

.dpdp-checkbox-label input[type="checkbox"]:checked ~ .dpdp-cb-text {
    color: #1e293b;
}

.dpdp-cb-text strong {
    color: #2563eb;
}

/* ── Accept Button ────────────────────────────────────────────────────────── */
.dpdp-accept-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.25s ease;
    background: #f1f5f9;
    color: #94a3b8;
    white-space: nowrap;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.dpdp-accept-btn--active,
.dpdp-accept-btn:not([disabled]) {
    cursor: pointer;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.dpdp-accept-btn--active:hover,
.dpdp-accept-btn:not([disabled]):hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
    transform: translateY(-1px);
}

.dpdp-accept-btn--active:active,
.dpdp-accept-btn:not([disabled]):active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .dpdp-header { flex-wrap: wrap; padding: 18px 16px 14px; }
    .dpdp-scroll-body { padding: 4px 16px 12px; }
    .dpdp-footer { padding: 14px 16px 18px; }
    .dpdp-meta-badges { display: none; }
    .dpdp-principles { grid-template-columns: 1fr; }
    .dpdp-grid { grid-template-columns: repeat(2, 1fr); }
    .dpdp-modal { border-radius: 16px; }
}
