/* ======================= General Styles & Variables ======================= */
:root {
    --primary-color: #00f5b4;
    --primary-dark: #00d99e;
    --secondary-color: #2c3e50;
    --accent-color: #00f5b4; /* Yellow from inspiration */
}

body {
    font-family: "Tajawal", sans-serif;
    margin: 0;
    overflow-x: hidden; /* Prevent scrolling */
}

.main-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    overflow: hidden;
}
/* ================================================= */
/* ==   Custom Scrollbar for the Entire Website   == */
/* ================================================= */

html::-webkit-scrollbar-track {
    background: #0c4849;
}

html::-webkit-scrollbar-thumb {
    background-color: #00f5b4; /* A darker grey for the thumb */
    border-radius: 10px;
}

html::-webkit-scrollbar-thumb:hover {
    background-color: #00f5b4; /* Your brand's primary green color on hover! */
}

/* Target the entire page for Firefox */
html {
    scrollbar-width: auto; /* 'auto' or 'thin' */
    scrollbar-color: #00f5b4 #0c4849; /* thumb-color track-color */
}
/* ======================= Form Section (Right Side) ======================= */
.form-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #fff;
}
.form-container {
    max-width: 400px;
    width: 100%;
}

.form-title {
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}
.form-subtitle {
    color: #777;
    margin-bottom: 40px;
}

.input-wrapper {
    margin-bottom: 25px;
}
.input-wrapper label {
    display: block;
    font-weight: 500;
    color: #888;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.input-wrapper input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    padding: 10px 5px;
    font-size: 1.1rem;
    background-color: transparent;
    transition: border-color 0.3s;
}
.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-decoration: none;
}
.forgot-password:hover {
    color: var(--primary-dark);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background-color: var(--accent-color); /* Yellow CTA Button */
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    transition: all 0.3s;
}
.btn-submit:hover {
    background-color: #00f5b4;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px #00f5b486;
}

.toggle-link a {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
}

/* === THIS IS THE SOLUTION FOR THE SELECT FIELD === */
.form-select-custom {
    /* 1. Base Styling to match text inputs */
    width: 100%;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    padding: 10px 5px;
    font-size: 1rem;
    background-color: transparent;
    transition: border-color 0.3s;

    /* 2. Removing default browser appearance */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* 3. Adding a custom arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center; /* Position the arrow on the left for RTL */
    background-size: 16px 12px;
}

.form-select-custom:focus {
    outline: none;
    border-color: #00f5b4; /* Use your primary color variable */
}
/* ======================= Branding Section (Left Side) ======================= */
.branding-section {
    background-color: #f0faff; /* Light Blue-ish bg from inspiration */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.branding-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.branding-content h1 {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 50px;
    right: 50%;
    transform: translateX(50%);
    width: 100%;
}
.branding-content h1 span {
    display: block;
}

.branding-content img {
    max-width: 120%; /* Allows image to be slightly bigger than the container */
    max-height: 90vh;
}

/* Decorative elements */
.branding-section::before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(
        circle,
        var(--primary-color) 8%,
        transparent 10%
    );
    background-size: 30px 30px;
    opacity: 0.3;
}

.branding-section::after {
    content: "";
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 400px;
    height: 400px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.2;
}

/* ======================= Animations & Responsive ======================= */
/* Form animation */
#login-form,
#register-form {
    animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.d-none {
    display: none;
}

/* Responsive */
@media (max-width: 992px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }
    .branding-section {
        display: none; /* Hide branding section on mobile for simplicity */
    }
    .form-section {
        min-height: 100vh;
    }
}
