/* HR Letter Pack — page-specific styles only (shared UI comes from tools-common.css) */

.hrlp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .hrlp-layout {
        grid-template-columns: 1fr;
    }
}

/* Top row: letter type + output language */
.hrlp-toprow {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 20px;
}

@media (max-width: 520px) {
    .hrlp-toprow {
        grid-template-columns: 1fr;
    }
}

.hrlp-langtoggle {
    display: inline-flex;
    border: 1px solid var(--border, #e2e5ee);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-light, #f5f6fa);
}

.hrlp-lang {
    margin: 0;
    cursor: pointer;
}

.hrlp-lang input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hrlp-lang span {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-medium, #5b6172);
    transition: all 0.15s ease;
    user-select: none;
}

.hrlp-lang input:checked + span {
    background: var(--primary, #5f7cff);
    color: #fff;
}

/* Section headings inside the form */
.hrlp-sec {
    font-size: 15px;
    font-weight: 700;
    margin: 22px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border, #e2e5ee);
}

.hrlp-hint {
    font-size: 13px;
    color: var(--text-medium, #5b6172);
    margin: -4px 0 12px;
}

.hrlp-span2 {
    grid-column: 1 / -1;
}

/* ---- Preview column ---- */
.hrlp-preview {
    position: sticky;
    top: 90px;
}

.hrlp-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.hrlp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
}

.hrlp-btn-print {
    background: var(--text-dark, #1f2430);
}

/* ---- The printable letter sheet ---- */
.hrlp-sheet {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e2e5ee;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(20, 25, 45, 0.08);
    padding: 48px 44px;
    min-height: 560px;
    font-family: Georgia, 'Times New Roman', 'Noto Kufi Arabic', serif;
    font-size: 15px;
    line-height: 1.9;
}

.hrlp-sheet[dir="rtl"] {
    font-family: 'Noto Kufi Arabic', Georgia, serif;
}

.hrlp-head {
    text-align: center;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 2px solid #1a1a1a;
}

.hrlp-co {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hrlp-coaddr {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
}

.hrlp-date {
    text-align: end;
    font-size: 14px;
    margin-bottom: 20px;
}

.hrlp-to {
    font-weight: 600;
    margin-bottom: 14px;
}

.hrlp-subject {
    font-weight: 700;
    text-decoration: underline;
    text-align: center;
    margin: 8px 0 22px;
}

.hrlp-body p {
    margin: 0 0 14px;
    text-align: justify;
}

.hrlp-sign {
    margin-top: 40px;
}

.hrlp-signoff {
    margin-bottom: 40px;
}

.hrlp-signline {
    width: 200px;
    max-width: 60%;
    border-top: 1px solid #1a1a1a;
    margin-bottom: 6px;
}

.hrlp-signer {
    font-weight: 700;
}

.hrlp-signtitle,
.hrlp-signco {
    font-size: 14px;
    color: #333;
}

/* Salary breakdown table */
.hrlp-brk {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 16px;
    font-size: 14px;
}

.hrlp-brk th,
.hrlp-brk td {
    border: 1px solid #cfd3de;
    padding: 8px 12px;
    text-align: start;
}

.hrlp-brk thead th {
    background: #f0f2f8;
    font-weight: 700;
}

.hrlp-brk-total td {
    font-weight: 700;
    background: #f7f8fc;
}

/* ---- Print: show only the letter sheet ---- */
@media print {
    body * {
        visibility: hidden !important;
    }
    #hrlpSheet,
    #hrlpSheet * {
        visibility: visible !important;
    }
    #hrlpSheet {
        position: absolute;
        inset-block-start: 0;
        inset-inline-start: 0;
        width: 100%;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }
    @page {
        margin: 20mm;
    }
}
