/* =========================================
   Page Specific: Profile
   ========================================= */

.profile-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px 0px;
    align-items: baseline;
}

@media (max-width: 600px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

.field-label {
    font-weight: bold;
    color: var(--text-muted);
}

.hidden-section {
    display: none;
    margin-top: 20px;
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: var(--border-radius-md);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease, padding 0.3s ease;
}

.hidden-section.show {
    display: block;
    opacity: 1;
    max-height: 2000px;
}

.hidden-section h4 {
    margin-top: 0;
}

.password-section {
    border: 1px solid var(--border-color);
}

.scope-change-section {
    border: 1px solid var(--border-color);
}

.delete-section {
    border: 1px solid var(--danger-color);
}

/* =========================================
   Page Specific: Submissions
   ========================================= */

.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submission-details {
    font-size: 0.8em;
    color: var(--text-muted);
}

/* =========================================
   Print Styles
   ========================================= */

@media print {
    @page {
        size: landscape;
        margin: 1cm;
    }

    /* Hide non-essential elements globally on submissions page */
    .submissions-page nav,
    .submissions-page .actions-bar,
    .submissions-page .alert,
    .submissions-page footer,
    .submissions-page h2 {
        display: none !important;
    }

    /* Reset container styles for full width */
    .submissions-page .container-fluid {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Remove card styling to look cleaner on paper */
    .submissions-page .card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Ensure table fits and looks good */
    .submissions-page .table-responsive {
        overflow: visible !important;
    }

    .submissions-page .table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .submissions-page .table th,
    .submissions-page .table td {
        border: 1px solid #000 !important; /* crisper borders for print */
        color: #000 !important; /* ensure pure black text */
    }

    /* Hide the Actions column in print view */
    .submissions-page .actions-col {
        display: none !important;
    }

    /* Ensure background colors (like striping) might be removed or forced depending on browser settings,
       but usually cleaner without background colors in print */
    .submissions-page .table thead tr {
        background-color: #eee !important;
        -webkit-print-color-adjust: exact; /* try to force background color for headers */
        print-color-adjust: exact;
    }

    .submissions-page {
        background-color: #fff !important;
        color: #000 !important;
    }
}

/* =========================================
   Page Specific: Approval
   ========================================= */

.approval-page .table th,
.approval-page .table td {
    padding: 12px;
    vertical-align: top;
}

.approval-page .existing-role {
    cursor: default;
}

/* =========================================
   Page Specific: Registration
   ========================================= */

.role-option {
    margin-bottom: 15px;
}

.role-option > label {
    display: flex;
    align-items: center;
    font-weight: bold;
    margin-bottom: 2px;
}

.role-option > label > input[type="checkbox"] {
    margin-right: 8px;
}

.role-option > .helptext {
    margin-left: 25px;
    display: block;
}

.role-separator {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}