/* =============================================
   HEADER USER AREA — LIGHT THEME
   ============================================= */

.header-user-area {
    display: flex;
    align-items: center;
    margin-left: 12px;
    position: relative;
}

/* ---------- Login link (не авторизован) ---------- */

.header-login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    cursor: pointer;
}

.header-login-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #111;
}

.header-login-link i {
    font-size: 20px;
}

/* ---------- User avatar button (авторизован) ---------- */

.header-user-menu {
    position: relative;
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.1);
    padding: 0;
    background: none;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-user-avatar:hover {
    border-color: rgba(0, 0, 0, 0.25);
}

.header-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* ---------- User dropdown menu ---------- */

.header-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    overflow: hidden;
}

.header-user-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dropdown-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user-email {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-links {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.user-dropdown-links li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.user-dropdown-links li a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #111;
}

.user-dropdown-links li a i {
    font-size: 18px;
    opacity: 0.6;
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 4px 0;
}

.dropdown-logout {
    color: #e53e3e !important;
}

.dropdown-logout:hover {
    color: #c53030 !important;
    background: rgba(229, 62, 62, 0.04) !important;
}


/* =============================================
   AUTH MODAL — LIGHT THEME
   ============================================= */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.auth-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.25s;
    max-height: 90vh;
    overflow-y: auto;
}

.auth-modal-overlay.is-open .auth-modal {
    transform: translateY(0);
}

/* Close button */
.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    z-index: 1;
    padding: 0;
}

.auth-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* Tabs */
.auth-modal-tabs {
    display: flex;
    padding: 20px 24px 0;
    gap: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.auth-tab:hover {
    color: #555;
}

.auth-tab.active {
    color: #111;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
    border-radius: 2px 2px 0 0;
}

/* Tab content */
.auth-modal-content {
    padding: 24px;
}

.auth-tab-panel {
    display: none;
}

.auth-tab-panel.active {
    display: block;
}

/* ---------- Стилизация форм WPUM внутри модалки ---------- */

.auth-modal .wpum-form label {
    color: #555;
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

.auth-modal .wpum-form input[type="text"],
.auth-modal .wpum-form input[type="email"],
.auth-modal .wpum-form input[type="password"] {
    width: 100%;
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    color: #111;
    font-size: 14px;
    transition: border-color 0.2s;
}

.auth-modal .wpum-form input[type="text"]:focus,
.auth-modal .wpum-form input[type="email"]:focus,
.auth-modal .wpum-form input[type="password"]:focus {
    border-color: #2563eb;
    outline: none;
    background: #fff;
}

.auth-modal .wpum-form input[type="submit"],
.auth-modal .wpum-form button[type="submit"] {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.auth-modal .wpum-form input[type="submit"]:hover,
.auth-modal .wpum-form button[type="submit"]:hover {
    background: #1d4ed8;
}

.auth-modal .wpum-form a {
    color: #2563eb;
    font-size: 13px;
}

.auth-modal .wpum-form a:hover {
    color: #1d4ed8;
}

/* Скрываем ссылки register/login внутри форм — у нас для этого табы */
.auth-modal .wpum-form .wpum-after-submit-links {
    display: none;
}


/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .header-login-link span {
        display: none;
    }

    .header-user-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        min-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 70vh;
        transform: translateY(100%);
    }

    .header-user-dropdown.is-open {
        transform: translateY(0);
    }

    .auth-modal {
        margin: 10px;
        max-height: 95vh;
    }
}

/* Общие стили для иконок */
#wpum-account-forms-tabs ul li a::before {
  font-family: 'boxicons';
  margin-right: 8px;
  font-size: 1.2em;
  vertical-align: middle;
}

#wpum-account-forms-tabs ul li.tab-settings a::before {
  content: '\ea6e'; 
  color: #9ca3af;
}

#wpum-account-forms-tabs ul li.tab-password a::before {
  content: '\eb51'; 
    color: #9ca3af;
}


#wpum-account-forms-tabs ul li.tab-logout a::before {
  content: '\eb4f';
    color: #9ca3af;
}

nav#wpum-account-forms-tabs ul li::before {
    display: none !important;
}