/* ==============================
   WP Accordion Block — Frontend
   ============================== */

.wpab-accordion {
    border: 1px solid #dde1e7;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.wpab-accordion:hover { box-shadow: 0 2px 10px rgba(0,0,0,.1); }

/* ── Кнопка-заголовок ───────────────────────── */
.wpab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
    transition: background .2s, color .2s;
}
.wpab-header:hover                           { background: #eef1f5; }
.wpab-accordion.wpab-open .wpab-header       { background: #eef1f5; color: #0d6efd; border-bottom: 1px solid #dde1e7; }
.wpab-header:focus-visible                   { outline: 2px solid #0d6efd; outline-offset: -2px; }

.wpab-title { flex: 1; }

/* ── Иконка ─────────────────────────────────── */
.wpab-icon {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #dde1e7;
    color: #555;
    transition: background .2s, border-color .2s, color .2s;
}
.wpab-accordion.wpab-open .wpab-icon {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* ---- Плюс / Минус ---- */
.wpab-icon--plus::before,
.wpab-icon--plus::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
}
.wpab-icon--plus::before { width: 12px; height: 2px; }   /* горизонтальная */
.wpab-icon--plus::after  { width: 2px;  height: 12px; }  /* вертикальная   */

/* открыто → вертикальная исчезает (минус) */
.wpab-accordion.wpab-open .wpab-icon--plus::after {
    transform: rotate(90deg);
    opacity: 0;
}

/* ---- Шеврон ---- */
.wpab-icon--chevron::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .3s ease;
}
.wpab-accordion.wpab-open .wpab-icon--chevron::before {
    transform: rotate(-135deg) translate(-2px, -2px);
}

/* ---- Стрелка ---- */
.wpab-icon--arrow::before {
    content: '';
    display: block;
    width: 9px;
    height: 9px;
    border-right: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    transition: transform .3s ease;
}
.wpab-accordion.wpab-open .wpab-icon--arrow::before {
    transform: rotate(-135deg) translateY(-3px);
}

/* ── Тело ───────────────────────────────────── */
.wpab-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .35s ease, opacity .3s ease;
}
.wpab-accordion.wpab-open .wpab-body {
    max-height: 3000px;
    opacity: 1;
}

.wpab-body-inner {
    padding: 18px 20px 22px;
    font-size: 15px;
    line-height: 1.75;
    color: #333;
}
.wpab-body-inner p:last-child { margin-bottom: 0; }

/* ── Адаптив ────────────────────────────────── */
@media (max-width: 600px) {
    .wpab-header      { padding: 13px 15px; font-size: 15px; }
    .wpab-body-inner  { padding: 14px 15px 18px; font-size: 14px; }
}
