﻿body {
    font-family: Calibri;
    background-color: #f4f4f4;
    margin: 20px;
    font-size: 15px;
    /*transform: scale(0.9);*/
}

@font-face {
    font-family: 'arbfonts-ge_ss_two_light';
    src: url('../fonts/arbfonts-ge_ss_two_light.otf') format('opentype');
}

@font-face {
    font-family: 'arbfonts-ge_ss_two_medium';
    src: url('../fonts/arbfonts-ge_ss_two_medium.otf') format('opentype');
}

.arabic-fonts {
    font-family: 'arbfonts-ge_ss_two_medium';
}

input, select {
    text-align: center;
    border: 0;
    -webkit-appearance: none;
}

/* 1. Remove the border from the container to avoid triple lines at the edges */
.table-container {
    max-width: 80%;
    margin: auto;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    direction: ltr;
    border: 1px solid #0070c0;
}

/* 2. Fix the Header border */
.header-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #0070c0;
    color: #fff;
    font-weight: bold;
    padding: 10px;
    border: 1px solid #0070c0; /* The outer frame */
}

/* 3. The Core Fix: Use negative margins to overlap borders */
.data-cell, .data-cell-ara, .input-cell {
    padding: 10px;
    border: 1.7px solid #0070c0;
    margin-right: -1px; /* Overlaps right border with next cell's left border */
    margin-bottom: -1px; /* Overlaps bottom border with next row's top border */
}

/* 4. Remove the border-bottom from the row since cells handle borders now */
.data-row {
    display: grid;
    grid-template-columns: 18% 64% 18%;
    background-color: #fff;
    border-bottom: none;
}

/* 5. Clean up cell-specific styles */
.data-cell {
    font-size: 12px; /* Fixed typo from 12spx */
    font-family: Calibri;
    font-weight: bolder !important;
    color: #5d7081;
    background-color: #ededed;
}

.data-cell-ara {
    font-size: 12px; /* Fixed typo from 12spx */
    font-family: 'arbfonts-ge_ss_two_medium';
    font-weight: bolder !important;
    color: #5d7081;
    background-color: #ededed;
}

.input-cell {
    background-color: #f9f9f9;
}

.header-cell {
    /*padding: 0 10px;*/
    text-align: right; /* Default text align for RTL */
}

.header-cell-ara {
    /*padding: 0 10px;*/
    text-align: right; /* Default text align for RTL */
    font-family: 'arbfonts-ge_ss_two_medium';
}

    .header-cell:first-child {
        text-align: left; /* Align English header to the left */
    }

    .header-cell:last-child {
        font-family: 'Almarai', sans-serif;
    }

.data-row .data-cell:last-child {
    text-align: right;
    direction: rtl; /* Ensures punctuation like parentheses stays on the correct side */
    font-family: 'Almarai', sans-serif;
}

.data-row .data-cell-ara:last-child {
    text-align: right;
    direction: rtl; /* Ensures punctuation like parentheses stays on the correct side */
    font-family: 'arbfonts-ge_ss_two_medium';
}

.section {
    max-width: 80%;
    margin: auto;
    margin-top: 10px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    direction: ltr;
    border: 1px solid #0070c0;
    direction: ltr;
}

.section-header {
    display: flex;
    justify-content: space-between;
    background-color: #0070c0;
    color: #fff;
    /*padding: 5px 10px;*/
    padding: 0 10px 0 10px;
    font-size: 12px;
    height: 10%;
}

.signature-section {
    font-family: 'Almarai', sans-serif;
    display: flex;
    justify-content: space-between;
    /*margin-top: 30px;*/
    border-top: 1px solid #0070c0;
    padding: 10px;
    font-size: 12px;
    /*margin-bottom: 13%;*/
    color: #5d7081;
    font-weight: bolder;
    min-height: 100px !important;
}

/* Specific styling for the acknowledgment section */
.acknowledgment-content {
    /*border: 1px solid #000;*/
    /*border-top: none;*/
    padding: 10px;
    /*font-family: 'Almarai', sans-serif;*/
    font-family: 'arbfonts-ge_ss_two_medium';
}

    .acknowledgment-content p {
        font-size: 12px;
        margin: 0 0 10px 0;
        text-align: justify;
        position: relative;
        padding-right: 15px;
        direction: rtl;
    }

    .acknowledgment-content ::before {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 4px;
    }


.form-header {
    max-width: 80%;
    margin: auto;
    /*box-shadow: 0 0 5px rgba(0,0,0,0.1);*/
    /*border: 1px solid #0070c0;*/
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 24px;
}

.title-arabic {
    color: #0070c0; /* ABK Blue color approximation */
    text-align: center;
    width: 100%;
    line-height: 1.4;
    /*font-family: 'Almarai', sans-serif;*/
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: -17%;
}

.logo-text {
    color: #0070c0;
    font-size: 30px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: left;
}

.title-english {
    color: #0070c0;
    /*font-size: 18px;*/
    font-weight: bold;
    margin-top: 15px;
    text-align: center;
    font-family: 'Almarai', sans-serif;
}

.header-bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 14px;
    color: #0070c0;
    direction: ltr;
    font-family: 'Almarai', sans-serif;
    padding: 7px;
}

.date-section {
    display: flex;
    gap: 5px;
    white-space: break-spaces;
    align-items: center;
    white-space: nowrap;
}

    .date-section:last-child {
        direction: rtl;
    }

.error {
    border-color: red;
    outline: 2px solid red;
    background-color: #FF7F7F;
}
