/* Модальное окно подтверждения email */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 15% auto;
    padding: 20px 40px;
    width: 90%;
    max-width: 440px; /* Reduced from 500px */
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.modal p {
    font-size: 16px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 25px;
    text-align: center;
}

.modal .form__row {
    margin-bottom: 20px;
}
.modal .form__buttons {
    justify-content: center;
    display: flex;
justify-content: center;
gap: 10px;
}
.modal .form__input {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 4px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    padding: 0;
    height: 42px;
    font-size: 20px;
}

.modal .form__input:focus {
    border-color: #9c759b;
    outline: none;
}

.modal .form__error {
    color: #ff4444;
    font-size: 14px;
    text-align: center;
    margin: 10px 0;
    min-height: 20px;
}

.modal .btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    min-width: 150px;
}

.modal .btn-violet {
    background-color: #9c759b;
    color: white;
    height: 42px;
    font-size: 15px;
    width: 100%;
}

.modal .btn-violet:hover {
    background-color: #8a6589;
}

.modal .btn:not(.btn-violet) {
    background-color: #f5f5f5;
    color: #666;
}

.modal .btn:not(.btn-violet):hover {
    background-color: #e8e8e8;
}

.modal .form__row:last-child {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* Style for the resend code link */
.resend-code-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.resend-code-link a {
    color: #9c759b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.resend-code-link a:hover {
    color: #8a6589;
    text-decoration: underline;
}

/* Анимация загрузки для кнопок */
.btn-load {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-load::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    right: 10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: button-loading-spinner 1s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 25px;
        width: 95%;
    }

    .modal h3 {
        font-size: 20px;
    }

    .modal p {
        font-size: 14px;
    }

    .modal .form__input {
        font-size: 20px;
        padding: 12px;
    }

    .modal .btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 120px;
    }

    .modal .form__row:last-child {
        flex-direction: column;
        gap: 10px;
    }

    .modal .btn {
        width: 100%;
    }
}
