@font-face {
    font-family: 'BHoma';
    src: url('/static/fonts/BHoma.ttf') format('truetype');
}

@font-face {
    font-family: 'BYekan';
    src: url('/static/fonts/BYekan.ttf') format('truetype');
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #87cefa, #1e90ff);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-top: 50px;
}

.signup-container {
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
}

.logo {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

.logo img {
    width: 80px;
    height: auto;
}

input, button {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.submit-button {
    background-color: #28a745;
    color: white;
}

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

.upload-button {
    background-color: #007bff;
    color: white;
}

.upload-button:hover {
    background-color: #0056b3;
}

.cancel-button {
    background-color: #dc3545;
    color: white;
}

.cancel-button:hover {
    background-color: #c82333;
}

.modal {
    display: none; 
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    width: 90%;
    max-width: 400px; 
    background: white;
    border: 2px solid black;
    padding: 20px;
    border-radius: 15px;
    z-index: 1000; 
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5); 
}

.modal.active {
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 999;
}

.modal-backdrop.active {
    display: block; 
}

canvas {
    border: 1px solid #ccc;
    width: 100%;
    height: 200px;
}

.alert {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.password-requirements {
    text-align: right;
    margin-bottom: 10px;
}

.requirement {
    color: red;
    font-size: 0.9rem;
}

.requirement.valid {
    color: green;
}

.login-container, .signup-container {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 400px;
    backdrop-filter: blur(10px);
    margin-top: 350px; 
}

.logo img {
    width: 100px;
    margin-bottom: 10px; 
}

h1 {
    font-family: 'BHoma', Tahoma, Arial, sans-serif;
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

h2 {
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
    font-size: 1em;
    color: #333;
    margin-bottom: 15px;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

input[type="text"], input[type="password"], input[type="file"] {
    margin: 10px;
    padding: 10px;
    width: calc(100% - 40px);
    border: 1px solid #ccc;
    border-radius: 4px;
    direction: rtl;
    text-align: right;
    font-family: 'BYekan', Tahoma, Arial, sans-serif; 
}

label {
    text-align: right;
    width: calc(100% - 40px);
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9em;
    font-family: 'BYekan', Tahoma, Arial, sans-serif; 
}

label[for="user-photo"], label[for="green-card"] {
    text-align: left; 
}

button {
    margin: 10px;
    padding: 10px 20px;
    background-color: #4682b4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-family: 'BYekan', Tahoma, Arial, sans-serif; 
}

button:hover {
    background-color: #4169e1;
}

button[type="button"] {
    background-color: #ccc;
}

button[type="button"]:hover {
    background-color: #999;
}

.password-requirements {
    text-align: right;
    margin-bottom: 5px;
    width: calc(100% - 40px);
    font-size: 0.7em;
}

.requirement {
    color: red;
    margin: 2px 0;
}

.requirement.valid {
    color: green;
}

hr {
    width: 100%;
    border-top: 1px solid #ccc;
    margin: 20px 0;
}

p {
    margin: 10px 0;
    color: #333;
    font-size: 0.9em;
}

a {
    color: #4682b4;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.remember-me-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: calc(100% - 40px);
    margin: 10px 0;
}

label.remember-me {
    display: flex;
    align-items: center;
    color: #333;
    font-size: 0.9em;
    white-space: nowrap;
    margin-left: auto;
}

input[type="file"] {
    text-align: left; 
}

@media (max-width: 768px) {
    .signup-container {
        padding: 15px;
        width: 95%;
    }

    .logo img {
        width: 70px;
    }

    h1 {
        font-size: 1.3em;
    }
}

.route-container {
    margin-bottom: 15px;
}

.route-fields {
    display: flex;
    align-items: center;
    gap: 10px; 
}

.route-fields input {
    flex: 1; 
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.route-separator {
    font-weight: bold;
    white-space: nowrap;
}

.plate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.plate-box {
    position: relative;
    width: 250px;
    height: auto;
}

.plak {
    width: 100%;
    height: auto;
}

.plate-text {
    position: absolute;
    top: 55%;
    left: 40%; 
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: black;
    text-align: center;
}

.plate-right {
    margin-right: 15px; 
}

.plate-middle {
    margin-right: 4px;
    margin-left: -12px; 
}

.plate-left {
    margin-left: -15px; 
}

.plate-text input {
    width: 40px; 
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    background: transparent;
    outline: none;
    color: black;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
}

/* ظرف کلی پلاک ایران */
.iran-plate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

/* باکس اصلی پلاک ایران */
.iran-plate-box {
    position: relative;
    width: 250px;  /* همان اندازه پلاک تاکسی */
    height: auto;
}

/* تصویر پلاک ایران */
.iran-plak {
    width: 100%;
    height: auto;
}

/* بخش وسط (عدد سه رقمی، حرف فارسی، عدد دو رقمی) */
.iran-plate-text {
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: black;
    text-align: center;
    z-index: 10;
}

/* عدد سه رقمی سمت چپ */
.iran-plate-left {
    width: 45px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: transparent;
    color: black;
    border: none;
    outline: none;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
}

/* منوی کشویی حرف فارسی */
.iran-plate-middle {
    width: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: transparent;
    color: black;
    border: none;
    outline: none;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
    -webkit-appearance: none; /* حذف استایل پیش‌فرض مرورگر */
}

/* عدد دو رقمی سمت راست */
.iran-plate-right {
    width: 35px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: transparent;
    color: black;
    border: none;
    outline: none;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
}


.iran-plate-text input,
.iran-plate-text select {
    width: 45px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: transparent !important;
    color: black;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    appearance: none;
    -webkit-appearance: none; /* حذف استایل پیش‌فرض موبایل */
    -moz-appearance: none;
    display: inline-block;
    position: relative;
    z-index: 10;
}

/* عدد ۴۶ در بالا سمت راست */
.iran-plate-46 {
    position: absolute;
    top: 2px; /* فاصله از بالا */
    right: -7px; /* فاصله از راست */
    width: 30px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    background: transparent;
    color: black;
    border: none;
    outline: none;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
}

/* 📌 استایل انتخاب نوع پلاک (کوچکتر و متناسب با بقیه فیلدها) */
#plate-type {
    font-family: 'BYekan', Tahoma, Arial, sans-serif; 
    font-size: 1rem;
    text-align: center;
    width: 100%;
    max-width: 250px;  /* ✅ کوچکتر کردن عرض */
    padding: 6px; /* ✅ کاهش ارتفاع */
    margin-bottom: 10px; 
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* 📌 عنوان "شماره پلاک" برای همه‌ی پلاک‌ها یکسان شد و از باکس فاصله گرفت */
.plate-container label {
    text-align: right !important;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
    font-size: 1rem;
    display: block;
    width: 100%;
    margin-bottom: 5px; /* ✅ ایجاد فاصله از باکس پلاک */
}

/* 📌 اصلاح ترتیب "من سهامدار هستم" */
.checkbox-holder {
    display: flex;
    align-items: center;
    gap: 5px; /* ✅ ایجاد فاصله بین متن و چک‌باکس */
}

.checkbox-holder label {
    white-space: nowrap !important; 
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
    font-size: 1rem;
    margin: 0; /* حذف فاصله اضافی */
}

.checkbox-holder input[type="checkbox"] {
    margin: 0;
}

/* 📌 راست‌چین کردن "عکس کاربر" و "عکس کارت سبز" (قبلاً درست شده بود) */
label[for="user-photo"],
label[for="green-card"] {
    text-align: right !important;
    display: block;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
    font-size: 1rem;
}

/* 📌 ظرف کلی پلاک انزلی */
.anzali-plate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

/* 📌 باکس اصلی پلاک انزلی */
.anzali-plate-box {
    position: relative;
    width: 200px; /* ✅ کاهش عرض برای کوچک‌تر شدن */
    height: auto;
}

/* 📌 تصویر پلاک انزلی */
.anzali-plak {
    width: 100%;
    height: auto;
}

/* 📌 استایل فیلدهای ورودی */
.anzali-plate-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px; /* ✅ کاهش فاصله بین اعداد */
    
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: black;
    text-align: center;
    z-index: 10;
}

/* 📌 استایل عدد فارسی */
.anzali-plate-top {
    width: 60px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    background: transparent !important;
    color: black;
    border: none !important;
    outline: none !important;
    direction: rtl;
    font-family: 'BYekan', Tahoma, Arial, sans-serif;
}

/* 📌 استایل عدد انگلیسی */
.anzali-plate-bottom {
    width: 60px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    background: transparent !important;
    color: black;
    border: none !important;
    outline: none !important;
    direction: ltr;
    font-family: 'Arial', sans-serif;
}