/* ==========================================================================
   MY ACCOUNT PAGE
   ========================================================================== */

.np-my-account__container {
    max-width: 860px;
    padding: 40px 20px 80px;
}

.np-my-account__header {
    margin-bottom: 30px;
}

.np-my-account__title {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 800;
    margin: 0 0 6px;
    color: #fff;
}

.np-my-account__subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    margin: 0;
}

/* Sticky sub-nav */
.np-my-account__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 0;
    margin: 0 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: var(--np-bg, #0d0d0d);
    z-index: 10;
}

.np-my-account__nav a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.15s;
}

.np-my-account__nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Flash messages */
.np-flash {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.np-flash--success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.35);
    color: #6ad88a;
}

.np-flash--error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #f48a93;
}

/* Sections */
.np-account-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 24px;
}

.np-account-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    padding: 0;
}

.np-account-section > p:first-of-type {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin: 0 0 18px;
}

.np-subheading {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 20px 0 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Log out at top — minimal padding, right-aligned */
.np-account-section--logout-top {
    padding: 14px 20px;
    text-align: right;
    background: transparent;
    border: none;
    margin-bottom: 14px;
}

/* Section divider between readonly fields and editable form */
.np-section-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 18px 0;
}

/* Form rows */
.np-form-row {
    margin-bottom: 18px;
}

.np-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.np-form-row--checkbox label {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.np-form-row--checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
}

.np-required {
    color: #f48a93;
    font-weight: normal;
}

.np-form-row input[type="text"],
.np-form-row input[type="email"],
.np-form-row input[type="password"],
.np-form-row input[type="url"],
.np-form-row select,
.np-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.np-form-row input:focus,
.np-form-row select:focus,
.np-form-row textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.55);
}

.np-form-row input.np-readonly,
.np-form-row input[readonly] {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.55);
    cursor: not-allowed;
}

.np-form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.np-form-help {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 6px 0 0;
}

.np-form-help a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

/* Display-name quick-pick presets */
.np-display-name-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.np-display-name-presets .np-form-help {
    margin: 0;
}

.np-preset-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.np-preset-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Hint text next to the "Save All Changes" button */
.np-save-hint {
    display: inline-block;
    margin-left: 12px;
    vertical-align: middle;
    font-style: italic;
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 520px) {
    .np-save-hint {
        display: block;
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Buttons */
.np-button {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    color: #111;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.np-button:hover {
    background: #eee;
    color: #111;
}

.np-button:active {
    transform: translateY(1px);
}

.np-button--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.np-button--secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.np-button--danger {
    background: rgba(220, 53, 69, 0.15);
    color: #f48a93;
    border: 1px solid rgba(220, 53, 69, 0.4);
}

.np-button--danger:hover {
    background: rgba(220, 53, 69, 0.25);
    color: #fff;
}

/* Avatar block */
.np-avatar-block {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.np-avatar-current {
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.np-avatar-info {
    flex: 1;
    min-width: 240px;
}

.np-avatar-info p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    margin: 0 0 12px;
}

/* WP 2FA shortcode wrapper — make sure the plugin's form inherits our style */
.np-2fa-wrap {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.np-2fa-wrap .wp-2fa-configuration-form {
    color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   HEADER MENU: LOG IN LINK + MY ACCOUNT DROPDOWN
   ========================================================================== */

.np-menu-login {
    color: inherit;
    text-decoration: none;
}

.np-menu-account {
    position: relative;
    display: inline-block;
}

.np-menu-account__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    font-weight: inherit;
    /* Match the menu-link font-size (fluid clamp at desktop widths) */
    font-size: clamp(14.5px, 0.95vw, 15.5px);
    padding: 4px 6px;
    line-height: inherit;
}

.np-menu-account__toggle:hover,
.np-menu-account__toggle:focus-visible {
    color: #fff;
    outline: none;
}

.np-menu-account__caret {
    transition: transform 0.15s;
}

.np-menu-account.is-open .np-menu-account__caret {
    transform: rotate(180deg);
}

/* Dropdown opens on hover (matches sibling menu items) */
.np-menu-account:hover .np-menu-account__dropdown,
.np-menu-account:focus-within .np-menu-account__dropdown {
    display: block;
}

.np-menu-account:hover .np-menu-account__caret,
.np-menu-account:focus-within .np-menu-account__caret {
    transform: rotate(180deg);
}

.np-menu-account__dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    /* Small bridge so hover doesn't break when moving cursor from button to dropdown */
    margin-top: 0;
    padding-top: 6px;
    min-width: 160px;
    z-index: 1000;
}

.np-menu-account__dropdown::before {
    /* Invisible hover bridge */
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 12px;
}

.np-menu-account__dropdown-inner {
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    padding: 6px 0;
}

.np-menu-account__dropdown a {
    display: block;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.np-menu-account__dropdown a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Mobile tweaks for /my-account/ */
@media (max-width: 640px) {
    .np-account-section {
        padding: 18px 16px;
    }
    .np-my-account__nav {
        gap: 2px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .np-my-account__nav a {
        white-space: nowrap;
        font-size: 12px;
    }
}
