/* profile-riftmana.css - Riftmana Profile Header Styles */

/* Tier-gated cover photo. Renders above the profile header. The avatar
   stays in its normal position; the cover's negative bottom margin makes
   it extend ~30px down past its layout slot so the header content sits
   ON TOP of the cover's bottom strip. With z-index, the avatar paints
   over that overlap zone, so the cover effectively tucks behind the
   avatar's top edge. Free users never see this element because the
   template gates on riftmana_get_user_cover_photo_url(). */
.rm-profile-cover {
    height: 160px;
    margin-top: -40px;     /* pull into the existing top padding so adding
                              a cover doesn't increase the profile's total
                              height — the empty band the theme reserves
                              above the profile becomes the cover's home */
    margin-bottom: -15px;  /* extend slightly past the layout slot so the
                              cover tucks behind the avatar's top edge */
    position: relative;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a; /* fallback while image loads / if it fails */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Drag-to-reposition edit mode. The cover gains a darkening overlay
   with a hint at the top and Save/Cancel buttons at the bottom. The
   overlay itself is pointer-events: none so vertical drag passes through
   to the cover; only the buttons capture clicks. */
.rm-profile-cover.is-positioning {
    cursor: grab;
    user-select: none;
}
.rm-profile-cover.is-positioning:active {
    cursor: grabbing;
}
.rm-cover-positioner {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    pointer-events: none;
    z-index: 1;
}
.rm-cover-positioner-hint {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    pointer-events: none;
}
.rm-cover-positioner-actions {
    display: flex;
    gap: 8px;
    align-self: flex-end;
    pointer-events: auto;
}
.rm-cover-positioner-actions button {
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.rm-cover-positioner-cancel {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}
.rm-cover-positioner-cancel:hover {
    background: rgba(0, 0, 0, 0.75);
    border-color: rgba(255, 255, 255, 0.5);
}
.rm-cover-positioner-save {
    background: #ffa600;
    color: #1a1a1a;
    border-color: #ffa600;
}
.rm-cover-positioner-save:hover {
    background: #ffb833;
    border-color: #ffb833;
}
.rm-cover-positioner-save:disabled {
    opacity: 0.6;
    cursor: wait;
}

.rm-profile-header {
    padding: 20px 30px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

/* When a cover is present, the avatar stays in its normal position at
   the top of the header row — same alignment with name/bio as the
   no-cover layout. The cover's negative margin-bottom makes the header
   sit ~30px on top of the cover's bottom; z-index here ensures the
   avatar paints in front of that overlap zone. */
.rm-profile-header--has-cover {
    position: relative;
    z-index: 1;
}
.rm-profile-header--has-cover .rm-profile-avatar {
    position: relative;
    z-index: 2;
}

.rm-profile-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Avatar */
.rm-profile-avatar {
    flex-shrink: 0;
}

/* The profile avatar is 120px — bump the decoration ring thickness up
   from the 3px default (which is sized for 56–64px deck-card avatars)
   so it stays visually proportional at this scale. */
.rm-profile-avatar.rm-decorated {
    --rm-ring: 5px;
}

.rm-profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50% !important;  /* !important: some UM addons / custom avatar plugins inject inline styles or higher-specificity rules that flatten the corners. Force-circular here so we don't fight them every time. */
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

/* Drop the avatar's own translucent border when a decoration ring is present —
   the ring becomes the visible edge, and stacking both creates an awkward
   double-frame between the avatar art and the ring. */
.rm-profile-avatar:has(.rm-avatar-ring) img {
    border: none;
}

/* Info Section */
.rm-profile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
}

.rm-profile-name {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
}

/* Bio */
.rm-profile-bio {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.5;
    max-width: 600px;
}
.rm-bio-placeholder a,
.rm-social-placeholder a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-style: italic;
}

.rm-bio-placeholder a:hover,
.rm-social-placeholder a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

/* Social Links - Compact inline */
.rm-social-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.rm-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.rm-social-link:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.rm-social-link svg {
    width: 18px;
    height: 18px;
}

/* Collection link in name row */
.rm-collection-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.rm-collection-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
}

.rm-collection-link svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Hide Discord tag text to keep compact */
/* Platform-specific hover colors */
.rm-youtube:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
}

.rm-twitter:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.rm-discord:hover {
    background: rgba(88, 101, 242, 0.2);
    color: #5865F2;
}

.rm-twitch:hover {
    background: rgba(145, 70, 255, 0.2);
    color: #9146FF;
}

/* Action Buttons - Far Right.
   Row layout so the 36px-square gear and the Decoration pill sit on a
   shared baseline. Stacked column read as two unrelated controls of
   different widths. */
.rm-profile-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Settings dropdown — gear button that opens a menu containing
   Edit Profile, the market preference toggle, and Settings.
   Mirrors the .rm-admin-dropdown pattern (hover + focus-within) so
   it behaves the same on touch (tap focuses the button → menu opens). */
.rm-settings-dropdown {
    position: relative;
}
.rm-settings-gear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rm-settings-gear:hover,
.rm-settings-dropdown:focus-within .rm-settings-gear {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.32);
}
.rm-settings-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    /* No margin-top — a gap here breaks hover: the cursor leaves the gear
       and the menu simultaneously, so :hover stops and the menu hides. */
    min-width: 200px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
    overflow: hidden;
}
.rm-settings-dropdown:hover .rm-settings-menu,
.rm-settings-dropdown:focus-within .rm-settings-menu {
    display: block;
}
.rm-settings-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease;
}
.rm-settings-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.rm-settings-menu a svg {
    flex-shrink: 0;
    opacity: 0.7;
}
/* Market preference toggle row — labelled section between the two link items.
   Top/bottom borders separate it from the surrounding menu items so it reads
   as "this is a setting you change inline" vs "this links somewhere". */
.rm-settings-menu-section {
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rm-settings-menu-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}
/* Override global-market-toggle layout when nested in the menu so it
   stays compact and fits the dropdown width. */
.rm-settings-menu-section .global-market-toggle {
    padding: 0;
    background: none;
    border: none;
    margin: 0;
}
.rm-settings-menu-section .global-market-buttons {
    display: flex;
    gap: 6px;
    padding: 0;
    background: none;
}
.rm-settings-menu-section .global-market-btn {
    flex: 1;
    padding: 6px 8px;
    border-radius: 6px;
    background: #2a2a2a;
    border: 1px solid #444;
}
.rm-settings-menu-section .global-market-logo {
    height: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .rm-profile-header-inner {
        flex-wrap: wrap;
    }

}


@media (max-width: 600px) {
    .rm-profile-header {
        padding: 20px;
    }

    .rm-profile-header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    /* Shorter cover on mobile so it doesn't dominate the viewport. */
    .rm-profile-cover {
        height: 110px;
    }

    .rm-profile-avatar img {
        width: 100px;
        height: 100px;
    }

    .rm-profile-name {
        font-size: 24px;
    }

    .rm-profile-bio {
        text-align: center;
    }

    .rm-social-links {
        justify-content: center;
    }
}

/* Hide default UM header elements we're replacing */
.um-profile-headericon,
.um-profile-edit {
    display: none !important;
}

/* View Mode - Hide social fields in body (we show them in custom header) */
.um:not(.rm-edit-mode) .um-profile-body .um-field-youtube,
.um:not(.rm-edit-mode) .um-profile-body .um-field-twitter,
.um:not(.rm-edit-mode) .um-profile-body .um-field-discord,
.um:not(.rm-edit-mode) .um-profile-body .um-field-twitch {
    display: none !important;
}

/* Edit Mode - Social fields in 2-column grid */
.rm-edit-mode .um-field-youtube,
.rm-edit-mode .um-field-twitter,
.rm-edit-mode .um-field-discord,
.rm-edit-mode .um-field-twitch {
    display: inline-block !important;
    width: calc(50% - 10px) !important;
    min-width: 200px;
    max-width: none;
    margin-bottom: 12px;
    vertical-align: top;
    box-sizing: border-box;
}

/* Left column fields get right margin */
.rm-edit-mode .um-field-youtube,
.rm-edit-mode .um-field-twitter {
    margin-right: 20px !important;
}

/* Right column fields no margin */
.rm-edit-mode .um-field-discord,
.rm-edit-mode .um-field-twitch {
    margin-right: 0 !important;
}

.rm-edit-mode .um-field-youtube .um-field-label,
.rm-edit-mode .um-field-twitter .um-field-label,
.rm-edit-mode .um-field-discord .um-field-label,
.rm-edit-mode .um-field-twitch .um-field-label {
    font-size: 12px;
    margin-bottom: 4px;
}

.rm-edit-mode .um-field-youtube input,
.rm-edit-mode .um-field-twitter input,
.rm-edit-mode .um-field-discord input,
.rm-edit-mode .um-field-twitch input {
    padding: 8px 10px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile: stack on smaller screens */
@media (max-width: 600px) {
	    .rm-social-row {
        justify-content: center;
    }
    .rm-edit-mode .um-field-youtube,
    .rm-edit-mode .um-field-twitter,
    .rm-edit-mode .um-field-discord,
    .rm-edit-mode .um-field-twitch {
        display: block !important;
        width: 100% !important;
        margin-right: 0 !important;
    }
}

/* Discord button reset */
button.rm-discord {
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
}

/* Copied tooltip */
button.rm-discord.copied::after {
    content: 'Copied!';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #5865F2;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 6px;
    animation: fadeOut 1.5s ease forwards;
}

@keyframes fadeOut {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; }
}


/* Admin Dropdown */
.rm-admin-actions {
    position: absolute;
    top: 30px;
    right: 30px;
}

.rm-admin-dropdown {
    position: relative;
}

.rm-admin-gear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.rm-admin-gear:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.rm-admin-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
    overflow: hidden;
}

.rm-admin-dropdown:hover .rm-admin-menu,
.rm-admin-dropdown:focus-within .rm-admin-menu {
    display: block;
}

.rm-admin-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s ease;
}

.rm-admin-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.rm-admin-menu a svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Reduce header bottom spacing */
/* Remove any spacing from the form wrapper */
.um:not(.rm-edit-mode) .um-form {
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove spacing from profile body completely in view mode */
.um:not(.rm-edit-mode) .um-profile-body.main-default {
    display: none !important;
}

/* Check if navbar has spacing */
.um:not(.rm-edit-mode) .um-profile-nav {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
/* Social row - contains both social links and Metafy */
.rm-social-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.rm-metafy-wrapper {
    display: flex;
    align-items: center;
}


/* Metafy social link */
.rm-social-link.rm-metafy {
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    border: none;
}

.rm-social-link.rm-metafy .mfyrs-username {
    display: none;
}

.rm-social-link.rm-metafy .mfyrs-icon {
    width: auto;
    height: auto;
    background: none;
}

.rm-social-link.rm-metafy .mfyrs-icon img {
    width: 18px;
    height: 18px;
}

.rm-social-link.rm-metafy:hover {
    background: rgba(108, 92, 231, 0.2);
    transform: translateY(-2px);
}

/* Avatar section with stats underneath */
.rm-profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Center the follow stats under avatar */
.rm-profile-avatar-section .rm-profile-follow-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .rm-profile-avatar-section {
        width: 100%;
    }
}

/* Name row with follow button */
.rm-profile-name-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.rm-profile-name-row .rm-profile-name {
    margin: 0;
}

.rm-profile-name-row .rm-follow-wrapper {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .rm-profile-name-row {
        justify-content: center;
    }
    /* Don't force the h1 to width:100% here — that pushed the Creator badge
       (and any inline siblings) onto a second row. With auto width the badge
       sits next to the name like on desktop, and `justify-content: center`
       on the row keeps the pair centered. */
}


/* Profile Actions Wrapper */
.rm-profile-actions-wrapper {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-left: auto;
}

.rm-profile-actions-wrapper .rm-profile-actions {
    margin-left: 0;
}

@media (max-width: 768px) {
    /* Wrapper used to span the full header width because it housed both
       the market-preference toggle and the action buttons. The toggle is
       inside the settings dropdown now, so the wrapper just sits in the
       top-right; both buttons are 36×36 and sit side-by-side. */
    .rm-profile-actions-wrapper {
        position: absolute;
        top: 20px;
        right: 20px;
        margin-left: 0;
    }
}

/* ════════════════════════════════════════════════════════════════════════
   EDIT-PROFILE MODE — UM ships with white inputs and a bright blue
   submit button that clash with the site's dark theme. Override to match
   the rest of the profile UI. The .rm-edit-mode class is added to the
   .um wrapper from profile-riftmana.php when $is_edit_mode is true.
   !important is used because UM's stylesheet has high specificity and
   loads after the theme's. Without it the overrides lose every battle.
   ════════════════════════════════════════════════════════════════════════ */

/* Inputs + textarea: dark fills with subtle borders, light text. */
.um.rm-edit-mode input[type="text"],
.um.rm-edit-mode input[type="url"],
.um.rm-edit-mode input[type="email"],
.um.rm-edit-mode input[type="password"],
.um.rm-edit-mode input[type="number"],
.um.rm-edit-mode input[type="tel"],
.um.rm-edit-mode input[type="search"],
.um.rm-edit-mode select,
.um.rm-edit-mode textarea {
    background: #1f1f1f !important;
    color: #e8e8e8 !important;
    border: 1px solid #333 !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    box-shadow: none !important;
    font-size: 14px !important;
}
.um.rm-edit-mode input::placeholder,
.um.rm-edit-mode textarea::placeholder {
    color: #666 !important;
}
.um.rm-edit-mode input[type="text"]:focus,
.um.rm-edit-mode input[type="url"]:focus,
.um.rm-edit-mode input[type="email"]:focus,
.um.rm-edit-mode input[type="password"]:focus,
.um.rm-edit-mode input[type="number"]:focus,
.um.rm-edit-mode input[type="tel"]:focus,
.um.rm-edit-mode input[type="search"]:focus,
.um.rm-edit-mode select:focus,
.um.rm-edit-mode textarea:focus {
    border-color: #ffa600 !important;
    outline: 0 !important;
}

/* Field labels — make them readable on the dark background. */
.um.rm-edit-mode .um-field-label,
.um.rm-edit-mode .um-field-label label {
    color: #d0d0d0 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}
.um.rm-edit-mode .um-field-area-response,
.um.rm-edit-mode .um-field small {
    color: #888 !important;
}

/* Validation errors — keep red but on the dark theme. */
.um.rm-edit-mode .um-field-error,
.um.rm-edit-mode .um-error-block {
    background: rgba(220, 53, 69, 0.12) !important;
    color: #ff6b7a !important;
    border: 1px solid rgba(220, 53, 69, 0.35) !important;
    border-radius: 6px !important;
}

/* Buttons row at the bottom of the edit form. */
.um.rm-edit-mode .um-button,
.um.rm-edit-mode input[type="submit"].um-button,
.um.rm-edit-mode .rm-profile-buttons input[type="submit"] {
    background: #ffa600 !important;
    color: #1a1a1a !important;
    border: 1px solid #ffa600 !important;
    border-radius: 6px !important;
    padding: 10px 22px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}
.um.rm-edit-mode .um-button:hover,
.um.rm-edit-mode input[type="submit"].um-button:hover,
.um.rm-edit-mode .rm-profile-buttons input[type="submit"]:hover {
    background: #ffb833 !important;
    border-color: #ffb833 !important;
    color: #1a1a1a !important;
}
.um.rm-edit-mode .um-button.um-alt,
.um.rm-edit-mode .rm-profile-buttons .um-alt {
    background: transparent !important;
    color: #ccc !important;
    border: 1px solid #3a3a3a !important;
    text-shadow: none !important;
}
.um.rm-edit-mode .um-button.um-alt:hover,
.um.rm-edit-mode .rm-profile-buttons .um-alt:hover {
    background: #2a2a2a !important;
    color: #fff !important;
    border-color: #555 !important;
}

/* Header layout: UM's default centers everything (photo, name, bio) in
   a column, which wastes vertical space and forces a scroll on smaller
   screens. Restructure as a 2-column grid: avatar fixed-width on the
   left, name/meta/bio flow on the right. Avatar is forced to span all
   grid rows so siblings stack in the right column instead of wrapping
   under the avatar. */
.um.rm-edit-mode .um-header {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    column-gap: 24px !important;
    row-gap: 8px !important;
    align-items: start !important;
    text-align: left !important;
    margin-bottom: 24px !important;
}
.um.rm-edit-mode .um-header .um-profile-photo {
    grid-column: 1 !important;
    grid-row: 1 / span 99 !important;
    margin: 0 !important;
}
.um.rm-edit-mode .um-header > *:not(.um-profile-photo):not(.um-cover) {
    grid-column: 2 !important;
    text-align: left !important;
    margin: 0 !important;
}

/* Hide the redundant static bio rendered above the textarea in edit
   mode. The .um-meta-text:not(:has(textarea)) covers UM's standard
   path. The .um-name ~ p / .um-name + .um-meta-text catches alternate
   render paths (the bio appearing under the username). And we hide
   .um-profile-status (the "account status: approved" line) plus the
   .um-clear filler divs which add visible vertical gaps in edit mode
   without contributing anything useful here. */
.um.rm-edit-mode .um-header .um-meta-text:not(:has(textarea)),
.um.rm-edit-mode .um-header .um-name + p,
.um.rm-edit-mode .um-header .um-name ~ .um-meta-text:not(:has(textarea)),
.um.rm-edit-mode .um-header .um-meta:not(:has(textarea)):not(:has(input)) {
    display: none !important;
}

/* Strip noise that creates empty space inside .um-header and between the
   header and the form body:
   - .um-profile-edit: redundant "save check" icon (Update Profile button
     at the bottom does the same thing)
   - .um-profile-status: "This user account status is Approved" line
   - .um-main-meta: empty wrapper (contains only .um-clear in our config)
   - .um-clear: clearfix divs, take vertical space here without value
   Then collapse default UM margins on the meta wrapper so the textarea
   sits right under the name. */
.um.rm-edit-mode .um-header .um-profile-edit,
.um.rm-edit-mode .um-header .um-profile-status,
.um.rm-edit-mode .um-header .um-main-meta,
.um.rm-edit-mode .um-header .um-clear,
.um.rm-edit-mode > .um-clear {
    display: none !important;
}
.um.rm-edit-mode .um-header {
    margin-bottom: 16px !important;
    row-gap: 0 !important;
}
.um.rm-edit-mode .um-header .um-profile-meta,
.um.rm-edit-mode .um-header .um-meta-text {
    margin: 0 !important;
    padding: 0 !important;
}
.um.rm-edit-mode .um-form {
    margin-top: 0 !important;
}

/* Stack vertically on small screens — the side-by-side layout would
   leave the right column too narrow to be usable. justify-items defaults
   to stretch so the textarea fills the available width; only the avatar
   gets explicit centering via justify-self. */
@media (max-width: 600px) {
    .um.rm-edit-mode .um-header {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
    .um.rm-edit-mode .um-header .um-profile-photo {
        grid-column: 1 !important;
        grid-row: auto !important;
        justify-self: center !important;
    }
    .um.rm-edit-mode .um-header > *:not(.um-profile-photo):not(.um-cover) {
        grid-column: 1 !important;
        justify-self: stretch !important;
        text-align: center !important;
    }
    /* Force the bio textarea to fill the grid cell. UM's default styles
       may set a fixed width or max-width that keeps it narrow. */
    .um.rm-edit-mode .um-header .um-profile-meta,
    .um.rm-edit-mode .um-header .um-meta-text,
    .um.rm-edit-mode .um-header .um-meta-text textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .um.rm-edit-mode .um-header .um-meta-text textarea {
        min-height: 100px !important;
    }
}

/* ════════════════════════════════════════════════════════════════════════
   AUTH FORMS — login / register / password-reset
   ════════════════════════════════════════════════════════════════════════
   UM's default styling clashes with the dark theme just like edit-profile
   did. The selectors below mirror the edit-profile theming rules but
   target the three auth-form wrappers UM uses (.um-login, .um-register,
   .um-password). Page-level CSS in this file is only enqueued on these
   pages — see rm_enqueue_profile_template_css() in functions.php.
   ════════════════════════════════════════════════════════════════════════ */

/* Card container — center the form on the page with a dark panel feel. */
.um.um-login,
.um.um-register,
.um.um-password {
    background: #1a1a1a !important;
    border: 1px solid #2a2a2a !important;
    border-radius: 12px !important;
    padding: 32px !important;
    max-width: 440px !important;
    margin: 40px auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
}

/* Inputs + textareas — dark fill, subtle border, light text, orange focus. */
.um.um-login input[type="text"],
.um.um-login input[type="email"],
.um.um-login input[type="password"],
.um.um-register input[type="text"],
.um.um-register input[type="email"],
.um.um-register input[type="password"],
.um.um-register input[type="url"],
.um.um-register input[type="number"],
.um.um-register input[type="tel"],
.um.um-register select,
.um.um-register textarea,
.um.um-password input[type="text"],
.um.um-password input[type="email"],
.um.um-password input[type="password"] {
    background: #1f1f1f !important;
    color: #e8e8e8 !important;
    border: 1px solid #333 !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    box-shadow: none !important;
    font-size: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.um.um-login input::placeholder,
.um.um-register input::placeholder,
.um.um-register textarea::placeholder,
.um.um-password input::placeholder {
    color: #666 !important;
}
.um.um-login input:focus,
.um.um-register input:focus,
.um.um-register select:focus,
.um.um-register textarea:focus,
.um.um-password input:focus {
    border-color: #ffa600 !important;
    outline: 0 !important;
}

/* Labels — readable against the dark panel. */
.um.um-login .um-field-label label,
.um.um-register .um-field-label label,
.um.um-password .um-field-label label,
.um.um-login .um-field-label,
.um.um-register .um-field-label,
.um.um-password .um-field-label {
    color: #d0d0d0 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

/* Field error messages */
.um.um-login .um-field-error,
.um.um-register .um-field-error,
.um.um-password .um-field-error,
.um.um-login .um-error-block,
.um.um-register .um-error-block,
.um.um-password .um-error-block {
    background: rgba(220, 53, 69, 0.12) !important;
    color: #ff6b7a !important;
    border: 1px solid rgba(220, 53, 69, 0.35) !important;
    border-radius: 6px !important;
}

/* Primary submit button (Login / Register / Reset). Orange brand accent
   so it matches the modal CTAs and Update Profile button. */
.um.um-login input[type="submit"],
.um.um-login .um-button,
.um.um-register input[type="submit"],
.um.um-register .um-button,
.um.um-password input[type="submit"],
.um.um-password .um-button {
    background: #ffa600 !important;
    color: #1a1a1a !important;
    border: 1px solid #ffa600 !important;
    border-radius: 6px !important;
    padding: 11px 22px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-shadow: none !important;
    box-shadow: none !important;
    width: 100% !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}
.um.um-login input[type="submit"]:hover,
.um.um-login .um-button:hover,
.um.um-register input[type="submit"]:hover,
.um.um-register .um-button:hover,
.um.um-password input[type="submit"]:hover,
.um.um-password .um-button:hover {
    background: #ffb833 !important;
    border-color: #ffb833 !important;
    color: #1a1a1a !important;
}

/* Secondary links — "Lost your password?", "Register", "Login" etc. */
.um.um-login a,
.um.um-register a,
.um.um-password a {
    color: #ffa600 !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}
.um.um-login a:hover,
.um.um-register a:hover,
.um.um-password a:hover {
    color: #ffb833 !important;
    text-decoration: underline !important;
}

/* Remember-me checkbox row */
.um.um-login .um-field-checkbox label,
.um.um-register .um-field-checkbox label {
    color: #b8b8b8 !important;
    font-size: 13px !important;
}

/* Nextend Social Login (Google + Discord on production). Theme to match
   the dark card without overriding each provider's brand color/identity.
   Nextend renders buttons inside .nsl-container, so most rules scope to
   that to avoid leaking into unrelated parts of UM forms. */
.um.um-login .nsl-container,
.um.um-register .nsl-container {
    margin: 18px 0 !important;
}
.um.um-login .nsl-container-buttons,
.um.um-register .nsl-container-buttons {
    gap: 8px !important;
}
.um.um-login .nsl-button,
.um.um-register .nsl-button {
    border-radius: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-weight: 600 !important;
    transition: filter 0.15s ease, transform 0.05s ease !important;
}
.um.um-login .nsl-button:hover,
.um.um-register .nsl-button:hover {
    filter: brightness(1.1) !important;
}
.um.um-login .nsl-button:active,
.um.um-register .nsl-button:active {
    transform: translateY(1px) !important;
}

/* Note: an "or" divider is NOT added here — Nextend renders one of its
   own above the social buttons. Adding a second pseudo-element divider
   produced a duplicate "OR" below the Discord button. */
