/* Import fonts and icons to match Angular app */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&family=Poppins:wght@200;300;400;500;600;700;800;900&display=swap');

/* CSS Variables matching Angular app */
:root {
    --primary-color: #8B734A;
    --secondary-color: #3E3E1D;
    --font-small: 2vw;
    --font-medium: 3vw;
    --font-large: 4vw;
    --padding: 2vh;
    --section-margin: 60px;

    /* Space variables */
    --space-xs: clamp(0.5rem, 1vw, 1rem);
    --space-sm: clamp(1rem, 2vw, 1.5rem);
    --space-md: clamp(1.5rem, 3vw, 2rem);
    --space-lg: clamp(2rem, 4vw, 3rem);
    --space-xl: clamp(3rem, 5vw, 4rem);
}

body {
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.6;
    background-color: #f5f5f5;
    font-family: "Almarai", sans-serif;
}

/* Apply font based on language like Angular app */
html[lang="ar"] body {
    font-family: "Cairo", sans-serif;
}

html[lang="en"] body {
    font-family: "Poppins", sans-serif;
}

/* Scrollbar styling from Angular */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 50px;
}

::-webkit-scrollbar-track {
    box-shadow: 0 0 5px #00000069 inset;
}

::selection {
    background-color: var(--primary-color);
    color: #fff;
}

nav {
    background: #FFF !important;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04);
    transition: all 0.5s;
}

.main-color {
    color: var(--primary-color) !important;
}

.primary-color {
    color: var(--primary-color) !important;
}

.primary-bg {
    background-color: var(--primary-color) !important;
}

.main-bg {
    background-color: var(--primary-color) !important;
}

/* Updated register section to match Angular */
.register {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

@media (max-width:992px) {
    .register {
        width: 100%;
        padding: 20px;
    }
}

.register .card {
    width: 573px;
    border-radius: 15px;
    border: 1px solid var(--primary-color) !important;
    background: #FFF;
    box-shadow: 0px 14px 24px 0px rgba(0, 0, 0, 0.04);
}

@media (max-width:992px) {
    .register .card {
        width: 99%;
    }
}

.register .login .card {
    width: 100%;
}

.register h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 700;
    line-height: 170%;
    letter-spacing: -0.308px;
}

/* Global button styling matching Angular */
.register button,
.global-btn {
    padding: 6px 20px;
    border-radius: 75px;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(107deg, var(--primary-color) 3.96%, var(--secondary-color) 96.25%);
    transition: 0.5s !important;
}

.register button::before,
.global-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(107deg, var(--primary-color) 3.96%, var(--secondary-color) 96.25%);
    z-index: -1;
    transition: opacity 0.7s ease;
}

.register button:hover::before,
.global-btn:hover::before {
    opacity: 0;
}

.register button::after,
.global-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(107deg, var(--secondary-color) 3.96%, var(--primary-color) 96.25%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.register button:hover::after,
.global-btn:hover::after {
    opacity: 1;
}

.register button:hover,
.global-btn:hover {
    color: #fff !important;
    text-decoration: none;
    transition: all .5s;
}

/* Login button variant */
.register button.login {
    color: var(--secondary-color);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    border-radius: 76px;
    border: 1px solid var(--secondary-color);
    background: #FFF;
    width: 100%;
}

.register button.login:hover {
    background: linear-gradient(107deg, var(--primary-color) 3.96%, var(--secondary-color) 96.25%);
    color: #fff;
}

/* Main outline button */
.main-outline-btn {
    border: 1px solid var(--primary-color) !important;
    padding: 6px 12px;
    color: var(--primary-color) !important;
    transition: 0.4s;
    background-color: transparent !important;
    border-radius: 75px;
}

.main-outline-btn:hover {
    color: #fff !important;
    background-color: var(--primary-color) !important;
}

/* Footer styling */
.footer {
    background: #FBFBFB;
}

.footer h5 {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
    line-height: 150%;
    letter-spacing: -0.22px;
}

.footer a {
    color: #4A4A4A;
    font-size: 16px;
}

.footer .brdr {
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.20);
}

/* Form styling */
input:focus,
select {
    outline: 1;
    box-shadow: none !important;
    border-color: var(--primary-color);
}

input::placeholder {
    font-size: 16px !important;
}

/* Select styling for RTL/LTR */
select {
    appearance: none;
    background-position: right 10px center;
    background-repeat: no-repeat;
    padding-right: 30px;
}

[dir="rtl"] select {
    background-position: left 10px center;
    padding-left: 30px;
    padding-right: 10px;
}

/* Verification code styling */
.verification-code-container {
    text-align: center;
    font-family: 'Almarai', sans-serif;
    direction: rtl;
    margin: 20px;
}

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.code-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
}

.code-input:focus {
    border-color: var(--primary-color);
}

.submit-button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.submit-button:hover {
    background-color: #6b5a38;
}

.error-message {
    color: red;
    font-size: 14px;
    margin-top: 10px;
}

/* Utility classes */
.logoutiframe {
    display: none;
    width: 0;
    height: 0;
}

.hide {
    display: none;
}

.cp {
    cursor: pointer;
}

.cursor-pointer {
    cursor: pointer;
}

.active {
    color: var(--primary-color) !important;
    font-weight: 700;
}

/* Typography matching Angular */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    line-height: 1.3;
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    line-height: 1.4;
}

h5 {
    font-size: clamp(1.125rem, 2vw, 1.75rem);
    line-height: 1.4;
}

h6 {
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    line-height: 1.5;
}

p {
    font-size: clamp(1rem, 1.3vw, 1.1rem);
    line-height: 1.8;
}

.btn {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    font-weight: bold;
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
}

.lead {
    font-size: clamp(1.125rem, 1.5vw, 1.3rem);
}

/* Section spacing */
section {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
}

/* Responsive utilities */
.modal-fullscreen-mysize-down {
    min-width: 40%;
}

/* ITI phone input RTL support */
.iti__country-list--dropup {
    direction: ltr;
}

/* Additional general button for consistency */
.general-button {
    border: none;
    overflow: hidden;
    transition: 0.5s !important;
    background: linear-gradient(107deg, var(--primary-color) 3.96%, var(--secondary-color) 96.25%);
    color: #fff;
    position: relative;
}

.general-button:hover {
    background: linear-gradient(107deg, #6b5a38 3.96%, #2e2e18 96.25%) !important;
    color: #fff !important;
    text-decoration: none;
    transition: all .5s;
}

.general-button::before {
    background-color: hsla(0, 0%, 100%, .25);
    border-right: 1px solid #fff;
    content: "";
    height: 100%;
    left: 0;
    opacity: 1;
    position: absolute;
    top: 0;
    transform: translate(-105%);
    transition: all .5s;
    width: 100%;
    z-index: 1;
}

.general-button:hover::before {
    left: 100%;
    opacity: 0;
}