/*
 * Post FAQ Manager Pro — Frontend Pro CSS
 * Loaded after the free plugin's frontend.css.
 * Adds styles for Pro features only.
 */

/* ── FAQ Search bar ────────────────────────────────────────────────────── */
.pfmp-search-wrap {
    margin-bottom: 20px;
    position: relative;
}

.pfmp-faq-search {
    width: 100%;
    padding: 11px 16px 11px 42px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 14px center;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.pfmp-faq-search:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pfmp-faq-search::placeholder {
    color: #9ca3af;
}

/* ── Expand / Collapse All button ──────────────────────────────────────── */
.pfmp-expand-wrap {
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-end;
}

.pfmp-expand-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
}

.pfmp-expand-all-btn:hover {
    background: #f0f4ff;
    border-color: #7c3aed;
    color: #7c3aed;
}

.pfmp-expand-all-btn:active {
    transform: scale(0.98);
}

/* ── Number prefix styling ─────────────────────────────────────────────── */
.pfmp-numbered .pfm-question {
    counter-increment: pfm-counter;
}

/* ── WooCommerce FAQ Tab ───────────────────────────────────────────────── */
.pfmp-woo-faq {
    margin-top: 24px;
}

.pfmp-woo-faq .pfm-section {
    margin: 0 !important;
}

.pfmp-woo-faq .pfm-title {
    display: none; /* WooCommerce provides the tab heading */
}

/* ── Highlighted search match ──────────────────────────────────────────── */
mark.pfmp-highlight {
    background: #fef08a;
    border-radius: 2px;
    padding: 0 1px;
    color: inherit;
}

/* ── Schema indicator (admin only) ────────────────────────────────────── */
.pfmp-schema-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .pfmp-faq-search {
        font-size: 16px; /* prevent iOS zoom */
        padding: 10px 14px 10px 40px;
    }

    .pfmp-expand-wrap {
        justify-content: flex-start;
    }
}

/* ── FAQ Groups / Categories ───────────────────────────────────────────── */
.pfmp-faq-group {
    margin-bottom: 28px;
}

.pfmp-faq-group:last-child {
    margin-bottom: 0;
}

.pfmp-group-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    padding: 0 4px 10px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 12px;
}

/* ── Open First — smooth entry ──────────────────────────────────────────── */
.pfm-panel.pfm-open {
    opacity: 1;
}

/* ── Number prefix styling ─────────────────────────────────────────────── */
.pfm-question {
    counter-reset: none;
}

/* ── Animation overrides per preset ───────────────────────────────────── */
.pfmp-anim-fade .pfm-panel {
    transition: max-height 0.3s ease, opacity 0.35s ease !important;
}

.pfmp-anim-scale .pfm-panel {
    transform-origin: top center;
    transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease !important;
}

.pfmp-anim-scale .pfm-panel:not(.pfm-open) {
    transform: scaleY(0.95);
}

.pfmp-anim-scale .pfm-panel.pfm-open {
    transform: scaleY(1);
}

.pfmp-anim-bounce .pfm-panel {
    transition: max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease !important;
}

.pfmp-anim-elastic .pfm-panel {
    transition: max-height 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease !important;
}

/* ── Elementor widget integration ──────────────────────────────────────── */
.elementor-widget-pfm-pro-faq-accordion .pfm-section {
    margin: 0 !important;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .pfmp-group-label {
        font-size: 11px;
    }
}
