/* profile-riftmana.css - Riftmana Profile Header Styles */

.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;
}

/* 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;
    }

    .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; }
}



/* 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;
    }
}

/* ════════════════════════════════════════════════════════════════════════
   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: var(--ps-orange) !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: var(--ps-orange) !important;
    color: #1a1a1a !important;
    border: 1px solid var(--ps-orange) !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: var(--ps-orange-2) !important;
    border-color: var(--ps-orange-2) !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: var(--ps-orange) !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: var(--ps-orange-2) !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. */
