/* ========================================== */
/* profile-dropdown.css                        */
/* Dropdown профиля — две визуальные секции    */
/* 1. Контейнер, показ/скрытие                 */
/* 2. Секция «Ваш профиль» (тёмно-зелёный)    */
/* 3. Секция «О проекте» (тёмно-синий)         */
/* 4. Кнопка выхода (красный акцент)           */
/* 5. Пульсация сердечка                       */
/* 6. Адаптивность                             */
/* ========================================== */

/* ========== 1. КОНТЕЙНЕР ========== */
.header__login-container {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    min-width: 310px;
    z-index: 60001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0;
    color: #ffffff;
    overflow: hidden;
    background: #1b2d3a; /* fallback для нижней секции */
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.header__login-container:hover .profile-dropdown:not(:empty) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown:empty { display: none !important; }

.profile-dropdown--hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
}

/* ========== 2. СЕКЦИЯ «ВАШ ПРОФИЛЬ» ========== */
.profile-dropdown__section--user {
    background: linear-gradient(135deg, #1a6b6d 0%, #155859 100%);
}

.profile-dropdown__section-header {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-dropdown__section-heading {
    font-size: 12px;
    font-weight: 700;
    color: #a5d6a7; /* зелёный акцент */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-dropdown__close {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-dropdown__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Информация о пользователе */
.profile-dropdown__user-info {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-dropdown__email-line {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.profile-dropdown__status {
    font-size: 10px;
    font-weight: 500;
    color: #4caf50;
    display: inline-block;
    background: rgba(76, 175, 80, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

/* Общий стиль заголовка секции */
.profile-dropdown__section-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Настройки аватара */
.profile-dropdown__avatar-section {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-dropdown__avatar-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.profile-dropdown__avatar-preview {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.profile-dropdown__color-picker {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-dropdown__color-picker input[type="color"] {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s;
}

.profile-dropdown__color-picker input[type="color"]:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.profile-dropdown__color-picker label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.profile-dropdown__upload-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.profile-dropdown__upload-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.profile-dropdown__upload-btn svg { width: 12px; height: 12px; }

.profile-dropdown__reset-btn {
    padding: 6px 10px;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.25);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #ffcdd2;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.profile-dropdown__reset-btn:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: #f44336;
    color: #fff;
}

/* Имя в чатах */
.profile-dropdown__nickname-section {
    padding: 10px 14px;
}

.profile-dropdown__nickname-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-dropdown__nickname-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    min-width: 0;
    transition: border-color 0.2s;
}

.profile-dropdown__nickname-input:focus { border-color: #4caf50; }
.profile-dropdown__nickname-input::placeholder { color: rgba(255, 255, 255, 0.4); }

.profile-dropdown__nickname-save {
    padding: 6px 12px;
    background: rgba(76, 175, 80, 0.25);
    color: #a5d6a7;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.profile-dropdown__nickname-save:hover {
    background: rgba(76, 175, 80, 0.35);
    color: white;
}

/* ========== 3. СЕКЦИЯ «О ПРОЕКТЕ» (тёмно-синий) ========== */
.profile-dropdown__section--project {
    background: linear-gradient(135deg, #1b3a4b 0%, #162d3a 100%);
}

.profile-dropdown__section-heading--project {
    color: #90caf9; /* голубой акцент */
    font-size: 12px;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.profile-dropdown__about {
    padding: 10px 14px;
}

.profile-dropdown__about-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0 0 10px 0;
}

/* Кнопка «Поддержать проект» */
.profile-dropdown__donate-btn {
    width: 100%;
    padding: 9px 12px;
    background: rgba(76, 175, 80, 0.12);
    border: 1.5px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    color: #a5d6a7;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.profile-dropdown__donate-btn svg {
    animation: heartPulse 1.5s ease-in-out infinite;
}

.profile-dropdown__donate-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
    color: #c8e6c9;
}

.profile-dropdown__donate-btn--active {
    background: rgba(76, 175, 80, 0.28) !important;
    border-color: #4caf50 !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.25);
}

/* Реквизиты */
.profile-dropdown__donate-details {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-dropdown__donate-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-dropdown__donate-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-dropdown__donate-value {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 5px 8px;
}

.profile-dropdown__donate-value code {
    flex: 1;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-family: monospace;
    word-break: break-all;
}

.profile-dropdown__copy-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
}

.profile-dropdown__copy-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Контактная информация */
.profile-dropdown__contact {
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-dropdown__contact-title {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-dropdown__contact-email {
    font-size: 12px;
    color: #90caf9;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    padding: 2px 0;
}

.profile-dropdown__contact-email:hover {
    color: #bbdefb;
    transform: translateX(2px);
}

.profile-dropdown__contact-email svg { width: 13px; height: 13px; }

/* ========== 4. КНОПКА ВЫХОДА ========== */
.profile-dropdown__logout-btn {
    width: 100%;
    padding: 10px;
    background: rgba(244, 67, 54, 0.15);
    color: #ef9a9a;
    border: none;
    border-top: 1px solid rgba(244, 67, 54, 0.2);
    border-radius: 0 0 10px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-dropdown__logout-btn:hover {
    background: rgba(244, 67, 54, 0.3);
    color: #ffcdd2;
}

.profile-dropdown__logout-btn svg { width: 13px; height: 13px; }

/* ========== 5. ПУЛЬСАЦИЯ СЕРДЕЧКА ========== */
@keyframes heartPulse {
    0%, 100% { transform: scale(1); color: #a5d6a7; }
    15% { transform: scale(1.25); color: #ef5350; }
    30% { transform: scale(1); color: #a5d6a7; }
    45% { transform: scale(1.15); color: #ef5350; }
    60% { transform: scale(1); }
}

/* ========== 6. АДАПТИВНОСТЬ ========== */
@media (max-width: 880px) {
    .profile-dropdown { z-index: 60001; }
}

@media (max-width: 490px) {
    .header__login-container:hover .profile-dropdown {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
    }

    .profile-dropdown {
        min-width: 260px;
        max-height: calc(100vh - 70px);
        max-height: calc(100dvh - 70px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .profile-dropdown__section-header,
    .profile-dropdown__user-info,
    .profile-dropdown__avatar-section,
    .profile-dropdown__nickname-section,
    .profile-dropdown__about,
    .profile-dropdown__contact {
        padding: 8px 12px;
    }

    .profile-dropdown__email-line { font-size: 11px; }

    .profile-dropdown__color-picker input[type="color"] {
        width: 28px;
        height: 28px;
    }

    .profile-dropdown__about-text { font-size: 10px; }
    .profile-dropdown__donate-value code { font-size: 10px; }
}
