﻿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);
}

/* Responsive Styles */
@media (max-width: 768px) {
    body {
        font-size: var(--font-size-large);
    }
}


/* 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;
    }


/* 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;
}



.form-panel {
    border-top: 1px solid grey;
    border-left: 1px solid grey;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 5px;
}

.form-title {
    font-weight: bold;
    background-color: #ddd9c3;
    border-top: 1px solid #f0f0f0;
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #a0a0a0;
    border-bottom: 1px solid #a0a0a0;
    padding: 5px;
}


.form-subtitle {
    font-weight: bold;
    background-color: #ddd9c3;
    border-top: 1px solid #f0f0f0;
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #a0a0a0;
    border-bottom: 1px solid #a0a0a0;
    padding: 5px;
}

.form-panel .row {
    margin: 2px 0px;
}

.custom-form-label {
    font-weight: bold;
    background-color: #eeece1;
    border-top: 1px solid #f0f0f0;
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #a0a0a0;
    border-bottom: 1px solid #a0a0a0;
    padding: 5px;
}

.custom-form-input textarea {
    width: 100%;
    height: 100%;
    border-top: 1px solid #f0f0f0;
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #9e9e9e;
    border-bottom: 1px solid #9e9e9e;
}

.custom-textarea-input {
    width: 100%;
    height: 100%;
}

.custom-form-input input {
    width: 100%;
    height: 100%;
    border-top: 1px solid #f0f0f0;
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #9e9e9e;
    border-bottom: 1px solid #9e9e9e;
}

.custom-text-input {
    width: 100%;
    height: 100%;
}

.input-container {
    border-top: 1px solid #f0f0f0;
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #9e9e9e;
    border-bottom: 1px solid #9e9e9e;
}

input.underline-text-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid black;
}

.navigation-button {
    background-color: #b2975b !important;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}

.custom-radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-family: monospace;
    width: 100%;
}

    .custom-radio input[type="radio"] {
        display: none;
    }

    .custom-radio span {
        display: inline-block;
        width: auto;
        padding: 10px;
        text-align: center;
        white-space: nowrap; /* Prevent span from breaking */
    }

    .custom-radio input[type="radio"]:checked + span::before {
        content: "(✓)";
    }

    .custom-radio input[type="radio"]:not(:checked) + span::before {
        content: "( )";
    }

.radio-group {
    position: relative;
    margin-bottom: 5px;
}

/* Replace existing error styles with */
.error {
    color: #dc3545;
    font-size: 0.875em;
    max-height: 0;
    height: 100%;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 0;
}

.field-validation-error {
    max-height: 100px;
    opacity: 1;
    margin-top: 5px;
    padding: 5px;
}

.field-validation-valid {
    max-height: 0;
    opacity: 0;
    border-color: black;
}

.radio-group .field-validation-error {
    position: relative;
    bottom: 0;
    left: 0;
    margin-top: 5px;
    display: block !important;
    height: auto;
}

/* Conditional field styling */
.required-field {
    border-color: #dc3545;
}

/* Form input container */
.custom-form-input {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
}

/* Make sure error spans are properly placed */
[data-valmsg-for="Submission.ProjectType"],
[data-valmsg-for="Submission.ProjectCurrentState"],
[data-valmsg-for="Submission.ProjectDependency"] {
    display: block;
    margin-top: 5px;
}