/* Elementor visibility conditions: hide elements marked as lpm-hidden */
.lpm-hidden {
    display: none !important;
}

/* Account form layout */
.lpm-account-wrap {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.lpm-section-heading {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    color: #102a43;
}

.lpm-section-subheading {
    margin: 1rem 0 0.5rem;
    font-weight: 600;
    color: #334e68;
}

.lpm-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.25rem 0;
}

.lpm-account-login-prompt {
    color: #334e68;
    font-style: italic;
}

.lpm-membership-preview {
    font-size: 1rem;
    line-height: 1.7;
    color: #17324d;
}

.lpm-membership-gate {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid #c8d8e8;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
    box-shadow: 0 18px 45px rgba(18, 52, 86, 0.08);
}

.lpm-membership-gate h2 {
    margin: 0 0 0.75rem;
    color: #102a43;
    font-size: 1.5rem;
}

.lpm-membership-gate p {
    margin: 0;
    color: #334e68;
}

.lpm-membership-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.lpm-membership-actions .button {
    min-width: 140px;
    text-align: center;
}

@media (max-width: 640px) {
    .lpm-membership-gate {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .lpm-membership-actions {
        flex-direction: column;
    }

    .lpm-membership-actions .button {
        width: 100%;
    }
}

/* ==========================================================================
   Auth forms (login + register) and subscription form
   ========================================================================== */

.lpm-auth-form,
.lpm-subscription-form {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #c8d8e8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(18, 52, 86, 0.07);
    font-size: 1rem;
}

/* ---- Message banner ---- */

.lpm-form-message {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.lpm-form-message:not(:empty) {
    display: block;
}

.lpm-form-message--error {
    background: #fff0f0;
    border: 1px solid #f5c2c2;
    color: #c0392b;
}

.lpm-form-message--success {
    background: #f0fff4;
    border: 1px solid #b7e4c7;
    color: #1b6b3a;
}

.lpm-form-message--info {
    background: #f0f7ff;
    border: 1px solid #b3d4f5;
    color: #1a5296;
}

/* ---- Fields ---- */

.lpm-field {
    margin-bottom: 1.1rem;
}

.lpm-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #2d3a4a;
    font-size: 0.9rem;
}

.lpm-field input[type="text"],
.lpm-field input[type="email"],
.lpm-field input[type="password"],
.lpm-field input[type="url"],
.lpm-field input[type="number"] {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #cdd8e3;
    border-radius: 8px;
    font-size: 1rem;
    color: #17324d;
    background: #fafcff;
    box-sizing: border-box;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.lpm-field input:focus {
    outline: none;
    border-color: #3a7bd5;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.15);
}

.lpm-field .description {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: #607080;
}

/* Two-column name row */

.lpm-field-row {
    display: flex;
    gap: 1rem;
}

.lpm-field-row .lpm-field {
    flex: 1 1 0;
    min-width: 0;
}

/* Inline checkbox */

.lpm-field--inline label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.lpm-field--inline input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: #3a7bd5;
}

/* ---- Buttons ---- */

.lpm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, opacity 0.18s;
}

.lpm-btn--primary {
    background: #3a7bd5;
    color: #fff;
}

.lpm-btn--primary:hover {
    background: #2e62b0;
}

.lpm-btn:disabled,
.lpm-btn.lpm-is-loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Spinner ---- */

.lpm-spinner {
    display: none;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lpm-spin 0.6s linear infinite;
}

.lpm-is-loading .lpm-spinner {
    display: inline-block;
}

@keyframes lpm-spin {
    to { transform: rotate(360deg); }
}

/* ---- Form links (lost password etc.) ---- */

.lpm-form-links {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    text-align: center;
}

.lpm-form-links a {
    color: #3a7bd5;
    text-decoration: none;
}

.lpm-form-links a:hover {
    text-decoration: underline;
}

/* ---- 2FA intro message ---- */

.lpm-2fa-intro {
    margin: 0 0 1.25rem;
    color: #334e68;
    line-height: 1.6;
}

/* ---- Subscription categories ---- */

.lpm-subscription-categories {
    padding: 1rem;
    margin: 0.75rem 0 1rem;
    border: 1px solid #dde8f0;
    border-radius: 8px;
    background: #f7faff;
}

.lpm-subscription-categories .description {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #607080;
}

/* ---- Responsive tweaks ---- */

@media (max-width: 520px) {
    .lpm-auth-form,
    .lpm-subscription-form {
        padding: 1.25rem;
        border-radius: 12px;
        margin: 1rem;
    }

    .lpm-field-row {
        flex-direction: column;
        gap: 0;
    }
}

/* =============================================================================
   Like button
   =========================================================================== */

.lpm-like-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.lpm-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border: 1.5px solid #c8d8e8;
    border-radius: 999px;
    background: #fff;
    color: #334e68;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.lpm-like-btn:hover,
.lpm-like-wrap--liked .lpm-like-btn {
    background: #fff0f3;
    border-color: #e05a7e;
    color: #c2375a;
}

.lpm-like-btn__icon {
    font-size: 1rem;
    line-height: 1;
}

.lpm-like-count {
    font-size: 0.875rem;
    color: #627d98;
    min-width: 1.25ch;
}

/* =============================================================================
   Member dashboard  (v0.6)
   =========================================================================== */

/* Root wrapper */
.lpm-db {
    --lpm-primary:  #2563eb;
    --lpm-primary-dark: #1e40af;
    --lpm-surface:  #f8faff;
    --lpm-border:   #e2e8f0;
    --lpm-text:     #1e293b;
    --lpm-muted:    #64748b;
    --lpm-danger:   #e05a7e;
    --lpm-radius:   12px;
    --lpm-shadow:   0 1px 4px rgba(0,0,0,.07);

    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
    color: var(--lpm-text);
}

/* ─── Header ──────────────────────────────────────────── */
.lpm-db__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    border-radius: var(--lpm-radius);
    margin-bottom: 1.5rem;
    color: #fff;
}

.lpm-db-avatar {
    flex-shrink: 0;
}

.lpm-db-avatar__img,
.lpm-db-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.4);
    display: block;
    object-fit: cover;
}

.lpm-db__header-info {
    flex: 1;
    min-width: 0;
}

.lpm-db__welcome {
    margin: 0;
    font-size: 0.8rem;
    opacity: .75;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.lpm-db__name {
    margin: 0.2rem 0 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lpm-db__logout-link {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: 0.8rem;
    white-space: nowrap;
    margin-left: auto;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 20px;
    transition: background .15s;
}

.lpm-db__logout-link:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

/* ─── Tab navigation ─────────────────────────────────── */
.lpm-db__nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--lpm-border);
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.lpm-db-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--lpm-muted);
    border-radius: 6px 6px 0 0;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
}

.lpm-db-tab:hover {
    color: var(--lpm-text);
    background: rgba(37,99,235,.05);
}

.lpm-db-tab--active {
    color: var(--lpm-primary);
    border-bottom-color: var(--lpm-primary);
    font-weight: 600;
}

.lpm-db-tab__icon {
    font-size: 1em;
}

.lpm-db-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    height: 1.4em;
    padding: 0 .35em;
    border-radius: 20px;
    font-size: 0.72em;
    font-weight: 700;
    background: var(--lpm-primary);
    color: #fff;
    line-height: 1;
}

/* ─── Panels ──────────────────────────────────────────── */
.lpm-db__panel {
    display: none;
    animation: lpmFadeIn .2s ease;
}

.lpm-db__panel--active {
    display: block;
}

@keyframes lpmFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Empty states */
.lpm-db__empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--lpm-muted);
}

.lpm-db__empty-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.lpm-db__empty-hint {
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

/* ─── Card list (shared by liked + comments) ─────────── */
.lpm-db-card-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lpm-db-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--lpm-surface);
    border: 1px solid var(--lpm-border);
    border-radius: var(--lpm-radius);
    box-shadow: var(--lpm-shadow);
    transition: box-shadow .15s;
}

.lpm-db-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.10);
}

/* Thumbnail link */
.lpm-db-card__thumb-link {
    flex-shrink: 0;
}

.lpm-db-card__thumb,
.lpm-db-card__thumb-link img {
    width: 96px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Card body */
.lpm-db-card__body {
    flex: 1;
    min-width: 0;
}

.lpm-db-card__title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--lpm-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.3rem;
}

.lpm-db-card__title:hover {
    color: var(--lpm-primary);
    text-decoration: underline;
}

.lpm-db-card__meta {
    margin: 0;
    font-size: 0.78rem;
    color: var(--lpm-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.lpm-db-card__cat {
    font-weight: 600;
    color: var(--lpm-primary);
}

.lpm-db-card__sep {
    opacity: .5;
}

/* Unlike button (liked panel) */
.lpm-db-card__unlike,
.lpm-unlike-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--lpm-danger);
    cursor: pointer;
    padding: 0.3rem;
    line-height: 1;
    border-radius: 50%;
    transition: transform .15s, background .15s;
}

.lpm-db-card__unlike:hover,
.lpm-unlike-btn:hover {
    transform: scale(1.2);
    background: rgba(224,90,126,.1);
}

/* Comment card variant */
.lpm-db-card--comment {
    align-items: stretch;
}

.lpm-db-card__comment-bar {
    width: 4px;
    border-radius: 4px;
    background: var(--lpm-primary);
    flex-shrink: 0;
    align-self: stretch;
}

.lpm-db-card__excerpt {
    margin: 0 0 0.35rem;
    color: var(--lpm-text);
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.5;
}

.lpm-db-card__post-link {
    color: var(--lpm-primary);
    text-decoration: none;
    font-weight: 500;
}

.lpm-db-card__post-link:hover {
    text-decoration: underline;
}

/* ─── Guest state (Elementor widget) ─────────────────── */
.lpm-dashboard-guest {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--lpm-surface);
    border: 1px solid var(--lpm-border);
    border-radius: var(--lpm-radius);
}

.lpm-dashboard-guest__heading {
    margin: 0 0 0.75rem;
    font-size: 1.3rem;
}

.lpm-dashboard-guest__text {
    color: var(--lpm-muted);
    max-width: 440px;
    margin: 0 auto 1.5rem;
}

.lpm-dashboard-guest__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Shared button helpers ───────────────────────────── */
.lpm-btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}

.lpm-btn--primary {
    background: var(--lpm-primary);
    color: #fff;
    border-color: var(--lpm-primary);
}

.lpm-btn--primary:hover {
    background: var(--lpm-primary-dark);
    border-color: var(--lpm-primary-dark);
    color: #fff;
}

.lpm-btn--outline {
    background: transparent;
    color: var(--lpm-primary);
    border-color: var(--lpm-primary);
}

.lpm-btn--outline:hover {
    background: var(--lpm-primary);
    color: #fff;
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 580px) {
    .lpm-db__header {
        flex-wrap: wrap;
    }

    .lpm-db__logout-link {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .lpm-db-card__thumb,
    .lpm-db-card__thumb-link img {
        width: 64px;
        height: 46px;
    }

    .lpm-db-tab {
        font-size: 0.82rem;
        padding: 0.5rem 0.75rem;
    }
}

