/* Print Form Stylesheet - 100% Matching "استمارة مشاركة الدورة العربية 18.pdf" */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

@page {
    size: A4 portrait;
    margin: 8mm 10mm;
}

.official-form-page {
    width: 210mm;
    min-height: 290mm;
    margin: 0 auto;
    background: #ffffff;
    padding: 10mm 14mm;
    font-family: 'Cairo', 'Traditional Arabic', Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    color: #000000;
    line-height: 1.5;
    position: relative;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.arabic-template .field-line {
    margin-bottom: 12px;
}

.arabic-template .field-title {
    min-width: 150px;
}

.arabic-form-note {
    border: 1.5px solid #111827;
    padding: 10px 14px;
    font-size: 11pt;
    line-height: 1.7;
}

/* Header Grid */
.pdf-header {
    display: grid;
    grid-template-columns: 1fr 1.6fr 1fr;
    align-items: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.pdf-header-right {
    text-align: right;
    font-size: 11pt;
    font-weight: 700;
    line-height: 1.4;
}

.pdf-header-right .svu-logo-small {
    height: 48px;
    margin-bottom: 4px;
    display: block;
}

.pdf-header-center {
    text-align: center;
}

.pdf-header-center h1 {
    font-size: 15pt;
    font-weight: 900;
    margin: 0;
    color: #000000;
}

.pdf-header-center h2 {
    font-size: 13pt;
    font-weight: 800;
    margin: 2px 0;
}

.pdf-header-center h3 {
    font-size: 11.5pt;
    font-weight: 700;
    margin: 2px 0;
}

.pdf-header-center .tourn-edition-badge {
    display: inline-block;
    font-size: 12pt;
    font-weight: 800;
    border: 1.5px solid #000000;
    padding: 1px 16px;
    border-radius: 12px;
    margin: 3px 0;
}

.pdf-header-center .academic-year {
    font-size: 11pt;
    font-weight: 700;
    margin-top: 2px;
}

.pdf-header-left {
    display: flex;
    justify-content: flex-end;
}

.photo-two-box {
    width: 32mm;
    height: 40mm;
    border: 1.5px dashed #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 9.5pt;
    font-weight: 700;
    padding: 3px;
    position: relative;
    background: #fafafa;
}

.photo-two-box img {
    position: absolute;
    inset: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    object-fit: cover;
}

.photo-two-box .photo-label {
    line-height: 1.3;
}

/* Fields Layout */
.form-body-fields {
    margin: 10px 0;
}

.field-line {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 11.5pt;
}

.field-title {
    font-weight: 800;
    white-space: nowrap;
    margin-left: 8px;
    min-width: 130px;
}

.field-dots {
    flex: 1;
    border-bottom: 1.5px dotted #333333;
    padding-bottom: 2px;
    font-weight: 700;
    color: #0b1a30;
    padding-right: 6px;
    min-height: 24px;
}

.field-two-col {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 15px;
    margin-bottom: 8px;
}

.field-two-col .field-line {
    margin-bottom: 0;
}

.field-two-col .field-title {
    min-width: 90px;
}

/* National ID 14 Digit Grid */
.national-id-line {
    display: flex;
    align-items: center;
    margin: 10px 0 14px 0;
}

.national-id-label {
    font-weight: 800;
    font-size: 11pt;
    margin-left: 12px;
    white-space: nowrap;
}

.id-grid-boxes {
    display: inline-flex;
    flex-direction: row-reverse; /* Egyptian ID reads left-to-right, Arabic layout */
    direction: ltr;
    border: 1.5px solid #000000;
}

.id-digit-cell {
    width: 24px;
    height: 28px;
    border-right: 1.5px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13pt;
    font-weight: 900;
    font-family: Arial, sans-serif;
    color: #000000;
    background: #ffffff;
}

.id-digit-cell:last-child {
    border-right: none;
}

/* Declarations Section */
.declaration-box {
    border: 1.5px solid #000000;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: #ffffff;
}

.declaration-box h4 {
    text-align: center;
    font-size: 12pt;
    font-weight: 900;
    margin: 0 0 6px 0;
    text-decoration: underline;
}

.declaration-text {
    font-size: 11pt;
    line-height: 1.8;
    text-align: justify;
}

.fill-blank {
    font-weight: 800;
    color: #0b1a30;
    border-bottom: 1px dotted #000000;
    padding: 0 4px;
}

.stamps-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 0 20px;
}

.stamp-circle {
    width: 80px;
    height: 80px;
    border: 1.5px dashed #555555;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 9.5pt;
    font-weight: 700;
    color: #555555;
    line-height: 1.3;
}

/* Medical Fitness Section */
.medical-box {
    border: 1.5px solid #000000;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.medical-title {
    font-weight: 800;
    font-size: 11pt;
}

.medical-checkboxes {
    display: flex;
    gap: 25px;
    font-size: 11pt;
    font-weight: 800;
}

.check-square {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1.5px solid #000000;
    vertical-align: middle;
    margin-left: 6px;
    text-align: center;
    line-height: 16px;
    font-size: 12pt;
    font-weight: 900;
}

.medical-approval {
    font-size: 10.5pt;
    font-weight: 700;
}

/* Youth Care Section */
.youth-care-box {
    border: 1.5px solid #000000;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.signatures-strip {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 10px;
    padding: 0 10px;
}

.sig-col {
    text-align: center;
    font-size: 10pt;
    font-weight: 800;
    min-width: 160px;
}

.sig-space {
    height: 35px;
}

/* Attachments Notice at Bottom */
.attachments-footer {
    border-top: 1.5px solid #000000;
    padding-top: 8px;
    margin-top: 8px;
    font-size: 9.5pt;
    font-weight: 700;
    line-height: 1.5;
}

.attachments-footer ul {
    margin: 4px 20px 0 0;
    padding: 0;
}

.attachments-footer li {
    margin-bottom: 2px;
}

/* Controls Toolbar (Hidden in print) */
.print-toolbar {
    max-width: 210mm;
    margin: 15px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e2430;
    padding: 12px 20px;
    border-radius: 8px;
    color: #ffffff;
}

/* Screen Mode Wrapper */
.print-screen-view {
    background: #e2e8f0;
    padding: 20px 0;
    min-height: 100vh;
}

@media print {
    body, .print-screen-view {
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .no-print, .print-toolbar, .site-navbar, .gov-header, .tournament-bar, .site-footer {
        display: none !important;
    }

    .official-form-page {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        width: 100% !important;
        min-height: auto !important;
    }
}
