/* login/login.css */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}
body {
    background: #FF4D4D; /* from index.html */
    color: #ffffff;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    min-height: 0; /* Fix for flexbox overflow in some browsers */
}

/* Increase logo size on login page */
#header-placeholder .header-logo {
    height: 56px;
}

/* Hide back button on login page */
#header-placeholder #header-back-btn {
    display: none !important;
}

/* Background Decorations from index.html */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}
.decor-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    left: 50%;
    top: 50%; /* Centered for login page */
    transform: translate(-50%, -50%);
}
.decor-circle-1 { width: 300px; height: 300px; }
.decor-circle-2 { width: 500px; height: 500px; }
.decor-circle-3 { width: 700px; height: 700px; }

.content-wrapper {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    padding-top: 100px; /* Pushed up by 20px. (was 120px) */
    position: relative;
    z-index: 1;
}

/* New Login Card */
.login-card {
    background: white;
    color: #1c1c1e;
    padding: 2rem;
    border-radius: 26px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
    max-width: 400px;
    width: 100%;
    min-height: 530px; /* Set fixed height to prevent resize */
}

.btn {
    width: 100%;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 26px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover {
    transform: translateY(-2px);
}

.btn-social {
    background: white;
    color: #1c1c1e;
    border: 1px solid #d1d1d6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1rem; /* Adjusted margin */
}
.btn-social img {
    width: 24px;
    height: 24px;
}

.btn-yandex {
    margin-bottom: 1.5rem;
}

.separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: #aeaeb2;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.separator::before, .separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e5ea;
}
.separator span {
    padding: 0 1rem;
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.password-wrapper {
    position: relative;
}
.password-wrapper input[type="password"] {
    padding-right: 3.5rem;
}

input[type="text"], input[type="password"], select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #f0f0f0;
    border-radius: 26px;
    font-size: 1rem;
    background-color: #f0f0f0;
    color: #1c1c1e;
    transition: border-color 0.3s, background-color 0.3s;
    -webkit-appearance: none;
}
input[type="text"]::placeholder, input[type="password"]::placeholder { color: #8a8a8e; }
input[type="text"]:focus, input[type="password"]:focus, select:focus {
    outline: none;
    border-color: #007aff;
    background-color: white;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a8a8e;
}

.eye-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    background-color: #8a8a8e; /* Gray color */
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.eye-icon.eye-open {
    -webkit-mask-image: url(/components/svg/svg_ui/visible.svg);
    mask-image: url(/components/svg/svg_ui/visible.svg);
}
.eye-icon.eye-closed {
    -webkit-mask-image: url(/components/svg/svg_ui/hide.svg);
    mask-image: url(/components/svg/svg_ui/hide.svg);
}

.btn-primary {
    background: #111;
    color: white;
    margin-top: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.btn-primary:hover {
     box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #8a8a8e;
    font-size: 0.9rem;
}
.form-footer a {
    color: #007aff;
    text-decoration: none;
    font-weight: 600;
}
.form-footer a:hover {
    text-decoration: underline;
}

/* Registration Form Specifics */
.register-view h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

select {
    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='%238a8a8e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.error { 
    color: #ff3b30; 
    font-size: 0.85rem; 
    margin-top: 0.5rem; 
    display: none; 
    padding-left: 0.25rem;
    font-weight: 500;
}

/* Custom Radio Button Styles */
.gender-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 0.5rem 0;
}
.gender-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: #1c1c1e;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
}
.gender-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.custom-radio {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: 1px solid #f0f0f0;
    position: relative;
    transition: all 0.2s ease;
}
.custom-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    background-color: #007aff;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease-out;
}
.gender-group input[type="radio"]:checked + .custom-radio::after {
    transform: translate(-50%, -50%) scale(1);
}
.gender-group input[type="radio"]:focus-visible + .custom-radio {
    outline: 2px solid #007aff;
    outline-offset: 2px;
}