/* Стили для системы авторизации и подписок */

/* Общие стили для модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Заголовки модальных окон */
.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.modal-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

/* Формы */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.4;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.4;
    transition: border-color 0.3s ease;
    background: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
}

.form-input.error {
    border-color: #e74c3c;
    background: #fff6f6;
}

/* Подсветка ошибок для label (например, чекбокс согласия) */
label.error {
    color: #e74c3c;
}

/* Согласие с условиями: типографика как у остальных элементов */
.agree-group { gap: 8px; }
.agree-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #2c3e50;
}
.agree-label a { color: #2c3e50; text-decoration: underline; }
.agree-label input[type="checkbox"] { width: 16px; height: 16px; }

.agree-text {
    display: inline;
    white-space: normal;
    word-break: keep-all;
}
.agree-text a { white-space: nowrap; }

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-block {
    width: 100%;
}

/* Переключатели между формами */
.form-switcher {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

.switch-link {
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.switch-link:hover {
    text-decoration: underline;
}

/* Сообщения об ошибках */
.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Сообщения об успехе */
.success-message {
    color: #27ae60;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Стили для подписок */
.subscription-status {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.subscription-active {
    background: #d5f4e6;
    border: 1px solid #27ae60;
}

.subscription-inactive {
    background: #fdf2f2;
    border: 1px solid #e74c3c;
}

.subscription-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.subscription-details {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.subscription-time {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

/* Планы подписки */
.subscription-plans {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.plan-card {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.plan-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.plan-card.selected {
    border-color: #3498db;
    background: #f0f8ff;
}

.plan-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 24px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 8px;
}

.plan-description {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.plan-savings {
    background: #f39c12;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* Кнопка вызова попапа */
/* Эти стили больше не нужны, так как кнопка теперь в сайдбаре */
/*
.auth-trigger-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.auth-trigger-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.auth-trigger-btn.authenticated {
    background: #27ae60;
}

.auth-trigger-btn.authenticated:hover {
    background: #229954;
}
*/

/* Адаптивность */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    /* Эти стили больше не нужны, так как кнопка теперь в сайдбаре */
    /*
    .auth-trigger-btn {
        top: 10px;
        right: 10px;
        padding: 10px 20px;
        font-size: 13px;
    }
    */
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.modal-overlay.slide-in {
    animation: slideIn 0.3s ease forwards;
}

.modal-overlay.slide-out {
    animation: slideOut 0.3s ease forwards;
} 