/* ──────────────────────────────────────────────
   WPFAQBlock – Frontend Styles
   @package WPFAQBlock
   @since   2.0.0
────────────────────────────────────────────── */

.wpfaqblock-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    color: #374151;
}

/* ─────────────────────────────────────────────
   FAQ Voting
───────────────────────────────────────────── */
.wpfaqblock-voting {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.wpfaqblock-voting__label {
    font-weight: 600;
}

.wpfaqblock-voting__buttons {
    display: flex;
    gap: 8px;
}

.wpfaqblock-voting__btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    color: #444;
}

.wpfaqblock-voting__btn:hover {
    border-color: #FE8512;
    color: #FE8512;
    background: #FFF7ED;
}

.wpfaqblock-voting__btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ─────────────────────────────────────────────
   Grid Layout
───────────────────────────────────────────── */
.wpfaqblock-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wpfaqblock-grid-item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.wpfaqblock-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #FE8512;
}

.wpfaqblock-grid-item h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}

.wpfaqblock-grid-item .content {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
}

/* ── Group ── */
.wpfaqblock-group {
    margin-bottom: 36px;
}

.wpfaqblock-group__title {
    font-size: 1.25em;
    font-weight: 700;
    color: inherit;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid currentColor;
    display: block;
    opacity: 0.85;
}

/* ── Accordion Item ── */
.wpfaqblock-item {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow 150ms ease;
}

.wpfaqblock-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.wpfaqblock-item.is-open {
    box-shadow: 0 4px 12px rgba(79, 70, 229, .12);
    border-color: #C7D2FE;
}

/* ── Question Button ── */
.wpfaqblock-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    background: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    transition: background 150ms ease, color 150ms ease;
}

.wpfaqblock-question:hover {
    background: #F5F3FF;
    color: #4F46E5;
}

.wpfaqblock-item.is-open .wpfaqblock-question {
    background: #EEF2FF;
    color: #4F46E5;
}

.wpfaqblock-question__text {
    flex: 1;
    line-height: 1.5;
}

.wpfaqblock-question__icon {
    flex-shrink: 0;
    color: #9CA3AF;
    transition: transform 250ms ease;
    display: flex;
}

.wpfaqblock-item.is-open .wpfaqblock-question__icon {
    transform: rotate(180deg);
    color: #4F46E5;
}

/* ── Answer ── */
.wpfaqblock-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 300ms ease, padding 300ms ease;
}

.wpfaqblock-answer:not([hidden]) {
    max-height: 2000px;
}

.wpfaqblock-answer[hidden] {
    display: block !important;
    max-height: 0;
}

/* Override for animation */

.wpfaqblock-answer__inner {
    padding: 0 20px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #4B5563;
}

.wpfaqblock-answer__inner p:first-child {
    margin-top: 0;
}

.wpfaqblock-answer__inner p:last-child {
    margin-bottom: 0;
}

/* ── No FAQs ── */
.wpfaqblock-no-faqs {
    color: #9CA3AF;
    font-size: 14px;
    font-style: italic;
}
