html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

@font-face {
    font-family: 'Regular Sakkal Majalla'; /* Specify the name for the font */
    src: url('../font/Sakkal_Majalla_Regular/Sakkal_Majalla_Regular.ttf') format('truetype'); /* Specify the path to the font file and its format */
}

@font-face {
    font-family: 'The Year of The Camel'; /* Specify the name for the font */
    src: url('../font/alfont_com_TheYearofTheCamel-Medium.otf') format('opentype'); /* Specify the path to the font file and its format */
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'URW DIN Arabic'; /* Specify the name for the font */
    src: url('../font/alfont_com_AlFont_com_URW-DIN-Arabic.ttf') format('truetype'); /* Specify the path to the font file and its format */
    font-weight: normal;
    font-style: normal;
}


:root {
    /* Theme Colors */
    --primary-color: #2c3e50;
    --secondary-color: #2980b9;
    --background-color: #ffffff;
    --text-color: #231f20;
    --link-color: #e74c3c;
    /* Font Styles */
    --font-family: 'URW DIN Arabic', serif;
    --title-font-family: 'The Year of The Camel', serif;
    --font-size-base: 12pt;
    --font-size-large: 18pt;
    --font-size-title: 28px;
    /* Directionality */
    --text-direction: rtl;
}

/* Global Styles */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-color);
    background-color: var(--background-color);
    direction: var(--text-direction);
}

/* Headings */
h1, h2, h3 {
    color: var(--primary-color);
    margin: 0.5em 0;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* Prevent reversal of characters */
input {
    direction: ltr;
    text-align: right;
}

/* no arrows for selects */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url(../icons/arrow_drop_down.svg);
    background-repeat: no-repeat;
    background-position: left center;
    padding-right: 5px;
    padding-left: 25px;
}

    /* For Safari specifically */
    select::-webkit-appearance {
        appearance: none;
    }


/* Login Style Begin */

.login-container {
    box-shadow: 15px 20px 0px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 50px;
    background: white;
}

.banner-sec img {
    width: 100%;
    border-radius: 10px;
}

.login-block {
    background: -webkit-linear-gradient(to bottom, #04293d, #68b8bc);
    background: linear-gradient(to bottom, #04293d, #68b8bc);
    float: left;
    width: 100%;
    height: 100%;
    padding: 80px 0;
    position: absolute;
    right: 0px;
    align-content: center;
}

    .login-sec h2 {
        margin-bottom: 30px;
        font-weight: 800;
        font-size: 30px;
        color: #c0a168;
    }

        .login-sec h2:after {
            content: " ";
            width: 100px;
            height: 5px;
            background: #ccc;
            display: block;
            margin-top: 20px;
            border-radius: 3px;
            margin-left: auto;
            margin-right: auto;
        }

.credentials-cotainer {
    margin: 60px 10px;
}

.login-button {
    background: #b4985d;
    color: white;
    font-weight: bold;   
}


/* Login Style End */


/* Public Sector Style Begin */

label.form-label {
    font-size: var(--font-size-base);
    font-weight: bold;
}

.hrh-table th {
    text-align: center;
    vertical-align: middle;
    background-color: #02293e;
    color: white;
}

.hrh-table td {
    text-align: center;
    vertical-align: middle;
}


.section-title {
    color: white;
    font-size: var(--font-size-large);
    font-weight: bold;
    background: #02293e;
    border-radius: 5px;
    padding: 5px 5px;
}

.input-row {
    padding: 10px 5px;
    border-bottom: 1px solid #8080802e;
}


.btn-group {
    width: 100%;
    justify-content: space-evenly;
    margin: 10px 0px;
}

.sub-table-header {
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
}

.red {
    color: red;
    font-weight: bold;
}

.women-needs-section label {
    position: absolute;
}


.women-needs-section textarea {
    width: 98%;
    border-top: none;
    border-left: none;
    border-right: none;
    margin-right: 20px;
}

.writing-line-textbox label {
    margin: 10px 0px;
    font-size: var(--font-size-base);
    font-weight: bold;
    color: #04293d;
}

.writing-line-textbox textarea {
    width: 98%;
    border-top: none;
    border-left: none;
    border-right: none;
    margin-right: 20px;
}

.hrh-table textarea {
    width: 100%;
    position: relative;
    border: none;
    min-width: 150px;
}

.navigation-button {
    background-color: #b2975b !important;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}

.back-button {
    background-color: #5c636a !important;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}

.criterion-header {
    background: #65b8bd30;
    padding: 20px 30px;
    border-radius: 24px;
    margin: 30px 0px;
    width: 100%;
    font-size: var(--font-size-large);
}

.criterion-table-descriptor {
    margin: 25px 0px;
}

    h4 {
        font-size: 22px !important;
        font-weight: bold !important;
    }

.hrh-table {
    margin: 25px 0px;
}

/* Make the menu buttons styled as buttons and vertically aligned */
.nav-link {
    display: block;
    padding: 15px 20px;
    border: 1px solid transparent;
    margin: 0px;
    text-align: center;
    color: white !important;
    font-weight: bold;
    text-decoration: none;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

    /* Invert colors when the tab is active */
    .nav-link.active {
        background-color: white !important;
        color: #02293e !important;
        font-weight: bold;
    }

    /* Hover effect to invert colors */
    .nav-link:hover {
        background-color: white !important;
        color: #02293e !important;
        text-decoration: none;
    }

.help-link {
    display: block;
    padding: 15px 20px;
    border: 1px solid transparent;
    margin: 0px;
    text-align: center;
    color: white !important;
    font-weight: bold;
    text-decoration: none;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}


    .help-link:hover {
        background-color: white !important;
        color: #02293e !important;
        text-decoration: none;
    }

/* Optional: Add a small space between the menu items for separation */
.nav-item {
    border-bottom: 1px solid #b2975b;
}


.criterion-title {
    font-size: var(--font-size-title);
    font-weight: bold;
    margin: 30px 0px;
    text-align: center;
    /* background: #04293d; */
    color: white;
    width: 100%;
    padding: 20px;
    /* border-radius: 25px; */
    position: relative;
    color: #b2975b;
    border-bottom: 6px solid #04293d;
}

.coordinator-section {
    background: white;
    color: black;
    border-bottom: 5px solid black;
    width: 100%;
    border-radius: 0px;
    margin: 20px 0px;
    font-size: var(--font-size-large);
    font-weight: bold;
    padding: 10px;
}

.radio-group {
    margin: auto 15px;
}

.hrh-table input[type="text"], .hrh-table input[type="number"], .hrh-table input[type="email"] {
    width: 100%;
    min-height: 100px;
    border: none;
    text-align: center;
}

/* Tooltip container */
.sub-table-header {
    position: relative;
    cursor: pointer; /* Optional: to indicate it's interactive */
    padding: 10px;
    background-color: #f1f1f1; /* Just for visual clarity */
}

    .sub-table-header[data-tooltip]:after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 150px;
        padding: 8px;
        background-color: rgba(0, 0, 0, 0.75);
        color: white;
        font-size: 12px;
        border-radius: 4px;
        white-space: nowrap;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        z-index: 10;
        text-wrap-mode: wrap;
        width: 100%;
    }

    /* Tooltip appears when hovering */
    .sub-table-header[data-tooltip]:hover::after {
        visibility: visible;
        opacity: 1;
    }

/* Public Sector Style End */


.logout-section {
    font-weight: bold;
    color: white;
    margin: 20px auto;
    text-align: center;
}

.logout-button {
    color: white;
    margin-top: 20px;
    font-weight: bold;
    border-top: 1px solid white;
    border-radius: 0px;
}

    .logout-button:hover {
        background: #b2975b;
        border: none;
        border-radius: 10px;
    }

.fixed-container {
    height: 100vh; /* Full height container */
    width: 100%; /* Full width container */
}

.final-criterion-message {
    border: solid black;
    border-radius: 10px;
    padding: 10px;
    width: fit-content;
    margin: auto;
}

    .final-criterion-message p {
        margin: 0px;
        text-align: right;
    }

.profile-image img {
    max-height: 250px;
    aspect-ratio: 4 / 5;
}


.btn-group {
    margin: 30px auto;
}

.input-validation-error {
    border-color: red;
}


/* Remove increment arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* text field appearance */
input[type="number"] {
    -moz-appearance: textfield;
}

.submission-success-message {
    color: white;
    font-weight: bold;
    font-size: 26px;
    background: #b1975e;
    /*width: 50%;
    height: 50%;*/
    margin: auto;
    position: absolute;
    top: 50%;
    left: calc(50% - 100px);
    transform: translate(-50%, -50%);
    border-radius: 10px;
    padding: 10px;
}


.custom-file-upload {
    display: inline-block;
    cursor: pointer;
    position: relative; /* Position relative for the text overlay */
    width: 100%;
    padding: 5px;
    border: 1px solid black;
    border-radius: 5px;
}

    .custom-file-upload:hover {
        background-color: #e9ecef;
    }

/* Message styling */
.custom-file-upload-message {
    color: #939598;
    margin: 5px;
    font-size: var(--font-size-base);
    vertical-align: middle;
    padding-right: 30px; /* Add some space for the icon */
    z-index: 1;
}

/* Optional: Styling for hover effect */
.custom-file-upload:hover .custom-file-upload-message {
    color: #333;
}

/* Ensure the input is still focusable and clickable */
.custom-file-upload input[type="file"] {
    position: absolute; /* Position input behind the label elements */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Make it invisible but clickable */
    z-index: 2; /* Ensure it's above the background but below the text/image */
}

.file-upload-text {
    position: absolute; /* Position the text over the image */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the text */
    pointer-events: none; /* Prevent clicks on the text */
    color: #999; /* Optional: text color */
}

/* Optional: styling for the image inside the label */
.custom-file-upload .form-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 1;
    width: 30px;
}

p.file-caption {
    font-size: 8pt;
}

.Information-section {
    background-color: #04293d;
    place-items: center;
    display: grid;
    border: 1px solid white;
}

.Information-section-title {
    text-align: center;
    font-weight: bold;
    margin: 10px;
    color: white;
    vertical-align: middle;
    display: flex;
    justify-content: center;
    align-items: center;
}

.alert {
    margin: 1rem;
}

.btn-help {
    background: #538c1ecc;
    border: none;
    color: white;
    font-weight: bold;
}

.btn-help:hover {
    text-decoration: none;
}

.register-button {
    background: #949494;
    color: white;
    font-weight: bold;
}

.register-button:hover {
    text-decoration: none;
}

.radio-group h5 {
    font-size: var(--font-size-base);
    font-weight: bold;
    color: #04293d;
}

/* restrict size of first column */
.hrh-table td:first-child,
.hrh-table th:first-child {
    max-width: 200px; 
}

.request-success {
    color: green;
    font-weight: bold;
    font-size: 22px;
    margin: 10px auto;
    border-radius: 10px;
    padding: 10px;
    max-width: 600px;
}

.total-input {
    background-color: #fafafa;
    color: #545454;
}

/* Default desktop styles */
.navigation-menu {
    background-color: #02293e;
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 200px;
    padding-top: 20px;
    padding-right: 0px;
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: auto;
}

/* CSS for desktop screens (where the menu is visible) */
@media (min-width: 1024px) {
    main {
        margin-right: 200px;
        transition: margin-right 0.3s ease-in-out;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .btn-group button {
        max-width: 150px;
        border-radius: 5px !important;
    }
}

/* Mobile responsiveness */
@media (max-width: 1024px) {

    .btn-group button {
        max-width: 100px;
        border-radius: 5px !important;
    }

    .mobile-menu-toggle {
        display: block; /* Make the button visible on mobile */
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1001; /* Ensure it's on top of everything */
        background-color: #02293e;
        color: white;
        border: none;
        padding: 10px 15px;
        cursor: pointer;
        font-size: 24px;
        border-radius: 5px;
    }

    /* Hide the default vertical menu on mobile */
    .nav {
        display: none;
    }

    /* Container for the mobile menu */
    #mobileMenuContainer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000; /* Overlays all other content */
        background-color: rgba(2, 41, 62, 0.95); /* Semi-transparent overlay */
        display: flex; /* For centering content */
        justify-content: center;
        align-items: center;
        /* Start with the menu hidden and off-screen */
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
    }

        /* State when the menu is visible */
        #mobileMenuContainer.menu-visible {
            transform: translateY(0);
        }

        /* Style the horizontal menu inside the overlay */
        #mobileMenuContainer ul {
            padding: 70px;
            display: block;
            width: 100%;
        }       

        
    .form-segment .row.input-row {
        display: flex;
        flex-direction: column;
    }

        .form-segment .row.input-row > [class*="col-"] {
            width: 100%;
            max-width: 100%;
        }

        .form-segment .row.input-row > .col-3 {
            margin-bottom: 0.5rem;
        }

    .responsive-table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

        .responsive-table-container table {
            width: max-content;
            min-width: 100%;
        }

    :root {        
        --font-size-base: 10pt;
        --font-size-large: 14pt;
        --font-size-title: 24px;        
    }

    .section-title {        
        margin: 0px 10px;
    }
}