/* =========================================================
   Employee Rights Page
   ========================================================= */

#employeeRightsPage {
    padding-bottom: 2rem;
}

/* Back link */
.er-back-link {
    color: #64748b;
    font-size: 0.85rem;
    transition: color 0.15s;
}
.er-back-link:hover { color: #2563eb; }

/* Page-level title + subtitle (outside card) */
.er-outer-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}
.er-outer-subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0;
}

/* Card */
.er-card {
    border-radius: 16px;
    border: none;
}
.er-card-body {
    padding: 2rem 2.25rem 0.75rem;
}

/* Card-level title (inside card) */
.er-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

/* Section wrapper */
.er-section {
    border-top: 1px solid #f1f5f9;
    padding: 1.6rem 0;
}
.er-section.er-last {
    border-bottom: 1px solid #f1f5f9;
}

/* Section header row */
.er-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.er-section-header:hover .er-section-title {
    color: #2563eb;
}

/* Chevron */
.er-chevron {
    font-size: 0.7rem;
    color: #64748b;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

/* Section title */
.er-section-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    transition: color 0.15s;
}

/* Allow All label + toggle */
.er-allow-label {
    font-size: 0.82rem;
    color: #64748b;
    white-space: nowrap;
}
.er-toggle .form-check-input {
    width: 2.4em;
    height: 1.25em;
    cursor: pointer;
    margin-top: 0;
}
.er-toggle .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Section body (permission grid) */
.er-section-body {
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.22s ease;
    max-height: 800px;
    opacity: 1;
}
.er-section-body.er-collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Permission grid */
.er-perms-grid {
    padding-top: 1.1rem;
    row-gap: 0.6rem !important;
}

/* Individual permission item */
.er-perm-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #334155;
    padding: 0.2rem 0;
    margin-bottom: 0;
}
.er-perm-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.1em;
    height: 1.1em;
    cursor: pointer;
    border-color: #cbd5e1;
    border-radius: 3px;
    margin-top: 0;
}
.er-perm-item input[type="checkbox"]:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Action buttons */
.er-btn-back {
    min-width: 90px;
    color: #334155;
}
.er-btn-save {
    min-width: 130px;
}

/* Disclaimer */
.er-disclaimer {
    font-size: 0.78rem;
    line-height: 1.6;
    color: #94a3b8;
}

/* ── Responsive: lg (≥992px) ── */
@media (min-width: 992px) {
    .er-outer-title   { font-size: 2rem; }
    .er-outer-subtitle{ font-size: 0.95rem; }
    .er-card-title    { font-size: 1.2rem; }
    .er-section-title { font-size: 1rem; }
    .er-perm-item     { font-size: 0.925rem; }
    .er-allow-label   { font-size: 0.875rem; }
    .er-card-body     { padding: 2.25rem 2.5rem 1rem; }
    .er-section       { padding: 1.75rem 0; }
}

/* ── Responsive: xxl (≥1400px) ── */
@media (min-width: 1400px) {
    .er-outer-title   { font-size: 2.25rem; }
    .er-outer-subtitle{ font-size: 1rem; }
    .er-card-title    { font-size: 1.3rem; }
    .er-section-title { font-size: 1.05rem; }
    .er-perm-item     { font-size: 0.96rem; }
    .er-allow-label   { font-size: 0.9rem; }
    .er-card-body     { padding: 2.5rem 2.75rem 1.25rem; }
    .er-section       { padding: 2rem 0; }
    .er-disclaimer    { font-size: 0.82rem; }
}

/* ── Small screens (≤575px) ── */
@media (max-width: 575.98px) {
    .er-outer-title   { font-size: 1.4rem; }
    .er-card-body     { padding: 1.25rem 1.25rem 0.25rem; }
    .er-allow-label   { display: none; }
    .er-section       { padding: 1.25rem 0; }
}
