/* Login/Registration Page Styles */

/* Captcha refresh styles */
#captcha-container {
    margin-top: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

#captcha-container:hover {
    border-color: #999;
}

#captcha_image {
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#captcha-overlay {
    pointer-events: none;
}

#captcha-container:hover #captcha-overlay {
    opacity: 1 !important;
}

.login-captcha-refresh {
    padding: 0;
    background: none;
    color: #000;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 400;
    text-decoration: underline;
    white-space: nowrap;
    margin-top: 8px;
    height: auto;
    display: inline;
}

.login-captcha-refresh:hover {
    background: none;
    text-decoration: underline;
    color: #000;
}

.login-captcha-refresh:active {
    background: none;
    transform: none;
    color: #000;
}

/* Блок подтверждения восстановления пароля */
.password-recovery-confirm {
    text-align: center;
    padding: 2rem 1rem;
}

.password-recovery-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    margin: 0 0 1.5rem 0;
    letter-spacing: 0.05em;
}

.password-recovery-message {
    font-size: 1rem;
    color: #555;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.password-recovery-email {
    color: #2C7B7D;
    font-weight: 600;
}

.password-recovery-tip {
    background-color: #FFF8E1;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 0 auto 2rem auto;
    max-width: 500px;
    text-align: left;
}

.password-recovery-tip-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.75rem 0;
}

.password-recovery-tip-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.password-recovery-tip-list li {
    padding-left: 1.5rem;
    position: relative;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.password-recovery-tip-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #555;
    font-weight: bold;
}

.password-recovery-tip-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.password-recovery-login-link {
    margin-top: 1.5rem;
}

.password-recovery-link {
    color: #e74c3c;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.password-recovery-link:hover {
    color: #c0392b;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .password-recovery-title {
        font-size: 1.5rem;
    }
    
    .password-recovery-tip {
        padding: 1rem;
    }
}

/* Login/Registration Page Styles */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 2rem 1rem;
    position: relative;
}

.login-page-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/static/loginbg.png') center center / cover no-repeat;
    z-index: 0;
}

.login-page-inner {
    width: 100%;
    max-width: 670px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.login-card {
    background: #ffffff;
    padding: 2rem 100px;
    width: 100%;
    max-width: 670px;
    border-radius: 10px;
}

.login-card-content {
    width: 100%;
}

.login-form-auth,
.login-form-register {
    transition: opacity 0.3s ease;
}

.login-title {
    font-family: 'Molot', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    text-transform: uppercase;
    color: #333333;
    text-align: center;
    margin: 0 0 2rem 0;
    letter-spacing: 0.05em;
}

.login-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333333;
    text-align: left;
}

.login-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.login-link-small {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: #999999;
    font-weight: 400;
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input {
    width: 100%;
    height: 60px;
    padding: 0 1rem;
    border: 1px solid #9DD7D8;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #333333;
    background: #ffffff;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.login-input:focus {
    outline: none;
    border-color: #9DD7D8;
}

.login-input::placeholder {
    color: #999999;
}

.login-input-password {
    padding-right: 3rem;
}

.login-input-date {
    padding-right: 3rem;
}

.login-password-toggle,
.login-date-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.login-password-toggle:hover,
.login-date-toggle:hover {
    opacity: 1;
}

.login-password-toggle svg,
.login-date-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Radio Buttons */
.login-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #333333;
}

.login-radio {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    appearance: none;
    border: 2px solid #9DD7D8;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.login-radio:checked {
    border-color: #9DD7D8;
    background: #9DD7D8;
}

.login-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
}

.login-radio-text {
    user-select: none;
}

/* Checkbox */
.login-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: #333333;
    line-height: 1.5;
}

.login-checkbox {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    appearance: none;
    border: 2px solid #333333;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.login-checkbox:checked {
    background: #333333;
    border-color: #333333;
}

.login-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.login-checkbox-text {
    user-select: none;
}

/* Actions */
.login-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.login-submit {
    width: 100%;
    padding: 1rem;
    background: #FDE895;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

.login-submit:hover {
    background: #44B5B1;
    color: #ffffff;
}

.login-secondary {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-secondary:hover {
    color: #44B5B1;
}

/* Datepicker Styles */
.ui-datepicker {
    font-family: 'Montserrat', sans-serif;
    border: 1px solid #9DD7D8;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.5rem;
}

.ui-datepicker-header {
    background: #ffffff;
    border: none;
    border-bottom: 1px solid #9DD7D8;
    border-radius: 8px 8px 0 0;
}

.ui-datepicker-title {
    font-weight: 600;
    color: #333333;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    cursor: pointer;
    border: none;
    background: none;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: #f5f5f5;
    border-radius: 4px;
}

.ui-datepicker-calendar th {
    font-weight: 600;
    color: #333333;
    padding: 0.5rem;
}

.ui-datepicker-calendar td {
    padding: 0.25rem;
}

.ui-datepicker-calendar td a {
    border: none;
    text-align: center;
    padding: 0.5rem;
    color: #333333;
    border-radius: 4px;
}

.ui-datepicker-calendar td a:hover {
    background: #9DD7D8;
    color: #ffffff;
}

.ui-datepicker-calendar .ui-state-active {
    background: #9DD7D8;
    color: #ffffff;
    border: none;
}

.ui-datepicker-calendar .ui-state-highlight {
    background: #FDE895;
    color: #333333;
    border: none;
}

/* Error Message */
.login-error-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: #FFF5F5;
    border: 1px solid #FEE2E2;
    border-radius: 8px;
}

.login-error-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #EF4444;
    margin-top: 2px;
}

.login-error-content {
    flex: 1;
}

.login-error-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #DC2626;
    margin-bottom: 0.25rem;
}

.login-error-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: #991B1B;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 600px) {
    .login-page {
        padding: 1rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .login-form-fields {
        gap: 1.25rem;
    }
}
