/* OS Perfil WP User Manager */

.oswp-profile-about {
    --oswp-accent: #5534e8;
    --oswp-accent-soft: rgba(85, 52, 232, 0.08);
    --oswp-text: #18181b;
    --oswp-muted: #686873;
    --oswp-border: #e7e7ec;
    --oswp-surface: #ffffff;
    --oswp-surface-soft: #f8f8fb;
    --oswp-shadow: 0 8px 30px rgba(20, 20, 35, 0.06);
    color: var(--oswp-text);
    margin-top: 10px;
}

.oswp-profile-about *,
.oswp-profile-about *::before,
.oswp-profile-about *::after {
    box-sizing: border-box;
}

.oswp-profile-card {
    background: var(--oswp-surface);
    border: 1px solid var(--oswp-border);
    border-radius: 14px;
    box-shadow: var(--oswp-shadow);
}

.oswp-profile-main {
    padding: 14px 20px 16px;
}

.oswp-profile-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}

.oswp-profile-kicker {
    display: block;
    margin-bottom: 0;
    color: var(--oswp-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.oswp-profile-kicker-compact {
    margin-bottom: 0;
}

.oswp-profile-section-copy {
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 6px;
    align-content: center;
    min-width: 0;
}

.oswp-profile-section-copy .oswp-profile-kicker {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.oswp-profile-heading h2,
.oswp-profile-section-name {
    margin: 0;
    color: var(--oswp-text);
    line-height: 1.2;
}

.oswp-profile-heading h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
}

.oswp-profile-tagline {
    margin: 4px 0 0 !important;
    padding: 0 !important;
    line-height: 1.4;
    color: var(--oswp-muted);
    font-size: 14px;
}

.oswp-profile-bio {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--oswp-border);
    color: var(--oswp-text);
    font-size: 15px;
    line-height: 1.6;
}

.oswp-profile-bio p {
    margin: 0 0 8px;
}

.oswp-profile-bio p:last-child {
    margin-bottom: 0;
}

.oswp-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0;
}

.oswp-stat {
    position: relative;
    display: grid;
    grid-template-columns: 42px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    align-items: center;
    min-height: 0;
    padding: 12px;
    border: 1px solid var(--oswp-border);
    border-radius: 12px;
    background: var(--oswp-surface);
    color: var(--oswp-text) !important;
    text-decoration: none !important;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

a.oswp-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(85, 52, 232, .35);
    box-shadow: var(--oswp-shadow);
}

.oswp-stat-icon {
    grid-row: 1 / 4;
    align-self: start;
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--oswp-accent-soft);
    color: var(--oswp-accent);
}

.oswp-stat-icon svg,
.oswp-comment-icon svg,
.oswp-profile-empty-icon svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.oswp-profile-section-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.oswp-stat-number {
    align-self: start;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.05;
}

.oswp-stat-label {
    align-self: start;
    margin-top: 4px;
    color: var(--oswp-muted);
    font-size: 11px;
    line-height: 1.25;
}

.oswp-stat-hint {
    margin-top: 3px;
    color: var(--oswp-accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .01em;
}

.oswp-profile-links {
    padding: 14px 16px;
}

.oswp-profile-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px !important;
    padding: 0 !important;
}

.oswp-profile-section-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--oswp-accent-soft);
    color: var(--oswp-accent);
}

.oswp-profile-section-name {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--oswp-text) !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1.12 !important;
}

.oswp-profile-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.oswp-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid var(--oswp-border);
    border-radius: 11px;
    background: var(--oswp-surface-soft);
    color: var(--oswp-text) !important;
    text-decoration: none !important;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.oswp-action:hover {
    transform: translateY(-1px);
    border-color: rgba(85, 52, 232, .35);
    background: var(--oswp-accent-soft);
}

.oswp-action-primary {
    border-color: rgba(85, 52, 232, .18) !important;
    background: var(--oswp-accent-soft) !important;
    color: var(--oswp-text) !important;
}

.oswp-action-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.oswp-action-text strong {
    color: inherit;
    font-size: 13px;
    font-weight: 800;
}

.oswp-action-text small {
    overflow: hidden;
    color: var(--oswp-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.oswp-email-action {
    width: 100%;
    margin: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(85, 52, 232, .18) !important;
    background: var(--oswp-accent-soft) !important;
    color: var(--oswp-text) !important;
    box-shadow: none !important;
}

.oswp-email-text {
    color: var(--oswp-muted) !important;
    user-select: text;
    -webkit-user-select: text;
}

.oswp-email-action .oswp-action-text strong {
    color: var(--oswp-text) !important;
}

.oswp-email-action .oswp-email-symbol {
    color: var(--oswp-accent) !important;
}

.oswp-email-symbol {
    font-size: 16px;
}

.oswp-action-arrow {
    flex: 0 0 auto;
    color: var(--oswp-accent);
    font-size: 18px;
    font-weight: 700;
}

.oswp-comment-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.oswp-comment-card {
    padding: 12px;
    border: 1px solid var(--oswp-border);
    border-radius: 12px;
    background: var(--oswp-surface-soft);
}

.oswp-comment-head {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 10px;
}

.oswp-comment-icon,
.oswp-profile-empty-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--oswp-accent-soft);
    color: var(--oswp-accent);
}

.oswp-profile-comments .oswp-comment-icon {
    align-self: start;
    margin-top: 0;
}

.oswp-comment-body,
.oswp-comment-context {
    min-width: 0;
}

.oswp-profile-comments .oswp-comment-icon svg {
    width: 19px !important;
    height: 19px !important;
}

.oswp-comment-context {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.oswp-profile-comments .oswp-comment-card .oswp-comment-article {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--oswp-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
}

.oswp-profile-comments .oswp-comment-card .oswp-comment-article:hover {
    color: var(--oswp-accent) !important;
    text-decoration: underline !important;
}

.oswp-profile-comments .oswp-comment-card .oswp-comment-date {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--oswp-muted) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
}

.oswp-profile-comments .oswp-comment-card .oswp-comment-excerpt {
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: var(--oswp-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.oswp-profile-comments .oswp-comment-card .oswp-comment-link {
    display: inline-flex;
    margin-top: 2px !important;
    padding: 0 !important;
    color: var(--oswp-accent) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-decoration: none;
}

.oswp-comment-link:hover {
    text-decoration: underline;
}

.oswp-profile-empty {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    margin-top: 12px;
    padding: 14px;
    border: 1px dashed var(--oswp-border);
    border-radius: 12px;
    background: var(--oswp-surface-soft);
}

.oswp-profile-empty strong {
    display: block;
    margin: 0 0 4px;
    color: var(--oswp-text);
}

.oswp-profile-empty p {
    margin: 0;
    color: var(--oswp-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Modo oscuro */
body.dark-mode .oswp-profile-about,
body.dark .oswp-profile-about,
html.dark .oswp-profile-about,
body.wp-night-mode-on .oswp-profile-about,
[data-theme="dark"] .oswp-profile-about,
.dark-mode .oswp-profile-about {
    --oswp-accent: #9f8cff;
    --oswp-accent-soft: rgba(159, 140, 255, 0.13);
    --oswp-text: #f1f1f4;
    --oswp-muted: #b4b4bf;
    --oswp-border: #34343d;
    --oswp-surface: #202027;
    --oswp-surface-soft: #282830;
    --oswp-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.light):not([data-theme="light"]) .oswp-profile-about {
        --oswp-accent: #9f8cff;
        --oswp-accent-soft: rgba(159, 140, 255, 0.13);
        --oswp-text: #f1f1f4;
        --oswp-muted: #b4b4bf;
        --oswp-border: #34343d;
        --oswp-surface: #202027;
        --oswp-surface-soft: #282830;
        --oswp-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    }
}

@media (max-width: 720px) {
    .oswp-profile-main {
        padding: 12px 16px 14px;
    }

    .oswp-profile-heading {
        flex-direction: column;
        gap: 13px;
    }

    .oswp-profile-stats {
        grid-template-columns: 1fr;
    }

    .oswp-stat {
        min-height: 0;
        padding: 10px 12px;
    }

    .oswp-profile-actions {
        grid-template-columns: 1fr;
    }

    .oswp-profile-links {
        padding: 12px 14px;
    }

    .oswp-profile-section-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .oswp-profile-comments .oswp-comment-card .oswp-comment-excerpt {
        font-size: 15px !important;
        font-weight: 400 !important;
        line-height: 1.65 !important;
    }

    .oswp-profile-comments .oswp-comment-card .oswp-comment-article {
        font-size: 13px !important;
    }

    .oswp-profile-comments .oswp-comment-card .oswp-comment-date,
    .oswp-profile-comments .oswp-comment-card .oswp-comment-link {
        font-size: 12px !important;
    }

    .oswp-profile-empty {
        grid-template-columns: 1fr;
    }

    .oswp-comment-icon,
    .oswp-profile-empty-icon {
        width: 38px;
        height: 38px;
    }
}

.oswp-profile-notice {
    padding: 20px 22px;
}

.oswp-profile-notice p {
    margin: 6px 0 0;
    color: var(--oswp-muted);
}


/* 1.3.9: la identidad principal ya aparece en la tarjeta personalizada. */
#wpum-profile #profile-header-container h2 {
    display: none !important;
}

.oswp-owner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--oswp-border);
}

.oswp-owner-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--oswp-border);
    border-radius: 10px;
    background: var(--oswp-surface-soft);
    color: var(--oswp-text) !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.oswp-owner-button svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.oswp-owner-button:hover {
    transform: translateY(-1px);
    border-color: rgba(85, 52, 232, .34);
}

.oswp-owner-button-logout:hover {
    background: var(--oswp-accent-soft);
    color: var(--oswp-accent) !important;
}

@media (max-width: 720px) {
    .oswp-owner-actions {
        gap: 8px;
        margin-top: 13px;
        padding-top: 11px;
    }

    .oswp-owner-button {
        min-height: 38px;
        padding: 8px 11px;
    }
}
