/* WPProfileEngine – Frontend Styles */

/* ── CSS Custom Properties (overridden by Appearance settings) ─────────── */
:root {
    --wpe-primary:        #7c3aed;
    --wpe-primary-dark:   #6d28d9;
    --wpe-primary-light:  #ede9fe;
    --wpe-text:           #111827;
    --wpe-text-muted:     #6b7280;
    --wpe-text-light:     #9ca3af;
    --wpe-border:         #e5e7eb;
    --wpe-border-dark:    #d1d5db;
    --wpe-bg-soft:        #f9fafb;
    --wpe-bg-muted:       #f3f4f6;
    --wpe-card-bg:        #ffffff;
    --wpe-font-body:      -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
    --wpe-font-size:      15px;
    /* On-background context: text/cards rendered directly over the page gradient/image */
    --wpe-on-bg:          #ffffff;
    --wpe-on-bg-muted:    color-mix(in srgb,var(--wpe-on-bg) 65%,transparent);
    --wpe-overlay-bg:     rgba(255,255,255,.10);
    --wpe-overlay-border: rgba(255,255,255,.18);
}

/* ── Block heading (rendered by block render_callback when title attr is set) */

/* ── Per-block instance wrapper (set by block render_callback) */

.wpe-block-instance {
    /* Scoping element for CSS variable overrides and optional max-width.
       No visual styles — the shortcode output handles its own appearance. */
}

/* Subtitle shown below wpe-block-heading for non-form blocks */
.wpe-block-subtitle {
    margin: -12px 0 16px;
    font-size: 14px;
    color: var(--wpe-text-muted, #6b7280);
    line-height: 1.5;
}

/* Section heading for listing/grid blocks (left-aligned) */
.wpe-block-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wpe-text, #111827);
    margin: 0 0 18px;
    line-height: 1.25;
}

/* ── Form Wrapper ───────────────────────────────────────────────────────── */

.wpe-form-wrap {
    max-width: var(--wpe-form-max-width, 520px);
    margin: 0 auto;
    padding: 32px;
    background: var(--wpe-card-bg,#fff);
    border: 1px solid var(--wpe-border,#e5e7eb);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wpe-form-wrap h2,
.wpe-form-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--wpe-text,#111827);
    text-align: center;
}

.wpe-form-header {
    margin-bottom: 24px;
    text-align: center;
}

.wpe-form-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--wpe-text-muted,#6b7280);
    text-align: center;
}

/* ── Field Rows ─────────────────────────────────────────────────────────── */

.wpe-field-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.wpe-field-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wpe-text,#374151);
    margin-bottom: 6px;
}

.wpe-req {
    color: #ef4444;
    margin-left: 2px;
}

/* ── Field Inputs ────────────────────────────────────────────────────────── */

.wpe-field {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid var(--wpe-border-dark,#d1d5db);
    border-radius: 8px;
    font-size: 14px;
    line-height: 40px;
    color: var(--wpe-text,#111827);
    background: var(--wpe-card-bg,#fff);
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    vertical-align: middle;
}

.wpe-field:focus {
    outline: none;
    border-color: var(--wpe-primary,#7c3aed);
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.wpe-address-wrap {
    position: relative;
}
.wpe-address-input-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.wpe-address-input-row .wpe-address-input {
    flex: 1 1 auto;
    min-width: 0;
}
.wpe-gps-btn {
    flex: 0 0 auto;
    padding: 0 10px;
    height: 40px;
    border: 1px solid var(--wpe-border-dark,#d1d5db);
    border-radius: 6px;
    background: var(--wpe-card-bg,#fff);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background .15s, border-color .15s;
}
.wpe-gps-btn:hover  { background: var(--wpe-bg-muted,#f3f4f6); border-color: var(--wpe-text-light,#9ca3af); }
.wpe-gps-btn:disabled { opacity: .6; cursor: wait; }

/* Google autocomplete dropdown sits on top of everything */
.pac-container {
    z-index: 100000;
}

.wpe-textarea {
    height: auto;
    line-height: 1.5;
    padding: 10px 14px;
    resize: vertical;
    min-height: 80px;
}

.wpe-select {
    background-color: var(--wpe-card-bg,#fff);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    padding-right: 36px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.wpe-field.wpe-has-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.10);
}

/* ── Inline field error ──────────────────────────────────────────────────── */

.wpe-field-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Notices ─────────────────────────────────────────────────────────────── */

.wpe-notice {
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--wpe-bg-muted,#f3f4f6);
    color: var(--wpe-text,#374151);
    font-size: 14px;
    margin-bottom: 16px;
}

.wpe-error {
    padding: 12px 16px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-size: 13px;
    margin-bottom: 16px;
}

.wpe-error ul { margin: 6px 0 0 20px; padding: 0; }
.wpe-error li { margin-bottom: 4px; }

.wpe-success {
    padding: 12px 16px;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-size: 13px;
    margin-bottom: 16px;
}

.wpe-warning {
    padding: 12px 16px;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ── Form submit button ──────────────────────────────────────────────────── */

.wpe-form > .wpe-btn,
.wpe-form .wpe-form-actions .wpe-btn {
    width: 100%;
    margin-top: 4px;
}

/* Search action buttons must not inherit the full-width rule */
.wpe-search-actions .wpe-btn {
    width: auto;
    white-space: nowrap;
    flex: none;
}

/* ── Radios & Checkboxes ────────────────────────────────────────────────── */

.wpe-options-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wpe-options-list li {
    margin-bottom: 6px;
}

.wpe-options-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}

.wpe-options-list input[type="radio"],
.wpe-options-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--wpe-primary,#7c3aed);
    cursor: pointer;
}

/* ── Image Upload ───────────────────────────────────────────────────────── */

.wpe-image-preview {
    display: block;
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid var(--wpe-border,#e5e7eb);
    object-fit: cover;
}

.wpe-image-preview-empty {
    display: none;
}

/* ── Helper Text ────────────────────────────────────────────────────────── */

.wpe-field-desc {
    font-size: 12px;
    color: var(--wpe-text-muted,#6b7280);
    margin-top: 5px;
}

.wpe-field-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.wpe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
    text-decoration: none;
}

.wpe-btn-primary {
    background: var(--wpe-primary,#7c3aed);
    color: #fff;
    width: 100%;
}

.wpe-btn-primary:hover {
    background: var(--wpe-primary-dark,#6d28d9);
    color: #fff;
}

.wpe-btn-secondary {
    background: var(--wpe-bg-muted,#f3f4f6);
    color: var(--wpe-text,#374151);
    border: 1.5px solid var(--wpe-border-dark,#d1d5db);
}

.wpe-btn-secondary:hover {
    background: var(--wpe-border,#e5e7eb);
    color: var(--wpe-text,#111827);
}

.wpe-btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1.5px solid #fecaca;
    width: 100%;
}

.wpe-btn-danger:hover {
    background: #fecaca;
}

.wpe-btn-stripe {
    background: #635bff;
    color: #fff;
    width: 100%;
}

.wpe-btn-stripe:hover {
    background: #4f46e5;
    color: #fff;
}

.wpe-btn-paypal {
    background: #ffc439;
    color: #003087;
    width: 100%;
    font-weight: 700;
}

.wpe-btn-paypal:hover {
    background: #f0b429;
}

.wpe-btn[disabled],
.wpe-btn.loading {
    opacity: .6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Divider ────────────────────────────────────────────────────────────── */

.wpe-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--wpe-text-light,#9ca3af);
    font-size: 12px;
}

.wpe-divider::before,
.wpe-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--wpe-border,#e5e7eb);
}

/* ── Alerts ─────────────────────────────────────────────────────────────── */

.wpe-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.wpe-alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.wpe-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.wpe-alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Subscribe form ─────────────────────────────────────────────────────── */

.wpe-subscribe-wrap {
    max-width: 420px;
    margin: 0 auto;
}

.wpe-plan-summary {
    background: #faf5ff;
    border: 1.5px solid #e9d5ff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.wpe-plan-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--wpe-text,#111827);
}

.wpe-plan-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--wpe-primary,#7c3aed);
    line-height: 1.1;
    margin: 8px 0 4px;
}

.wpe-plan-interval {
    font-size: 13px;
    color: var(--wpe-text-muted,#6b7280);
}

.wpe-payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#paypal-button-container .paypal-buttons {
    border-radius: 8px;
    overflow: hidden;
}

/* ── Member Directory ───────────────────────────────────────────────────── */

.wpe-directory {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wpe-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.wpe-member-card {
    background: var(--wpe-card-bg,#fff);
    border: 1px solid var(--wpe-border,#e5e7eb);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    transition: box-shadow .15s, transform .15s;
}

.wpe-member-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.wpe-member-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
    border: 3px solid var(--wpe-bg-muted,#f3f4f6);
}

.wpe-member-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--wpe-text,#111827);
    margin: 0 0 4px;
}

.wpe-member-fields {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    text-align: left;
}

.wpe-member-fields li {
    font-size: 12px;
    color: var(--wpe-text-muted,#6b7280);
    padding: 3px 0;
    border-bottom: 1px solid var(--wpe-bg-muted,#f3f4f6);
}

.wpe-member-fields li:last-child {
    border-bottom: none;
}

.wpe-member-fields strong {
    color: var(--wpe-text,#374151);
}

/* ── Role Badge (frontend) ──────────────────────────────────────────────── */

.wpe-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

/* ── Restriction Message ────────────────────────────────────────────────── */

.wpe-restriction-message {
    background: var(--wpe-primary-light,#faf5ff);
    border: 2px solid var(--wpe-border,#e9d5ff);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wpe-restriction-message p {
    color: var(--wpe-text,#374151);
    font-size: 15px;
    line-height: 1.6;
}

.wpe-restriction-message a {
    color: var(--wpe-primary,#7c3aed);
    font-weight: 600;
}

/* ── Directory Pagination ───────────────────────────────────────────────── */

.wpe-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.wpe-pagination a,
.wpe-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid var(--wpe-border,#e5e7eb);
    color: var(--wpe-text,#374151);
    transition: all .15s;
}

.wpe-pagination a:hover {
    background: var(--wpe-bg-muted,#f3f4f6);
    border-color: var(--wpe-border-dark,#d1d5db);
}

.wpe-pagination .current {
    background: var(--wpe-primary,#7c3aed);
    border-color: var(--wpe-primary,#7c3aed);
    color: #fff;
}

/* ── Multi-step progress bar ────────────────────────────────────────────── */

.wpe-steps-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
}

.wpe-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.wpe-step-dot-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--wpe-border,#e5e7eb);
    color: var(--wpe-text-light,#9ca3af);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}

.wpe-step-dot.active .wpe-step-dot-num {
    background: var(--wpe-primary,#7c3aed);
    color: #fff;
}

.wpe-step-dot.done .wpe-step-dot-num {
    background: var(--wpe-primary-light,#a78bfa);
    color: var(--wpe-primary-dark,#5b21b6);
}

.wpe-step-dot-label {
    font-size: 11px;
    color: var(--wpe-text-muted,#6b7280);
    white-space: nowrap;
    position: absolute;
    top: 38px;
    left: 50%;
    transform: translateX(-50%);
}

.wpe-step-dot.active .wpe-step-dot-label {
    color: var(--wpe-primary,#7c3aed);
    font-weight: 600;
}

.wpe-step-connector {
    height: 2px;
    width: 48px;
    background: var(--wpe-border,#e5e7eb);
    margin: 0 4px;
    margin-bottom: 18px;
    transition: background .2s;
    flex-shrink: 0;
}

.wpe-step-connector.active { background: var(--wpe-primary-light,#a78bfa); }

/* ── Step nav (Back / Next buttons) ─────────────────────────────────────── */

.wpe-step-nav {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.wpe-step-nav .wpe-btn { flex: 1; }

.wpe-btn-outline {
    background: var(--wpe-card-bg,#fff);
    color: var(--wpe-primary,#7c3aed);
    border: 2px solid var(--wpe-primary,#7c3aed);
}

.wpe-btn-outline:hover {
    background: var(--wpe-primary-light,#f5f3ff);
}

/* ── Form Links ─────────────────────────────────────────────────────────── */

.wpe-form-footer {
    text-align: center;
    font-size: 13px;
    color: var(--wpe-text-muted,#6b7280);
    margin-top: 20px;
}

.wpe-form-footer a {
    color: var(--wpe-primary,#7c3aed);
    font-weight: 600;
    text-decoration: none;
}

.wpe-form-footer a:hover {
    text-decoration: underline;
}

/* ── Section / block headings ────────────────────────────────────────────── */
/* Explicit styles override the active WordPress theme (e.g. Kadence) on <h2> */

/* Explicit overrides beat WordPress theme (e.g. Kadence) element selectors */
.wpe-section-title {
    font-family: var(--wpe-font-heading, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif) !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--wpe-text, #111827) !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    line-height: 1.3 !important;
    letter-spacing: -0.2px !important;
    text-transform: none !important;
    box-shadow: none !important;
}

/* ── Search Form & Results ───────────────────────────────────────────────── */

.wpe-search-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Filter card */
.wpe-search-form {
    background: var(--wpe-bg-soft,#f9fafb);
    border: 1.5px solid var(--wpe-border,#e5e7eb);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.wpe-search-form .wpe-search-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.wpe-search-form .wpe-search-fields .wpe-field-row { margin-bottom: 0; }

.wpe-search-form .wpe-search-fields label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--wpe-primary,#7c3aed);
    margin-bottom: 4px;
}

.wpe-search-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

/* Active filter chips */
.wpe-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.wpe-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--wpe-primary-light,#ede9fe);
    color: var(--wpe-primary-dark,#5b21b6);
    border: 1px solid var(--wpe-border-dark,#c4b5fd);
    border-radius: 20px;
    padding: 3px 10px 3px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.wpe-filter-chip-lbl { font-weight: 700; }

/* Results bar */
.wpe-search-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wpe-border,#e5e7eb);
}

.wpe-search-count {
    font-size: 13px;
    color: var(--wpe-text-muted,#6b7280);
    margin: 0;
}

.wpe-search-count strong {
    color: var(--wpe-text,#111827);
    font-weight: 700;
}

.wpe-search-page-info {
    font-size: 13px;
    color: var(--wpe-text-muted,#6b7280);
    margin: 0;
}

/* Pagination */
.wpe-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 28px;
}

.wpe-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid var(--wpe-border,#e5e7eb);
    border-radius: 8px;
    background: var(--wpe-card-bg,#fff);
    color: var(--wpe-text,#374151);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .15s, background .15s, color .15s;
}

.wpe-page-btn:hover {
    border-color: var(--wpe-primary,#7c3aed);
    color: var(--wpe-primary,#7c3aed);
    background: var(--wpe-primary-light,#f5f3ff);
}

.wpe-page-btn.wpe-page-current {
    background: var(--wpe-primary,#7c3aed);
    border-color: var(--wpe-primary,#7c3aed);
    color: #fff;
    pointer-events: none;
}

.wpe-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: var(--wpe-text-light,#9ca3af);
    font-size: 14px;
}

/* Empty state */
.wpe-search-empty {
    text-align: center;
    padding: 48px 24px;
    background: var(--wpe-bg-soft,#f9fafb);
    border: 1.5px dashed var(--wpe-border,#e5e7eb);
    border-radius: 16px;
    margin-top: 8px;
}

.wpe-search-empty-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 12px;
}

.wpe-search-empty p {
    color: var(--wpe-text-light,#9ca3af);
    font-size: 15px;
    margin: 0 0 16px;
}

/* Grid */
.wpe-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: stretch; /* all rows equal height */
}

/* Grid cell wrapper — display:contents makes the card a direct grid item
   so the grid row height applies to the card itself with no intermediary. */
.wpe-card-wrap {
    display: contents;
}

/* Card — vertical flex column, fills its grid row via align-self:stretch (default) */
.wpe-search-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--wpe-card-bg,#fff);
    border: 1.5px solid var(--wpe-border,#e5e7eb);
    border-radius: 16px;
    padding: 24px 16px 18px;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    cursor: default;
    box-sizing: border-box;
}

.wpe-search-card:hover {
    border-color: var(--wpe-primary-dark,#a78bfa);
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

/* ── Online/Offline status dot ──────────────────────────────────────────── */

.wpe-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    flex-shrink: 0;
    vertical-align: middle;
}

.wpe-status-dot.wpe-online  { background: #22c55e; box-shadow: 0 0 0 2px rgba(22,163,74,.18); }
.wpe-status-dot.wpe-offline { background: var(--wpe-text-light,#9ca3af); }

/* Overlay dot on the search card avatar (bottom-right corner) */
.wpe-status-dot-card {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 13px;
    height: 13px;
    border-width: 2px;
}

/* Dot in profile header name row */
.wpe-profile-name .wpe-status-dot {
    width: 12px;
    height: 12px;
    margin-left: 4px;
}

/* Avatar — inline-block so the absolute dot hugs the actual image */
.wpe-search-card-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.wpe-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px var(--wpe-card-bg,#fff), 0 0 0 5px var(--wpe-primary-light,#c4b5fd);
    display: block;
}

.wpe-avatar-lg.wpe-avatar-default {
    background: linear-gradient(135deg, var(--wpe-primary,#7c3aed), var(--wpe-primary-light,#a78bfa));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
}

/* Card body */
.wpe-search-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--wpe-text,#111827);
    margin-bottom: 2px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpe-search-card-handle {
    font-size: 12px;
    color: var(--wpe-primary,#7c3aed);
    margin-bottom: 10px;
}

.wpe-search-card-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;
    margin-top: auto; /* push badges to the bottom so all cards align */
    padding-top: 10px;
}

.wpe-search-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--wpe-bg-muted,#f3f4f6);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--wpe-text,#374151);
    max-width: 100%;
    border: 1.5px solid transparent;
    transition: background .15s, border-color .15s;
}

/* When a per-option colour is applied via inline style, lighten the label */
.wpe-search-badge[style] .wpe-search-badge-lbl {
    color: rgba(255,255,255,.8);
}

.wpe-search-badge[style] .wpe-search-badge-val {
    color: #fff;
}

.wpe-search-badge-lbl {
    font-weight: 700;
    color: var(--wpe-primary,#7c3aed);
    white-space: nowrap;
}

.wpe-search-badge-val {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* Coloured option badge (used in profile display) */
.wpe-option-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Plans Grid ──────────────────────────────────────────────────────────── */

.wpe-plans-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wpe-plans-grid {
    display: grid;
    gap: 24px;
}

.wpe-plans-cols-1 { grid-template-columns: 1fr; }
.wpe-plans-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wpe-plans-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wpe-plans-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 860px) {
    .wpe-plans-cols-3,
    .wpe-plans-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .wpe-plans-grid { grid-template-columns: 1fr !important; }
}

.wpe-plan-card {
    background: var(--wpe-card-bg,#fff);
    border: 2px solid var(--wpe-border,#e5e7eb);
    border-radius: 16px;
    padding: 36px 28px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: box-shadow .2s, border-color .2s, transform .2s;
}

.wpe-plan-card:hover {
    box-shadow: 0 10px 36px rgba(0,0,0,.09);
    transform: translateY(-3px);
}

.wpe-plan-card.wpe-plan-featured {
    border-color: var(--wpe-primary,#7c3aed);
    box-shadow: 0 6px 24px rgba(124,58,237,.18);
}

.wpe-plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wpe-primary,#7c3aed);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.wpe-plan-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--wpe-text,#111827);
    margin: 0 0 16px;
}

.wpe-plan-price {
    display: flex;
    align-items: baseline;
    gap: 1px;
    font-size: 46px;
    font-weight: 800;
    color: var(--wpe-primary,#7c3aed);
    line-height: 1;
    margin-bottom: 6px;
}

.wpe-plan-currency {
    font-size: 22px;
    font-weight: 700;
    align-self: flex-start;
    margin-top: 8px;
}

.wpe-plan-interval {
    font-size: 14px;
    font-weight: 500;
    color: var(--wpe-text-light,#9ca3af);
    align-self: flex-end;
    margin-bottom: 4px;
    margin-left: 2px;
}

.wpe-plan-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 14px;
    background: var(--wpe-bg-muted,#f3f4f6);
    color: var(--wpe-text-muted,#6b7280);
}

.wpe-plan-desc {
    font-size: 14px;
    color: var(--wpe-text-muted,#6b7280);
    line-height: 1.6;
    margin: 0 0 24px;
    flex: 1;
}

.wpe-plan-divider {
    width: 100%;
    border: none;
    border-top: 1px solid var(--wpe-bg-muted,#f3f4f6);
    margin: 0 0 20px;
}

.wpe-plan-actions {
    width: 100%;
}

.wpe-plan-actions .wpe-btn {
    width: 100%;
}

.wpe-plan-no-payment {
    font-size: 12px;
    color: var(--wpe-text-light,#9ca3af);
    font-style: italic;
}

/* ── Plans Vertical List ─────────────────────────────────────────────────── */

.wpe-plans-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpe-plan-row {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--wpe-card-bg,#fff);
    border: 2px solid var(--wpe-border,#e5e7eb);
    border-radius: 12px;
    padding: 20px 28px;
    transition: box-shadow .18s, border-color .18s;
}

.wpe-plan-row:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    border-color: var(--wpe-primary-light,#c4b5fd);
}

.wpe-plan-row.wpe-plan-featured {
    border-color: var(--wpe-primary,#7c3aed);
    background: #fdfaff;
    box-shadow: 0 4px 20px rgba(124,58,237,.12);
}

.wpe-plan-row-price {
    display: flex;
    align-items: baseline;
    gap: 1px;
    font-size: 38px;
    font-weight: 800;
    color: var(--wpe-primary,#7c3aed);
    line-height: 1;
    white-space: nowrap;
    min-width: 130px;
    flex-shrink: 0;
}

.wpe-plan-row-price .wpe-plan-currency {
    font-size: 18px;
    font-weight: 700;
    align-self: flex-start;
    margin-top: 5px;
}

.wpe-plan-row-price .wpe-plan-interval {
    font-size: 13px;
    font-weight: 500;
    color: var(--wpe-text-light,#9ca3af);
    align-self: flex-end;
    margin-bottom: 3px;
    margin-left: 2px;
}

.wpe-plan-row-info {
    flex: 1;
    min-width: 0;
}

.wpe-plan-row-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--wpe-text,#111827);
    margin-bottom: 5px;
}

.wpe-plan-badge-inline {
    display: inline-flex;
    align-items: center;
    background: var(--wpe-primary,#7c3aed);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.wpe-plan-row-desc {
    font-size: 13px;
    color: var(--wpe-text-muted,#6b7280);
    line-height: 1.5;
}

.wpe-plan-row-cta {
    flex-shrink: 0;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

@media (max-width: 640px) {
    .wpe-plan-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 20px;
    }
    .wpe-plan-row-cta { width: 100%; }
}

/* ── [wp_profile_user] ───────────────────────────────────────────────────── */

.wpe-profile-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 680px;
}

.wpe-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.wpe-avatar-xl {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px;
    min-height: 96px;
    max-width: 96px;
    max-height: 96px;
    border-radius: 50% !important;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 0 3px var(--wpe-card-bg,#fff), 0 0 0 5px var(--wpe-primary-light,#c4b5fd);
    flex-shrink: 0;
}

.wpe-profile-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wpe-profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--wpe-text,#111827);
    margin: 0;
    line-height: 1.2;
}

.wpe-profile-handle {
    font-size: 13px;
    color: var(--wpe-primary,#7c3aed);
    font-weight: 500;
}

.wpe-profile-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--wpe-border,#e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}

.wpe-profile-field {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--wpe-bg-muted,#f3f4f6);
    font-size: 14px;
    line-height: 1.4;
}

.wpe-profile-field:last-child {
    border-bottom: none;
}

.wpe-profile-field:nth-child(even) {
    background: var(--wpe-bg-soft,#f9fafb);
}

.wpe-profile-field-label {
    font-weight: 600;
    color: var(--wpe-primary-dark,#6d28d9);
    min-width: 110px;
    flex-shrink: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.wpe-profile-field-value {
    color: var(--wpe-text,#374151);
    word-break: break-word;
}

@media (max-width: 480px) {
    .wpe-profile-header { flex-direction: column; align-items: flex-start; }
    .wpe-profile-field  { flex-direction: column; gap: 2px; }
    .wpe-profile-field-label { min-width: 0; }
}

/* ── Search card: clickable ──────────────────────────────────────────────── */

.wpe-card-clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.wpe-card-clickable:hover,
.wpe-card-clickable:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
    outline: none;
}

/* ── Profile modal overlay ───────────────────────────────────────────────── */

.wpe-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.wpe-profile-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
}

.wpe-profile-modal-panel {
    position: relative;
    z-index: 1;
    width: min(480px, 95vw);
    height: 100%;
    background: var(--wpe-card-bg,#fff);
    box-shadow: -4px 0 32px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    animation: wpePanelSlideIn .25s ease;
    overflow: hidden;
}

@keyframes wpePanelSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

.wpe-profile-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: var(--wpe-text-muted,#6b7280);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 2;
    transition: background 0.15s, color 0.15s;
}

.wpe-profile-modal-close:hover { background: var(--wpe-bg-muted,#f3f4f6); color: var(--wpe-text,#111827); }

.wpe-profile-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-top: 52px;
}

.wpe-profile-modal-loading {
    text-align: center;
    color: var(--wpe-text-muted,#6b7280);
    padding: 40px 20px;
    font-size: 15px;
}

body.wpe-modal-open { overflow: hidden; }

/* ── Card wrapper (positions fav btn + debug block over card) ──────────── */

.wpe-card-wrap {
    position: relative;
}

/* ── Favourite toggle button (card corner) ───────────────────────────────── */

.wpe-fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(255,255,255,.95);
    border: 1.5px solid var(--wpe-border,#e5e7eb);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wpe-border-dark,#d1d5db);
    box-shadow: 0 1px 4px rgba(0,0,0,.10);
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .12s;
}

.wpe-fav-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    transition: transform .12s;
}

.wpe-fav-btn:hover {
    background: #fff0f3;
    border-color: #fb7185;
    color: #f43f5e;
    box-shadow: 0 2px 8px rgba(244,63,94,.25);
    transform: scale(1.1);
}

.wpe-fav-btn:hover svg { transform: scale(1.15); }

.wpe-fav-btn.wpe-fav-active {
    background: #fff0f3;
    border-color: #f43f5e;
    color: #f43f5e;
    box-shadow: 0 2px 8px rgba(244,63,94,.20);
}

.wpe-fav-btn.wpe-fav-loading {
    opacity: .55;
    cursor: wait;
    pointer-events: none;
}

.wpe-fav-btn.wpe-fav-error { border-color: #dc2626; color: #dc2626; }

/* Pop animation when adding */
@keyframes wpeFavPop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.35); }
    70%  { transform: scale(.9); }
    100% { transform: scale(1); }
}
.wpe-fav-btn.wpe-fav-pop { animation: wpeFavPop .4s ease; }

/* ── Favourite button — profile page variant (inline, pill-shaped) ───────── */

.wpe-fav-btn-profile {
    position: static;
    border-radius: 20px;
    width: auto;
    height: 34px;
    padding: 0 14px;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wpe-text-muted,#6b7280);
    border-color: var(--wpe-border,#e5e7eb);
    box-shadow: none;
    align-items: center;
    display: inline-flex;
}

.wpe-fav-btn-profile svg { width: 14px; height: 14px; flex-shrink: 0; }

.wpe-fav-btn-profile .wpe-fav-btn-label { line-height: 1; }

.wpe-fav-btn-profile:hover,
.wpe-fav-btn-profile.wpe-fav-active {
    background: #fff0f3;
    border-color: #f43f5e;
    color: #f43f5e;
    box-shadow: none;
    transform: none;
}

/* ── "My Favourites" filter toggle in results bar ───────────────────────── */

.wpe-search-bar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpe-fav-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wpe-text-muted,#6b7280);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--wpe-border,#e5e7eb);
    border-radius: 20px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.wpe-fav-filter-toggle:hover {
    background: #fff0f3;
    border-color: #f43f5e;
    color: #f43f5e;
}

.wpe-fav-filter-toggle.active {
    background: #fff0f3;
    border-color: #f43f5e;
    color: #f43f5e;
}


/* ── Admin debug coords block ────────────────────────────────────────────── */

.wpe-debug-coords {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
    padding: 5px 8px;
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 6px;
    font-size: 10px;
    font-family: monospace;
    color: #92400e;
    width: 100%;
    box-sizing: border-box;
}

.wpe-debug-coords-row { display: block; }
.wpe-debug-coords-row b { color: #78350f; }

/* ── My Favourites shortcode page ───────────────────────────────────────── */

/* ── Toast notification ──────────────────────────────────────────────────── */

#wpe-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #1f2937;
    color: #fff;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

#wpe-toast.wpe-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#wpe-toast.wpe-toast-success { background: #065f46; }
#wpe-toast.wpe-toast-warn    { background: #92400e; }
#wpe-toast.wpe-toast-error   { background: #991b1b; }

/* ── Block button (card corner) ──────────────────────────────────────────── */

.wpe-block-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: rgba(255,255,255,.95);
    border: 1.5px solid var(--wpe-border,#e5e7eb);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wpe-border-dark,#d1d5db);
    box-shadow: 0 1px 4px rgba(0,0,0,.10);
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .12s;
}

.wpe-block-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}

.wpe-block-btn:hover {
    background: #fff7ed;
    border-color: #f97316;
    color: #ea580c;
    box-shadow: 0 2px 8px rgba(234,88,12,.22);
    transform: scale(1.1);
}

.wpe-block-btn.wpe-block-active {
    background: #fff7ed;
    border-color: #f97316;
    color: #ea580c;
}

/* ── Block button — profile page pill variant ───────────────────────────── */

.wpe-block-btn-profile {
    position: static;
    border-radius: 20px;
    width: auto;
    height: 34px;
    padding: 0 14px;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wpe-text-muted,#6b7280);
    border-color: var(--wpe-border,#e5e7eb);
    box-shadow: none;
    align-items: center;
    display: inline-flex;
}

.wpe-block-btn-profile svg { width: 14px; height: 14px; flex-shrink: 0; }
.wpe-block-btn-profile .wpe-block-btn-label { line-height: 1; }

.wpe-block-btn-profile:hover,
.wpe-block-btn-profile.wpe-block-active {
    background: #fff7ed;
    border-color: #f97316;
    color: #ea580c;
    box-shadow: none;
    transform: none;
}

/* Unblock pill on blocked list */
.wpe-block-btn-unblock {
    position: static;
    border-radius: 20px;
    width: auto;
    height: auto;
    padding: 5px 12px;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
}

.wpe-block-btn-unblock svg { width: 13px; height: 13px; }

/* ── Profile actions row (fav + block buttons side by side) ─────────────── */

.wpe-profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

/* Normalize every action button: same height, pill shape, font, SVG size */
.wpe-profile-actions .wpe-fav-btn-profile,
.wpe-profile-actions .wpe-block-btn-profile,
.wpe-profile-actions .wpe-report-btn,
.wpe-profile-actions .wpe-msg-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}

/* .wpe-msg-btn override: keep filled style but match pill shape */
.wpe-profile-actions .wpe-msg-btn {
    border: 1.5px solid transparent;
    background: var(--wpe-primary,#7c3aed);
    color: #fff;
    text-decoration: none;
}
.wpe-profile-actions .wpe-msg-btn:hover {
    background: var(--wpe-primary-dark,#6d28d9);
    color: #fff;
}

/* Uniform SVG size for all profile action icons */
.wpe-profile-actions svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ── Blocked users list ──────────────────────────────────────────────────── */


.wpe-block-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--wpe-primary, #7c3aed);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 6px;
    line-height: 1;
    flex-shrink: 0;
}

.wpe-blocked-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--wpe-border,#e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}

.wpe-blocked-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--wpe-bg-muted,#f3f4f6);
    transition: background .12s;
}

.wpe-blocked-row:last-child { border-bottom: none; }
.wpe-blocked-row:hover { background: #fafafa; }

.wpe-blocked-avatar img,
.wpe-blocked-avatar .avatar { border-radius: 50%; width: 40px; height: 40px; }

.wpe-blocked-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wpe-blocked-name  { font-size: 14px; font-weight: 600; color: var(--wpe-text,#111827); }
.wpe-blocked-handle { font-size: 12px; color: var(--wpe-text-light,#9ca3af); }

.wpe-blocked-row .wpe-block-btn-unblock { margin-left: auto; flex-shrink: 0; }

/* ── Favourites title ────────────────────────────────────────────────────── */

.wpe-favourites-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wpe-text,#111827);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   USER GALLERY
   ═══════════════════════════════════════════════════════════════════════════ */

.wpe-gallery-wrap { max-width: var(--wpe-container-w,900px); margin: 0 auto; }

.wpe-gallery-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.wpe-gallery-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--wpe-text,#111827);
    margin: 0;
}

.wpe-gallery-count-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--wpe-text-muted,#6b7280);
    background: var(--wpe-bg-muted,#f3f4f6);
    border: 1px solid var(--wpe-border,#e5e7eb);
    border-radius: 20px;
    padding: 2px 8px;
}

.wpe-gallery-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wpe-primary,#7c3aed);
    background: var(--wpe-card-bg,#fff);
    border: 1.5px solid var(--wpe-primary,#7c3aed);
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, color .15s;
    margin-left: auto;
}

.wpe-gallery-upload-btn:hover { background: var(--wpe-primary,#7c3aed); color: #fff; }

.wpe-gallery-full-notice { margin-left: auto; font-size: 12px; color: #ef4444; font-weight: 600; }

.wpe-gallery-progress {
    margin-bottom: 14px;
    background: var(--wpe-bg-soft,#f9fafb);
    border: 1px solid var(--wpe-border,#e5e7eb);
    border-radius: 8px;
    padding: 10px 14px;
}

.wpe-gallery-progress-bar { height: 6px; background: var(--wpe-border,#e5e7eb); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.wpe-gallery-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg,var(--wpe-primary,#7c3aed),var(--wpe-primary-light,#a78bfa)); border-radius: 3px; transition: width .2s; }
.wpe-gallery-progress-text { font-size: 12px; color: var(--wpe-text-muted,#6b7280); margin: 0; }

.wpe-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.wpe-gallery-empty { grid-column: 1 / -1; text-align: center; padding: 48px 20px; color: var(--wpe-text-light,#9ca3af); }
.wpe-gallery-empty p { margin: 12px 0 0; }

.wpe-gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--wpe-bg-muted,#f3f4f6);
    cursor: pointer;
}

.wpe-gallery-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.wpe-gallery-item:hover .wpe-gallery-img { transform: scale(1.04); }

.wpe-gallery-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity .15s, background .15s;
    z-index: 2;
}
.wpe-gallery-delete-btn svg { stroke: #fff; display: block; flex-shrink: 0; }
.wpe-gallery-item:hover .wpe-gallery-delete-btn { opacity: 1; }
.wpe-gallery-delete-btn:hover { background: #ef4444; }

/* Lightbox */
#wpe-gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpe-gallery-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpe-gallery-lightbox-img { max-width: 88vw; max-height: 88vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

.wpe-gallery-lightbox-close {
    position: fixed; top: 16px; right: 20px;
    background: rgba(255,255,255,.15); color: #fff; border: none;
    border-radius: 50%; width: 36px; height: 36px; font-size: 18px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}

.wpe-gallery-lightbox-close:hover { background: rgba(255,255,255,.3); }

.wpe-gallery-lightbox-nav {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.15); color: #fff; border: none;
    border-radius: 50%; width: 44px; height: 44px; font-size: 28px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s; line-height: 1;
}

.wpe-gallery-lightbox-nav:hover { background: rgba(255,255,255,.3); }
.wpe-gallery-lightbox-prev { left: 16px; }
.wpe-gallery-lightbox-next { right: 16px; }


/* Profile gallery preview (inside [wp_profile_user]) */
.wpe-profile-gallery-preview { margin-top: 28px; }
.wpe-profile-gallery-title { font-size: 15px; font-weight: 700; color: var(--wpe-text,#111827); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.wpe-profile-gallery-count { font-size: 12px; font-weight: 600; background: var(--wpe-primary-light,#ede9fe); color: var(--wpe-primary,#7c3aed); border-radius: 20px; padding: 1px 8px; }
.wpe-profile-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, 110px); gap: 8px; }
.wpe-profile-gallery-item { width: 110px; height: 110px; border-radius: 8px; overflow: hidden; cursor: pointer; }
.wpe-profile-gallery-item:hover .wpe-profile-gallery-img { transform: scale(1.05); }
.wpe-profile-gallery-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }

/* ── Report button ──────────────────────────────────────────────────────────── */
.wpe-report-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 14px;
    background: none; border: 1.5px solid var(--wpe-border,#e5e7eb);
    border-radius: 20px; color: var(--wpe-text-muted,#6b7280); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.wpe-report-btn:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.wpe-report-btn svg { flex-shrink: 0; }

/* ── Report modal ───────────────────────────────────────────────────────────── */
.wpe-report-overlay {
    display: none; position: fixed; inset: 0; z-index: 100001;
    background: rgba(0,0,0,.55); align-items: center; justify-content: center;
}
.wpe-report-overlay.wpe-report-open { display: flex; }
.wpe-report-modal {
    position: relative; background: var(--wpe-card-bg,#fff); border-radius: 14px;
    padding: 28px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.18);
    animation: wpeModalIn .18s ease;
}
@keyframes wpeModalIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
.wpe-report-modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; font-size: 22px; color: var(--wpe-text-light,#9ca3af); cursor: pointer; line-height: 1;
}
.wpe-report-modal-close:hover { color: #374151; }
.wpe-report-modal-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--wpe-text,#111827); }
.wpe-report-modal-desc  { margin: 0 0 14px; font-size: 14px; color: var(--wpe-text-muted,#6b7280); }
.wpe-report-textarea {
    width: 100%; box-sizing: border-box; border: 1.5px solid var(--wpe-border-dark,#d1d5db);
    border-radius: 8px; padding: 10px 12px; font-size: 14px; color: var(--wpe-text,#111827);
    resize: vertical; min-height: 90px; font-family: inherit;
    transition: border-color .15s;
}
.wpe-report-textarea:focus { outline: none; border-color: var(--wpe-primary,#7c3aed); }
.wpe-report-modal-footer { margin-top: 14px; }
.wpe-report-msg { margin: 10px 0 0; font-size: 13px; border-radius: 6px; padding: 8px 12px; }
.wpe-report-msg-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.wpe-report-msg-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ── Send Message button (profile actions) ──────────────────────────────── */
.wpe-msg-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500;
    background: var(--wpe-primary,#7c3aed); color: #fff; text-decoration: none;
    transition: background .15s;
}
.wpe-msg-btn:hover { background: var(--wpe-primary-dark,#6d28d9); color: #fff; }
.wpe-msg-btn svg   { stroke: #fff; flex-shrink: 0; }

/* ── Inbox layout ───────────────────────────────────────────────────────── */
.wpe-inbox {
    display: flex; height: 600px; max-height: 80vh;
    border: 1.5px solid var(--wpe-border,#e5e7eb); border-radius: 12px; overflow: hidden;
    background: var(--wpe-card-bg,#fff); font-size: 14px;
}

/* Sidebar */
.wpe-inbox-sidebar {
    width: 280px; min-width: 220px; max-width: 320px;
    border-right: 1.5px solid var(--wpe-border,#e5e7eb); display: flex; flex-direction: column;
    overflow: hidden; flex-shrink: 0;
}
.wpe-inbox-sidebar-header {
    padding: 16px 16px 12px; border-bottom: 1px solid var(--wpe-bg-muted,#f3f4f6);
}
.wpe-inbox-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--wpe-text,#111827); }
.wpe-inbox-conv-list { flex: 1; overflow-y: auto; }
.wpe-inbox-empty { padding: 24px 16px; color: var(--wpe-text-light,#9ca3af); font-size: 13px; margin: 0; text-align: center; }

/* Conversation items */
.wpe-inbox-conv-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--wpe-bg-soft,#f9fafb);
    transition: background .12s;
}
.wpe-inbox-conv-item:hover   { background: var(--wpe-bg-soft,#f9fafb); }
.wpe-inbox-conv-item.wpe-inbox-conv-active { background: var(--wpe-primary-light,#f5f3ff); }
.wpe-inbox-conv-avatar img,
.wpe-inbox-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.wpe-inbox-conv-info  { flex: 1; min-width: 0; }
.wpe-inbox-conv-name  { font-weight: 600; color: var(--wpe-text,#111827); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.wpe-inbox-conv-preview { font-size: 12px; color: var(--wpe-text-light,#9ca3af); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.wpe-inbox-conv-time  { font-size: 11px; color: var(--wpe-text-light,#9ca3af); white-space: nowrap; flex-shrink: 0; }
.wpe-inbox-unread-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--wpe-primary,#7c3aed); color: #fff; font-size: 11px; font-weight: 700;
}

/* Main area */
.wpe-inbox-main {
    flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
}
.wpe-inbox-thread-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-bottom: 1px solid var(--wpe-bg-muted,#f3f4f6); min-height: 52px;
}
.wpe-inbox-back-btn {
    display: none; background: none; border: none; cursor: pointer; padding: 4px;
    color: var(--wpe-text-muted,#6b7280); border-radius: 6px; line-height: 1;
}
.wpe-inbox-back-btn:hover { background: var(--wpe-bg-muted,#f3f4f6); }
.wpe-inbox-back-btn svg { stroke: currentColor; display: block; }
.wpe-inbox-thread-with { font-weight: 600; font-size: 15px; color: var(--wpe-text,#111827); flex: 1; }
.wpe-inbox-delete-thread-btn {
    margin-left: auto; background: none; border: none; cursor: pointer; padding: 4px;
    color: var(--wpe-text-muted,#6b7280); border-radius: 6px; line-height: 1;
    opacity: 0.6; transition: opacity .15s, background .15s;
}
.wpe-inbox-delete-thread-btn:hover { background: var(--wpe-bg-muted,#f3f4f6); opacity: 1; color: #dc2626; }
.wpe-inbox-delete-thread-btn svg { stroke: currentColor; display: block; }

/* Messages */
.wpe-inbox-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--wpe-border,#e5e7eb) transparent;
}
.wpe-inbox-messages::-webkit-scrollbar { width: 4px; }
.wpe-inbox-messages::-webkit-scrollbar-track { background: transparent; }
.wpe-inbox-messages::-webkit-scrollbar-thumb { background: var(--wpe-border,#e5e7eb); border-radius: 4px; }
.wpe-inbox-messages::-webkit-scrollbar-thumb:hover { background: var(--wpe-text-light,#9ca3af); }
.wpe-inbox-loading { color: var(--wpe-text-light,#9ca3af); font-size: 13px; text-align: center; padding: 24px 0; }

.wpe-inbox-msg {
    display: flex; flex-direction: column; max-width: 72%; gap: 2px;
}
.wpe-inbox-msg-mine   { align-self: flex-end; align-items: flex-end; }
.wpe-inbox-msg-theirs { align-self: flex-start; align-items: flex-start; }

.wpe-inbox-msg-bubble {
    padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45;
    word-break: break-word; white-space: pre-wrap;
}
.wpe-inbox-msg-mine   .wpe-inbox-msg-bubble { background: var(--wpe-primary,#7c3aed); color: #fff; border-bottom-right-radius: 4px; }
.wpe-inbox-msg-theirs .wpe-inbox-msg-bubble { background: var(--wpe-bg-muted,#f3f4f6); color: var(--wpe-text,#111827); border-bottom-left-radius: 4px; }
.wpe-inbox-msg-time { font-size: 11px; color: var(--wpe-text-light,#9ca3af); padding: 0 4px; }

/* Send form */
.wpe-inbox-send-form {
    display: flex; align-items: flex-end; gap: 8px;
    padding: 10px 14px; border-top: 1.5px solid var(--wpe-border,#e5e7eb);
    background: var(--wpe-bg-muted, var(--wpe-card-bg, #fafafa));
}
.wpe-inbox-send-textarea {
    flex: 1; resize: none; border: 1.5px solid var(--wpe-border-dark,#d1d5db); border-radius: 10px;
    padding: 9px 12px; font-size: 14px; font-family: inherit; color: var(--wpe-text,#111827);
    transition: border-color .15s; outline: none; background: var(--wpe-card-bg,#fff);
    max-height: 120px; overflow-y: auto;
}
.wpe-inbox-send-textarea:focus { border-color: var(--wpe-primary,#7c3aed); }
.wpe-inbox-send-btn {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
    background-color: var(--wpe-primary,#7c3aed); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background-color .15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center; background-size: 18px 18px;
}
.wpe-inbox-send-btn:hover    { background-color: var(--wpe-primary-dark,#6d28d9); }
.wpe-inbox-send-btn:disabled { background-color: var(--wpe-primary-light,#c4b5fd); cursor: default; }
.wpe-inbox-send-btn svg      { display: none; }

/* Placeholder */
.wpe-inbox-placeholder {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 12px; color: var(--wpe-text-light,#9ca3af); font-size: 14px; padding: 24px;
}
.wpe-inbox-placeholder svg { opacity: .5; }

/* Mobile: stack sidebar & main */
@media (max-width: 599px) {
    .wpe-inbox { position: relative; height: 85vh; }
    .wpe-inbox-sidebar {
        width: 100%; max-width: 100%; border-right: none;
        position: absolute; inset: 0; z-index: 1; background: var(--wpe-card-bg,#fff);
        transition: transform .2s;
    }
    .wpe-inbox-sidebar.wpe-inbox-sidebar-hidden { transform: translateX(-100%); }
    .wpe-inbox-main {
        width: 100%; position: absolute; inset: 0; z-index: 2; background: var(--wpe-card-bg,#fff);
        transform: translateX(100%); transition: transform .2s;
    }
    .wpe-inbox-main.wpe-inbox-main-active { transform: translateX(0); }
    .wpe-inbox-back-btn { display: flex; }
}

/* ── Inline chat modal ──────────────────────────────────────────────────── */
.wpe-chat-overlay {
    display: none; position: fixed; inset: 0; z-index: 100002;
    background: rgba(0,0,0,.45); align-items: center; justify-content: center;
    padding: 16px;
}
.wpe-chat-modal {
    background: var(--wpe-card-bg,#fff); border-radius: 14px; width: 100%; max-width: 480px;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden;
}
.wpe-chat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--wpe-bg-muted,#f3f4f6); flex-shrink: 0;
}
.wpe-chat-header-user {
    display: flex; align-items: center; gap: 10px;
}
.wpe-chat-header-avatar {
    width: 36px !important; height: 36px !important;
    border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--wpe-primary-light,#ede9fe);
}
.wpe-chat-header-meta {
    display: flex; flex-direction: column; gap: 2px;
}
.wpe-chat-with  { font-weight: 700; font-size: 15px; color: var(--wpe-text,#111827); }
.wpe-chat-gender-badge {
    font-size: 11px; font-weight: 600; border-radius: 10px;
    padding: 1px 8px; display: inline-block; width: fit-content;
}
.wpe-gender-male   { background: #dbeafe; color: #1d4ed8; }
.wpe-gender-female { background: #fce7f3; color: #be185d; }
.wpe-gender-other  { background: var(--wpe-bg-muted,#f3f4f6); color: #374151; }
.wpe-chat-close {
    background: none; border: none; font-size: 22px; color: var(--wpe-text-light,#9ca3af);
    cursor: pointer; line-height: 1; padding: 2px 6px;
}
.wpe-chat-close:hover { color: #374151; }
.wpe-chat-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 8px; min-height: 200px;
}
.wpe-chat-empty { color: var(--wpe-text-light,#9ca3af); font-size: 13px; text-align: center; margin: auto; }
.wpe-chat-form {
    display: flex; align-items: flex-end; gap: 8px;
    padding: 10px 14px; border-top: 1.5px solid var(--wpe-border,#e5e7eb); background: #fafafa; flex-shrink: 0;
}
.wpe-chat-textarea {
    flex: 1; resize: none; border: 1.5px solid var(--wpe-border-dark,#d1d5db); border-radius: 10px;
    padding: 9px 12px; font-size: 14px; font-family: inherit; color: var(--wpe-text,#111827);
    transition: border-color .15s; outline: none; background: var(--wpe-card-bg,#fff); max-height: 120px; overflow-y: auto;
}
.wpe-chat-textarea:focus { border-color: var(--wpe-primary,#7c3aed); }
.wpe-chat-send-btn {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
    background-color: var(--wpe-primary,#7c3aed); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background-color .15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center; background-size: 18px 18px;
}
.wpe-chat-send-btn:hover    { background-color: var(--wpe-primary-dark,#6d28d9); }
.wpe-chat-send-btn:disabled { background-color: var(--wpe-primary-light,#c4b5fd); cursor: default; }
.wpe-chat-send-btn svg      { display: none; }

/* ── Emoji picker ───────────────────────────────────────────────────────── */
.wpe-emoji-trigger {
    flex-shrink: 0; background: none; border: none; cursor: pointer;
    font-size: 20px; line-height: 1; padding: 5px; border-radius: 6px;
    transition: background .12s; display: flex; align-items: center; justify-content: center;
}
.wpe-emoji-trigger:hover { background: var(--wpe-bg-muted,#f3f4f6); }

.wpe-emoji-picker {
    position: fixed; z-index: 100020;
    background: var(--wpe-card-bg,#fff); border: 1.5px solid var(--wpe-border,#e5e7eb); border-radius: 10px;
    padding: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.18);
    width: 272px; max-height: 220px; overflow-y: auto;
}
.wpe-emoji-grid {
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px;
}
.wpe-emoji-btn {
    background: none; border: none; cursor: pointer;
    font-size: 22px; padding: 4px; border-radius: 6px; line-height: 1;
    text-align: center; transition: background .1s;
}
.wpe-emoji-btn:hover { background: var(--wpe-bg-muted,#f3f4f6); }

/* ── Photo button & image bubbles ───────────────────────────────────────── */
.wpe-photo-trigger {
    flex-shrink: 0; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    font-size: 20px; line-height: 1; padding: 5px; border-radius: 6px;
    transition: background .12s; user-select: none;
}
.wpe-photo-trigger:hover { background: var(--wpe-bg-muted,#f3f4f6); }

.wpe-msg-photo {
    display: block; max-width: 240px; max-height: 240px;
    border-radius: 10px; object-fit: cover; cursor: pointer;
}
.wpe-msg-photo:hover { opacity: .88; }

/* ── Lightbox ───────────────────────────────────────────────────────────── */
.wpe-lightbox-overlay {
    display: none; position: fixed; inset: 0; z-index: 200000;
    background: rgba(0,0,0,.88); align-items: center; justify-content: center;
}
.wpe-lightbox-overlay.wpe-lightbox-open { display: flex; }

.wpe-lightbox-img {
    max-width: 90vw; max-height: 90vh;
    border-radius: 8px; object-fit: contain;
    box-shadow: 0 8px 48px rgba(0,0,0,.6);
}
.wpe-lightbox-close {
    position: fixed; top: 16px; right: 20px;
    background: none; border: none; color: #fff;
    font-size: 36px; line-height: 1; cursor: pointer;
    opacity: .8;
}
.wpe-lightbox-close:hover { opacity: 1; }

/* ── Upgrade Required Popup ─────────────────────────────────────────────── */
.wpe-upgrade-overlay {
    display: none; position: fixed; inset: 0; z-index: 210000;
    background: rgba(0,0,0,.6); align-items: center; justify-content: center;
    padding: 16px;
}
.wpe-upgrade-overlay.wpe-upgrade-open { display: flex; }

.wpe-upgrade-modal {
    background: var(--wpe-card-bg,#fff); border-radius: 16px; padding: 36px 32px 28px;
    max-width: 420px; width: 100%; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    position: relative; animation: wpe-upgrade-in .2s ease;
}
@keyframes wpe-upgrade-in {
    from { transform: scale(.92); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.wpe-upgrade-close {
    position: absolute; top: 12px; right: 14px;
    background: none; border: none; font-size: 22px; line-height: 1;
    color: var(--wpe-text-light,#9ca3af); cursor: pointer; padding: 4px;
}
.wpe-upgrade-close:hover { color: #374151; }
.wpe-upgrade-icon { font-size: 48px; margin-bottom: 12px; }
.wpe-upgrade-title {
    font-size: 20px; font-weight: 700; color: var(--wpe-text,#111827); margin: 0 0 10px;
}
.wpe-upgrade-msg {
    font-size: 14px; color: var(--wpe-text-muted,#6b7280); margin: 0 0 24px; line-height: 1.6;
}
.wpe-upgrade-actions { display: flex; flex-direction: column; gap: 10px; }
.wpe-upgrade-cta {
    display: block; padding: 11px 20px;
    background: var(--wpe-primary,#7c3aed); color: #fff !important; border-radius: 8px;
    font-size: 15px; font-weight: 600; text-decoration: none;
    transition: background .15s;
}
.wpe-upgrade-cta:hover { background: var(--wpe-primary-dark,#6d28d9); }
.wpe-upgrade-cancel {
    background: none; border: none; color: var(--wpe-text-light,#9ca3af); font-size: 13px;
    cursor: pointer; padding: 4px;
}
.wpe-upgrade-cancel:hover { color: #374151; }

/* ── Stats card [wp_profile_stats] ─────────────────────────────────────── */
.wpe-stats-card {
    max-width: 560px; margin: 0 auto;
    background: var(--wpe-card-bg,#fff); border: 1px solid var(--wpe-border,#e5e7eb); border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06); overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.wpe-stats-header {
    display: flex; align-items: center; gap: 16px;
    padding: 24px 24px 20px; border-bottom: 1px solid var(--wpe-bg-muted,#f3f4f6);
}
.wpe-stats-avatar-img {
    width: 64px !important; height: 64px !important;
    border-radius: 50%; object-fit: cover; display: block;
    box-shadow: 0 0 0 3px var(--wpe-card-bg,#fff), 0 0 0 5px var(--wpe-primary-light,#c4b5fd);
}
.wpe-stats-name {
    margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--wpe-text,#111827);
}
.wpe-stats-gender {
    font-size: 12px; font-weight: 600; border-radius: 10px;
    padding: 2px 10px; display: inline-block;
}
.wpe-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1px; background: var(--wpe-bg-muted,#f3f4f6);
}
.wpe-stats-item {
    background: var(--wpe-card-bg,#fff); padding: 20px 16px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    text-align: center;
}
.wpe-stats-icon  { font-size: 22px; line-height: 1; }
.wpe-stats-value { font-size: 18px; font-weight: 700; color: var(--wpe-text,#111827); }
.wpe-stats-label { font-size: 12px; color: var(--wpe-text-muted,#6b7280); font-weight: 500; }
