/* author: Ecem Gokdogan, adapted for Hebrew RTL support */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rubik', Arial, sans-serif; /* גופן תומך עברית */
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: url(/uploads/background.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    direction: rtl; /* תמיכה בכיווניות ימין לשמאל */
}

section {
    position: relative;
    max-width: 400px;
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(55px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 3rem;
}

h1 {
    font-size: 2rem;
    color: #fff;
    text-align: center;
}

.inputbox {
    position: relative;
    margin: 30px 0;
    max-width: 310px;
    border-bottom: 2px solid #fff;
}

.inputbox label {
    position: absolute;
    top: 50%;
    right: 5px; /* שינוי מ-left ל-right עבור RTL */
    transform: translateY(-50%);
    color: #fff;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.5s ease-in-out;
}

input:focus ~ label,
input:valid ~ label {
    top: -5px;
    right: 5px; /* התאמה ל-RTL */
}

.inputbox input {
    width: 100%;
    height: 60px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0 5px 0 35px; /* היפוך המרווחים עבור RTL */
    color: #fff;
    text-align: right; /* טקסט מותאם ל-RTL */
}

.inputbox ion-icon {
    position: absolute;
    left: 8px; /* שינוי מ-right ל-left עבור RTL */
    color: #fff;
    font-size: 1.2rem;
    top: 20px;
}

.forget {
    margin: 35px 0;
    font-size: 0.85rem;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.forget label {
    display: flex;
    align-items: center;
}

.forget label input {
    margin-left: 3px; /* שינוי מ-margin-right ל-margin-left עבור RTL */
}

.forget a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.forget a:hover {
    text-decoration: underline;
}

button {
    width: 100%;
    height: 40px;
    border-radius: 40px;
    background-color: rgba(255, 255, 255, 1);
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.4s ease;
}

button:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.register {
    font-size: 0.9rem;
    color: #fff;
    text-align: center;
    margin: 25px 0 10px;
}

.register p a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
}

.register p a:hover {
    text-decoration: underline;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.loader-overlay:not(.active) {
    opacity: 0;
    pointer-events: none; /* Prevent interaction when hidden */
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}