/* static/accounts/css/register.css */

.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.register-card {
    max-width: 800px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 30px;
}

.register-header {
    text-align: center;
    margin-bottom: 30px;
}

.register-title {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, #393EB4 40%, #8F39B4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.register-subtitle {
    color: #6c757d;
    font-size: 14px;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;  /* уменьшили gap */
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;  /* уменьшили gap */
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.3;
}

.form-control {
    padding: 8px 10px;  /* уменьшили вертикальный отступ */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.4;
}

.form-control:focus {
    outline: none;
    border-color: #393EB4;
    box-shadow: 0 0 0 3px rgba(57, 62, 180, 0.1);
}

select.form-control {
    padding: 8px 10px;
    height: auto;
    min-height: 38px;
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
}

.role-group {
    margin-top: 5px;
}

.role-options {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.role-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.role-option span {
    font-size: 14px;
    color: #333;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(to bottom right, #393EB4 40%, #8F39B4 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 62, 180, 0.3);
    background: linear-gradient(to bottom right, #4a4fc9 0%, #a04ac9 100%);
}

.btn-login-link {
    text-align: center;
    color: #393EB4;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-login-link:hover {
    text-decoration: underline;
}

/* Поле даты рождения */
#id_birth_date {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
}

.date-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    box-sizing: border-box;
}

/* Для одинаковой ширины всех полей в строке */
.form-row .form-group {
    flex: 1;
    min-width: 0;
}

.form-row .form-group input,
.form-row .form-group select {
    width: 100%;
}

/* Уменьшаем ширину поля даты рождения в паре со страной */
.form-row .form-group:first-child select {
    width: 100%;
}

.form-row .form-group:last-child input {
    width: 100%;
}

/* Стили для чекбокса согласия с документами */
.terms-group {
    margin-top: 10px;
    margin-bottom: 15px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.terms-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.4;
}

.terms-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.terms-option span {
    color: #333;
}

.terms-link {
    color: #393EB4;
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: underline;
    color: #6352c7;
}

.login-link {
    margin-top: 20px;
    text-align: center;
}

.back-link {
    margin-top: 15px;
    text-align: center;
}

.btn-back-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-back-link:hover {
    color: #393EB4;
    text-decoration: underline;
}

.login-link {
    margin-top: 20px;
    text-align: center;
}

.back-link {
    margin-top: 15px;
    text-align: center;
}

.btn-back-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-back-link:hover {
    color: #393EB4;
    text-decoration: underline;
}

.btn-login-link {
    color: #393EB4;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-login-link:hover {
    text-decoration: underline;
}

/* Стили для выбора роли в виде кнопок */
.role-buttons-group {
    margin-bottom: 30px;
}

.role-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
}

.role-btn {
    flex: 1;
    max-width: 200px;
    padding: 15px 25px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.role-btn input {
    display: none;
}

.role-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.role-btn-content i {
    font-size: 32px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.role-btn-content span {
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
}

.role-btn.selected {
    background: linear-gradient(to bottom right, rgba(57, 62, 180, 0.1), rgba(143, 57, 180, 0.1));
    border-color: #393EB4;
}

.role-btn.selected .role-btn-content i {
    background: linear-gradient(to bottom right, #393EB4 40%, #8F39B4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.role-btn.selected .role-btn-content span {
    background: linear-gradient(to bottom right, #393EB4 40%, #8F39B4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.role-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #393EB4;
}

/* Стили для выбора предметов */
.subjects-group {
    margin-top: 30px;
    margin-bottom: 30px;
}

.subjects-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.subjects-checkbox-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
}

.subject-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.subject-checkbox:hover {
    background: #f0f0f0;
    transform: translateX(3px);
}

.subject-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #393EB4;
}

.subject-checkbox span {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
}

@media (max-width: 480px) {
    .subjects-checkbox-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Для мобильных */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-group {
        gap: 4px;
    }

    .date-input {
        max-width: 100%;
    }

    .role-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .role-btn {
        max-width: 100%;
        width: 100%;
    }
}