/* Modal Forgot Password Styles */

.modal-forgot-password,
.password-reset-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Для плавной прокрутки на iOS */
}

.modal-forgot-password.visible,
.password-reset-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-forgot-content {
    background: rgba(26, 22, 37, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    margin: 0;
}

.modal-forgot-password.visible .modal-forgot-content {
    transform: translateY(0);
}

.modal-forgot-password .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.modal-forgot-password .modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-forgot-password .modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    line-height: 1;
}

.modal-forgot-password .modal-close:hover {
    color: var(--text-primary);
}

.modal-forgot-password .modal-body {
    margin-bottom: var(--spacing-lg);
}

.modal-forgot-password .form-group {
    margin-bottom: var(--spacing-md);
}

.modal-forgot-password label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

.modal-forgot-password .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.modal-forgot-password .input-wrapper svg {
    position: absolute;
    left: var(--spacing-md);
    color: var(--text-secondary);
}

.modal-forgot-password .input-wrapper input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) calc(var(--spacing-md) * 3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 16px;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.modal-forgot-password .input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(110, 86, 207, 0.2);
}

.modal-forgot-password input[type="text"],
.modal-forgot-password input[type="email"],
.modal-forgot-password input[type="password"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    background-color: var(--input-bg);
    color: var(--text-color);
    box-sizing: border-box;
}

.modal-forgot-password input.valid {
    border: 2px solid #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.modal-forgot-password input.invalid {
    border: 2px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.modal-forgot-password .btn-reset-password {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    width: 100%;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    margin-top: var(--spacing-lg);
}

.modal-forgot-password .btn-reset-password:hover {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(110, 86, 207, 0.3);
}

.modal-forgot-password .btn-reset-password:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(110, 86, 207, 0.2);
}

.modal-forgot-password .btn-reset-password svg {
    transition: transform var(--transition-speed) ease;
}

.modal-forgot-password .btn-reset-password:hover svg {
    transform: translateX(4px);
}

.modal-forgot-password .success-message,
.modal-forgot-password .error-message {
    text-align: center;
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    display: none;
}

.modal-forgot-password .success-message {
    background-color: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.3);
    color: #2ed573;
}

.modal-forgot-password .error-message {
    background-color: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff4757;
}

.modal-forgot-password .password-requirements {
    background: rgba(110, 86, 207, 0.1);
    border: 1px solid rgba(110, 86, 207, 0.2);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.modal-forgot-password .password-requirements p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    margin: 0;
}

/* Responsive styles */
@media (max-width: 576px) {
    .modal-forgot-content,
    .password-reset-content {
        background-color: #1A1625;
        border-radius: 12px;
        width: 90%;
        max-width: 500px;
        padding: 30px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        position: relative;
        margin: auto;
    }

    .modal-forgot-password .modal-title {
        font-size: 20px;
    }
}

.dark-theme .modal-forgot-content,
.dark-theme .password-reset-content {
    background-color: #1A1625;
    color: #fff;
}

.light-theme .modal-forgot-content,
.light-theme .password-reset-content {
    background-color: #fff;
    color: #1A1625;
}

.light-theme .modal-forgot-password {
    background-color: rgba(0, 0, 0, 0.3);
}

.light-theme .modal-forgot-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.light-theme .modal-forgot-password .modal-title {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.light-theme .modal-forgot-password label {
    color: var(--text-dark);
}

.light-theme .modal-forgot-password .input-wrapper svg {
    color: var(--text-dark-secondary);
}

.light-theme .modal-forgot-password .input-wrapper input {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-dark);
}

.light-theme .modal-forgot-password .input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(110, 86, 207, 0.2);
}

.light-theme .modal-forgot-password .password-requirements {
    background: rgba(110, 86, 207, 0.05);
    border: 1px solid rgba(110, 86, 207, 0.15);
}

.light-theme .modal-forgot-password .password-requirements p {
    color: var(--text-dark-secondary);
}

.light-theme .modal-forgot-password .toggle-password {
    color: var(--text-dark-secondary);
}

.light-theme .modal-forgot-password p {
    color: var(--text-dark);
}
