/* ============================================================
   WP Event Paid Listings — Frontend CSS
   ============================================================ */

/* ── Utility ──────────────────────────────────────────────── */
.wpepl-hidden { display: none !important; }

/* ── Selector wrapper ─────────────────────────────────────── */
.wpepl-selector {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: #1e293b;
    margin: 24px 0 20px;
}

/* ── Section ──────────────────────────────────────────────── */
.wpepl-section { margin-bottom: 28px; }

.wpepl-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.wpepl-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #0f1b33;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}
.wpepl-badge-gold { background: #f9b800; color: #0f1b33; }

.wpepl-section-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #0f1b33;
}
.wpepl-section-sub {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

/* ── Plan grid ────────────────────────────────────────────── */
.wpepl-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 14px;
}

.wpepl-plan-card {
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    position: relative;
}
.wpepl-plan-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.wpepl-plan-card.wpepl-card-active {
    border-color: #f9b800;
    background: #fffdf0;
    box-shadow: 0 4px 20px rgba(249,184,0,.2);
}

/* Price */
.wpepl-pc-price {
    font-size: 26px;
    font-weight: 800;
    color: #0f1b33;
    line-height: 1.1;
}
.wpepl-pc-price.wpepl-price-free { color: #22c55e; }
.wpepl-pc-cycle {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
}
.wpepl-pc-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}
.wpepl-pc-events {
    font-size: 12px;
    font-weight: 600;
    color: #f9b800;
    background: rgba(249,184,0,.12);
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
}
.wpepl-pc-features {
    list-style: none;
    padding: 0;
    margin: 4px 0 6px;
    flex: 1;
}
.wpepl-pc-features li {
    font-size: 12px;
    color: #64748b;
    padding: 3px 0 3px 18px;
    position: relative;
}
.wpepl-pc-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
}

/* Select button */
.wpepl-btn-select-plan {
    width: 100%;
    background: #0f1b33;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    font-family: inherit;
    margin-top: auto;
}
.wpepl-btn-select-plan:hover { background: #1e3a5f; }
.wpepl-btn-select-plan.wpepl-btn-gold { background: #f9b800; color: #0f1b33; }
.wpepl-btn-select-plan.wpepl-btn-gold:hover { background: #e0a800; }
.wpepl-plan-card.wpepl-card-active .wpepl-btn-select-plan { background: #f9b800; color: #0f1b33; }

/* ── Add-on grid ──────────────────────────────────────────── */
.wpepl-addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.wpepl-addon-card {
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    position: relative;
    user-select: none;
}
.wpepl-addon-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.wpepl-addon-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.wpepl-addon-card.wpepl-addon-active {
    border-color: #f9b800;
    background: #fffdf0;
    box-shadow: 0 4px 20px rgba(249,184,0,.2);
}

/* Checkmark badge */
.wpepl-addon-tick {
    display: none;
    position: absolute;
    top: 10px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f9b800;
    color: #0f1b33;
    font-size: 13px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.wpepl-addon-card.wpepl-addon-active .wpepl-addon-tick { display: flex; }

/* ── Step back row ────────────────────────────────────────── */
.wpepl-step-back-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.wpepl-selected-plan-tag span {
    background: #0f1b33;
    color: #f9b800;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* ── Add-on action buttons ────────────────────────────────── */
.wpepl-addon-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.wpepl-btn-back {
    background: transparent;
    border: 1.5px solid #cbd5e1;
    color: #64748b;
    border-radius: 9px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .2s, color .2s;
}
.wpepl-btn-back:hover { border-color: #0f1b33; color: #0f1b33; }

.wpepl-btn-skip {
    background: transparent;
    border: 1.5px solid #cbd5e1;
    color: #94a3b8;
    border-radius: 9px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .2s, color .2s;
}
.wpepl-btn-skip:hover { border-color: #64748b; color: #475569; }

.wpepl-btn-confirm {
    background: #0f1b33;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
    margin-left: auto;
}
.wpepl-btn-confirm:hover:not(:disabled) { background: #f9b800; color: #0f1b33; }
.wpepl-btn-confirm:disabled { opacity: .4; cursor: not-allowed; }

/* ── Summary bar ──────────────────────────────────────────── */
#wpepl-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 10px;
    padding: 12px 18px;
    flex-wrap: wrap;
}
.wpepl-summary-icon { color: #22c55e; font-size: 18px; font-weight: 700; }
.wpepl-summary-text { font-size: 14px; font-weight: 600; color: #166534; flex: 1; }
.wpepl-btn-change {
    background: transparent;
    border: 1.5px solid #86efac;
    color: #166534;
    border-radius: 7px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .2s;
}
.wpepl-btn-change:hover { background: #dcfce7; }

/* ── Active-plan notice (user has subscription) ───────────── */
.wpepl-active-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-family: "Segoe UI", system-ui, sans-serif;
    flex-wrap: wrap;
}
.wpepl-an-left { display: flex; align-items: center; gap: 12px; }
.wpepl-an-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}
.wpepl-an-left strong { display: block; font-size: 14px; color: #1e40af; }
.wpepl-an-left span { font-size: 12px; color: #60a5fa; display: block; margin-top: 2px; }
.wpepl-an-link {
    background: #1d4ed8;
    color: #fff !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s;
}
.wpepl-an-link:hover { background: #1e3a8a; }

/* ── Upgrade / quota exceeded notice ─────────────────────── */
.wpepl-upgrade-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff7ed;
    border: 1.5px solid #fdba74;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 20px;
    font-family: "Segoe UI", system-ui, sans-serif;
}
.wpepl-un-icon {
    font-size: 24px;
    color: #ea580c;
    flex-shrink: 0;
    line-height: 1;
}
.wpepl-un-body strong { display: block; font-size: 15px; color: #7c2d12; margin-bottom: 6px; }
.wpepl-un-body p { font-size: 13px; color: #9a3412; margin: 0 0 14px; }
.wpepl-btn-upgrade {
    display: inline-block;
    background: #ea580c;
    color: #fff !important;
    text-decoration: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s;
}
.wpepl-btn-upgrade:hover { background: #c2410c; }

/* ── Dashboard card (My Account widget) ───────────────────── */
.wpepl-dash-card {
    background: #0f1b33;
    border-radius: 14px;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    font-family: "Segoe UI", system-ui, sans-serif;
}
.wpepl-dash-left { flex: 1; min-width: 140px; }
.wpepl-dash-name { color: #fff; font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.wpepl-dash-renews { color: #f9b800; font-size: 12px; font-weight: 500; }
.wpepl-dash-stats { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.wpepl-dash-stat { text-align: center; }
.wpepl-stat-val { display: block; color: #f9b800; font-size: 26px; font-weight: 800; line-height: 1; }
.wpepl-stat-lbl { display: block; color: #94a3b8; font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; margin-top: 4px; }

/* ── Cart: locked quantity display ───────────────────────── */
.wpepl-qty-locked {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

/* ── Shake animation (validation) ────────────────────────── */
@keyframes wpepl-shake {
    0%,100% { transform: translateX(0); }
    25%,75%  { transform: translateX(-8px); }
    50%      { transform: translateX(8px); }
}
.wpepl-shake { animation: wpepl-shake .45s ease; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 520px) {
    .wpepl-plan-grid,
    .wpepl-addon-grid { grid-template-columns: 1fr; }
    .wpepl-addon-actions { flex-direction: column; }
    .wpepl-btn-confirm { margin-left: 0; width: 100%; }
    .wpepl-dash-stats { gap: 16px; }
}

/* ── Active Plan Banner (add-event form) ──────────────────── */
.wpepl-active-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    background: #1e2a3a;
    border-radius: 12px;
    padding: 20px 28px;
    margin-bottom: 24px;
}
.wpepl-active-banner .banner-left h2 {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
}
.wpepl-active-banner .banner-left p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}
.wpepl-active-banner .banner-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.wpepl-active-banner .stat {
    text-align: center;
}
.wpepl-active-banner .stat span {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}
.wpepl-active-banner .stat small {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-top: 4px;
}
@media (max-width: 520px) {
    .wpepl-active-banner { flex-direction: column; align-items: flex-start; }
    .wpepl-active-banner .banner-stats { gap: 20px; }
}
