/* register.css - Стили страницы регистрации */
/* Версия: 4.6 - Исправлены тултипы (как в login.css) */

/* ===== Variables ===== */
:root {
    --register-primary: #032D43;
    --register-primary-light: rgba(3, 45, 67, 0.08);
    --register-primary-dark: #021F2E;
    --register-text-dark: #1A1A1A;
    --register-text-gray: #6B7280;
    --register-text-light: #9CA3AF;
    --register-bg-light: #F9FAFB;
    --register-bg-white: #FFFFFF;
    --register-border: rgba(3, 45, 67, 0.1);
    --register-border-light: rgba(3, 45, 67, 0.05);
    --register-border-dark: rgba(3, 45, 67, 0.2);
    --register-error: #dc3545;
    --register-success: #1e5128;
    --register-info-bg: rgba(3, 45, 67, 0.05);
    --register-main-bg: rgba(3, 45, 67, 0.03);
    --register-personal-bg: rgba(52, 152, 219, 0.03);
    --register-professional-bg: rgba(155, 89, 182, 0.03);

    /* Shadows */
    --register-shadow-sm: 0 1px 2px rgba(3, 45, 67, 0.05);
    --register-shadow-md: 0 2px 4px rgba(3, 45, 67, 0.1);
    --register-shadow-lg: 0 4px 8px rgba(3, 45, 67, 0.1);
    --register-shadow-xl: 0 8px 16px rgba(3, 45, 67, 0.1);

    /* Border radius */
    --register-radius-sm: 8px;
    --register-radius-md: 12px;
    --register-radius-lg: 16px;
    --register-radius-full: 999px;
}

/* ===== Base Styles ===== */
.register-page {
    font-family: 'Manrope', sans-serif;
    color: var(--register-text-dark);
    background-color: var(--register-bg-light);
    min-height: 100vh;
    margin-top: 0;
}

.register-page .container {
    max-width: 1650px;
    margin: 0 auto;
    padding: 0 120px;
}

@media (max-width: 1400px) {
    .register-page .container {
        padding: 0 80px;
    }
}

@media (max-width: 1200px) {
    .register-page .container {
        padding: 0 60px;
    }
}

@media (max-width: 992px) {
    .register-page .container {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .register-page .container {
        padding: 0 24px;
    }
}

/* ===== Breadcrumbs ===== */
.register-breadcrumbs {
    background: var(--register-bg-white);
    border-bottom: 1px solid var(--register-border);
    padding: 16px 0;
    margin-bottom: 0;
}

.breadcrumbs-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--register-text-gray);
}

.breadcrumb-link {
    color: var(--register-text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: var(--register-primary);
}

.breadcrumb-separator {
    font-size: 12px;
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--register-primary);
    font-weight: 500;
}

/* ===== Header Section ===== */
.register-header-section {
    background: var(--register-bg-white);
    border-bottom: 1px solid var(--register-border);
    padding: 32px 0;
}

.register-header-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.register-main-title {
    color: var(--register-primary);
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.register-header-description {
    color: var(--register-text-gray);
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    padding: 0 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .register-header-section {
        padding: 24px 0 20px;
    }

    .register-main-title {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    .register-header-description {
        font-size: 1rem;
        line-height: 1.4;
    }
}

/* ===== Красивое примечание о звездочках ===== */
.required-fields-note {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(3, 45, 67, 0.05) 0%, rgba(3, 45, 67, 0.02) 100%);
    border-radius: var(--register-radius-md);
    margin: 32px auto 32px 0;
    max-width: 400px;
    border: 1px solid rgba(3, 45, 67, 0.1);
    box-shadow: var(--register-shadow-sm);
    margin-left: 0;
}

.required-note-icon {
    width: 24px;
    height: 24px;
    background: var(--register-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.required-note-icon i {
    color: white;
    font-size: 12px;
}

.required-note-content {
    font-size: 14px;
    color: var(--register-text-dark);
    font-weight: 500;
}

.required-star {
    color: var(--register-error);
    font-weight: bold;
    margin-right: 2px;
}

@media (max-width: 768px) {
    .required-fields-note {
        margin: 24px auto 24px 0;
        width: 100%;
        max-width: 100%;
    }
}

/* ===== Register Form Section ===== */
.register-form-section {
    padding: 0 0 60px;
}

.register-form-container {
    max-width: 1400px;
    margin: 0 auto;
}

.register-form-card {
    background: var(--register-bg-white);
    border-radius: var(--register-radius-lg);
    padding: 40px;
    border: 1px solid var(--register-border);
    box-shadow: var(--register-shadow-md);
}

/* ===== Three Columns Layout ===== */
.form-three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
    align-items: start;
}

@media (max-width: 1200px) {
    .form-three-columns {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .form-column:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .form-three-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .register-form-card {
        padding: 32px 24px;
    }
}

/* ===== Form Columns ===== */
.form-column {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.main-info-column,
.personal-info-column,
.professional-info-column {
    align-self: stretch;
}

/* Границы между колонками */
.main-info-column {
    padding-right: 20px;
    border-right: 1px solid var(--register-border-light);
}

.personal-info-column {
    padding: 0 20px;
    border-right: 1px solid var(--register-border-light);
}

.professional-info-column {
    padding-left: 20px;
}

@media (max-width: 1200px) {
    .main-info-column {
        padding-right: 24px;
        border-right: 1px solid var(--register-border-light);
    }

    .personal-info-column {
        padding-left: 24px;
        border-right: none;
    }

    .professional-info-column {
        padding: 32px 0 0 0;
        border-top: 1px solid var(--register-border-light);
        border-left: none;
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .main-info-column,
    .personal-info-column,
    .professional-info-column {
        padding: 0;
        border: none;
    }

    .personal-info-column {
        padding-top: 32px;
        border-top: 1px solid var(--register-border-light);
    }

    .professional-info-column {
        padding-top: 32px;
        border-top: 1px solid var(--register-border-light);
    }
}

/* ===== Form Section Header ===== */
.form-section-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--register-border-light);
}

.section-icon {
    width: 48px;
    height: 48px;
    background: var(--register-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.personal-info-column .section-icon {
    background: #3498db;
}

.professional-info-column .section-icon {
    background: #9b59b6;
}

.section-icon i {
    color: white;
    font-size: 22px;
}

.form-section-title {
    color: var(--register-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.personal-info-column .form-section-title {
    color: #3498db;
}

.professional-info-column .form-section-title {
    color: #9b59b6;
}

.section-subtitle {
    color: var(--register-text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.section-subtitle.optional {
    color: var(--register-text-light);
    font-style: italic;
}

/* ===== Form Groups ===== */
.form-group {
    margin-bottom: 20px;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

.main-info-column .form-group:last-child,
.personal-info-column .form-group:last-child,
.professional-info-column .form-group:last-child {
    margin-bottom: 12px;
}

/* ===== Form Labels ===== */
.form-label-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    min-height: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--register-text-dark);
    flex: 1;
}

/* ===== Input Hint Tooltip ===== */
.input-hint-tooltip {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--register-text-light);
    cursor: help;
    transition: color 0.2s ease;
    position: relative;
    flex-shrink: 0;
    margin-left: 6px;
    z-index: 5;
}

.input-hint-tooltip:hover {
    color: var(--register-primary);
}

.input-hint-tooltip i {
    font-size: 14px;
}

/* ===== Form Controls ===== */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--register-border);
    border-radius: var(--register-radius-sm);
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    color: var(--register-text-dark);
    background: var(--register-bg-white);
    transition: all 0.3s ease;
    height: 48px;
    box-sizing: border-box;
}

.form-control:hover {
    border-color: var(--register-border-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--register-primary);
    box-shadow: 0 0 0 3px rgba(3, 45, 67, 0.1);
}

.form-control::placeholder {
    color: var(--register-text-light);
}

/* Select styles */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23032D43' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
    padding-right: 45px;
    cursor: pointer;
}

/* Input with suffix */
.form-control-wrapper {
    position: relative;
    height: 48px;
}

.input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--register-text-light);
    font-size: 14px;
    pointer-events: none;
}

.form-control-wrapper .form-control {
    padding-right: 60px;
}

/* ===== Error Messages ===== */
.form-error {
    font-size: 12px;
    color: var(--register-error);
    margin-top: 6px;
    min-height: 18px;
}

/* ===== MULTI-SELECT STYLES (поле как обычный input) ===== */
.multi-select-container {
    position: relative;
    width: 100%;
}

.multi-select-input {
    cursor: pointer;
    background-color: var(--register-bg-white);
    padding-right: 40px;
}

.multi-select-input[readonly] {
    background-color: var(--register-bg-white);
    cursor: pointer;
}

.dropdown-arrow-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--register-text-gray);
    font-size: 14px;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.multi-select-container.open .dropdown-arrow-icon {
    transform: translateY(-50%) rotate(180deg);
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--register-bg-white);
    border: 1px solid var(--register-border);
    border-radius: var(--register-radius-sm);
    margin-top: 4px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(3, 45, 67, 0.15);
    display: none;
    max-height: 260px;
    overflow-y: auto;
}

.multi-select-dropdown.show {
    display: block;
}

.dropdown-options {
    padding: 8px 0;
}

.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: var(--register-border-light);
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: var(--register-border);
    border-radius: 3px;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-option:hover {
    background: var(--register-primary-light);
}

.dropdown-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--register-primary);
}

.dropdown-option span {
    flex: 1;
    font-size: 14px;
    color: var(--register-text-dark);
    cursor: pointer;
}

/* ===== TOOLTIP STYLES (как в login.css) ===== */

/* HOVER-тултипы (при наведении на знак вопроса) */
.hover-tooltip {
    position: fixed;
    background-color: #032D43;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 280px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: fadeInTooltip 0.2s ease;
    font-family: 'Manrope', sans-serif;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.hover-tooltip.show {
    opacity: 1;
}

/* Стрелочка для hover-тултипа - всегда под элементом */
.hover-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background-color: #032D43;
}

/* FOCUS-тултипы (подробные требования) */
.requirements-tooltip {
    position: fixed;
    background-color: white;
    border: 1px solid rgba(3, 45, 67, 0.2);
    border-radius: 8px;
    padding: 15px;
    max-width: 300px;
    z-index: 10001;
    box-shadow: 0 8px 25px rgba(3, 45, 67, 0.15);
    font-family: 'Manrope', sans-serif;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.requirements-tooltip.show {
    opacity: 1;
}

/* Стрелочка для focus-тултипа */
.requirements-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 15px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

.requirements-title {
    color: #032D43;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(3, 45, 67, 0.1);
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #4B5563;
}

.requirement i {
    width: 16px;
    font-size: 12px;
}

.requirement.valid i {
    color: #10b981;
}

.requirement.invalid i {
    color: #ef4444;
}

.requirement.example i {
    color: #f59e0b;
}

.requirement.optional i {
    color: #9CA3AF;
}

.requirement.valid {
    color: #10b981;
}

.requirement.invalid {
    color: #ef4444;
}

.requirement.example {
    color: #f59e0b;
}

.requirement.optional {
    color: #9CA3AF;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateY(-5px) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

/* ===== Form Actions ===== */
.form-actions {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--register-border-light);
}

/* Кнопка регистрации */
.btn-register-submit {
    width: 100%;
    padding: 16px 24px;
    background: var(--register-primary);
    color: white;
    border: none;
    border-radius: var(--register-radius-sm);
    font-size: 16px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    box-shadow: var(--register-shadow-md);
}

.btn-register-submit:hover {
    background: var(--register-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--register-shadow-lg);
}

.btn-register-submit:active {
    transform: translateY(0);
}

.btn-register-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Divider */
.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0;
    color: var(--register-text-gray);
    font-size: 14px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--register-border);
}

.form-divider span {
    padding: 0 16px;
}

/* Кнопка входа */
.btn-login-redirect {
    width: 100%;
    padding: 16px 24px;
    background: var(--register-bg-white);
    color: var(--register-primary);
    border: 1.2px solid rgba(3, 45, 67, 0.1);
    border-radius: var(--register-radius-sm);
    font-size: 16px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    text-align: center;
    box-shadow: var(--register-shadow-sm);
}

.btn-login-redirect:hover {
    background: var(--register-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--register-shadow-md);
}

.btn-login-redirect:active {
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .register-form-section {
        padding: 0 0 40px;
    }

    .register-form-card {
        padding: 28px 20px;
    }

    .form-section-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .section-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }

    .section-icon i {
        font-size: 18px;
    }

    .form-section-title {
        font-size: 1.2rem;
    }

    .form-group {
        margin-bottom: 18px;
        min-height: 80px;
    }

    .form-actions {
        width: 100%;
        padding-top: 20px;
    }

    .required-fields-note {
        padding: 12px 20px;
        max-width: 100%;
        margin: 20px auto 20px 0;
    }

    /* Multi-select на мобильных */
    .multi-select-input {
        height: 44px;
        padding: 10px 14px;
    }

    .dropdown-option {
        padding: 8px 12px;
    }

    .dropdown-option span {
        font-size: 13px;
    }

    /* ИСПРАВЛЕНИЕ ТУЛТИПОВ НА МОБИЛЬНЫХ */
    .hover-tooltip,
    .requirements-tooltip {
        max-width: calc(100vw - 40px);
        left: 20px !important;
        right: 20px !important;
        width: auto;
        transform: none !important;
    }

    .hover-tooltip::before {
        left: 50% !important;
    }

    .requirements-tooltip::before {
        left: 30px !important;
    }
}

@media (max-width: 480px) {
    .register-form-card {
        padding: 24px 16px;
    }

    .form-three-columns {
        gap: 28px;
    }

    .form-control {
        padding: 10px 14px;
        font-size: 14px;
        height: 44px;
    }

    .btn-register-submit,
    .btn-login-redirect {
        padding: 14px 20px;
        font-size: 15px;
    }

    .form-divider {
        margin: 14px 0;
        font-size: 13px;
    }

    .required-fields-note {
        padding: 10px 16px;
        font-size: 13px;
        margin: 16px auto 16px 0;
        margin-left: 0;
    }

    /* Multi-select на маленьких экранах */
    .multi-select-input {
        height: 40px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .hover-tooltip,
    .requirements-tooltip {
        max-width: calc(100vw - 20px);
        font-size: 12px;
        padding: 8px 12px;
    }

    .requirements-title {
        font-size: 13px;
    }

    .requirement {
        font-size: 12px;
        padding: 4px 0;
    }
}