/**
 * Файл: css/components.css
 * Назначение: Общие компоненты сайта
 * Содержит: Кнопки, карточки, формы, алерты, индикаторы загрузки
 * Зависимости: main.css
 * Подключается: Всегда
 */

/* ========== КНОПКИ ========== */
.btn-outline,
.btn-primary {
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

.btn-outline {
    border: 1px solid #fff;
    color: #fff;
    background: transparent;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: #ffd966;
    color: #000;
}

.btn-primary:hover {
    background: #ffcd4d;
    transform: translateY(-1px);
}

.btn-small {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-large {
    padding: 12px 32px;
    font-size: 1.1rem;
}

.w-100 {
    width: 100%;
    text-align: center;
}

/* ========== КАРТОЧКИ ========== */
.glass-card {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ========== ФОРМЫ ========== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffd966;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input.error {
    border-color: #ef4444;
}

.help-text {
    margin-top: 0.5rem;
    text-align: right;
}

.help-text a {
    color: #ffd966;
    text-decoration: none;
    font-size: 0.85rem;
}

.help-text a:hover {
    text-decoration: underline;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.terms-checkbox input {
    width: auto;
}

.terms-checkbox label {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.terms-checkbox a {
    color: #ffd966;
}

/* ========== АЛЕРТЫ ========== */
.alert {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border-left: 3px solid #ef4444;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border-left: 3px solid #10b981;
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border-left: 3px solid #3b82f6;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    border-left: 3px solid #f59e0b;
}

/* ========== ОШИБКИ ВАЛИДАЦИИ ========== */
.validation-error,
.field-error {
    color: #ef4444;
    font-size: 0.7rem;
    margin-top: 4px;
}

/* ========== ПАРОЛЬ ========== */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s, background 0.3s;
}

.strength-weak .strength-bar-fill {
    width: 33%;
    background: #ef4444;
}

.strength-medium .strength-bar-fill {
    width: 66%;
    background: #f59e0b;
}

.strength-strong .strength-bar-fill {
    width: 100%;
    background: #10b981;
}

#strengthText {
    font-size: 0.7rem;
    display: block;
    margin-top: 4px;
}