/* ==========================================================
   WP Testimonial Snippet Builder v2.0 — Frontend Styles
   ======================================================== */

/* ── Section Wrapper ── */
.watb-section-wrap {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

/* ── Section Headline & Body ── */
.watb-section-header { margin-bottom: 36px; }

.watb-section-headline {
    margin: 0 0 12px;
    line-height: 1.25;
    font-weight: 700;
}

.watb-section-body {
    margin: 0 auto;
    max-width: 640px;
    font-size: 16px;
    line-height: 1.72;
    display: block;
}

/* ================================================================
   GRID LAYOUT
   ================================================================ */
.watb-layout-grid .watb-grid-wrap {
    display: grid;
    gap: 24px;
    align-items: stretch;
}
.watb-layout-grid.watb-cols-1 .watb-grid-wrap { grid-template-columns: 1fr; }
.watb-layout-grid.watb-cols-2 .watb-grid-wrap { grid-template-columns: repeat(2, 1fr); }
.watb-layout-grid.watb-cols-3 .watb-grid-wrap { grid-template-columns: repeat(3, 1fr); }
.watb-layout-grid.watb-cols-4 .watb-grid-wrap { grid-template-columns: repeat(4, 1fr); }

/* ================================================================
   MASONRY LAYOUT — pure CSS column-count
   ================================================================ */
.watb-layout-masonry .watb-grid-wrap { column-gap: 24px; }

.watb-layout-masonry.watb-cols-1 .watb-grid-wrap { column-count: 1; }
.watb-layout-masonry.watb-cols-2 .watb-grid-wrap { column-count: 2; }
.watb-layout-masonry.watb-cols-3 .watb-grid-wrap { column-count: 3; }
.watb-layout-masonry.watb-cols-4 .watb-grid-wrap { column-count: 4; }

.watb-layout-masonry .watb-card {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 24px;
    box-sizing: border-box;
    vertical-align: top;
}

.watb-layout-masonry .watb-card-inner { height: auto !important; }
.watb-layout-masonry .watb-client-info { margin-top: 16px !important; }

/* ================================================================
   CARD
   ================================================================ */
.watb-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.watb-layout-grid .watb-card { height: 100%; }
.watb-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.12); }

.watb-card-inner {
    padding: 26px 22px 22px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

/* ── Quote icon ── */
.watb-quote-icon { margin-bottom: 14px; line-height: 1; flex-shrink: 0; }
.watb-quote-icon svg { fill: currentColor; }

/* ── Text ── */
.watb-testimonial-text {
    font-size: 15px;
    line-height: 1.72;
    margin: 0 0 16px;
    flex-grow: 1;
    font-style: italic;
    color: inherit;
}

/* ── Stars ── */
.watb-stars {
    display: flex;
    gap: 2px;
    font-size: 18px;
    margin-bottom: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.watb-star.filled { color: #f0b429; }
.watb-star.empty  { color: #e5e7eb; }

/* ── Client info ── */
.watb-client-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,.06);
    flex-shrink: 0;
    margin-top: auto;
}

.watb-client-avatar { flex-shrink: 0; width: 52px; height: 52px; }
.watb-client-avatar img {
    width: 52px; height: 52px; min-width: 52px; min-height: 52px;
    border-radius: 50%; object-fit: cover;
    border: 2px solid #e5e7eb; display: block;
}

.watb-client-meta { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }

.watb-client-name {
    font-size: 14px; font-weight: 700;
    display: block; color: inherit;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.watb-client-designation {
    font-size: 12px; display: block; color: inherit; opacity: .7;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.watb-client-company {
    font-size: 12px; font-weight: 600; display: block; color: #5b5ef4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ================================================================
   VIDEO EMBED — responsive 16:9
   ================================================================ */
.watb-video-wrap { margin-top: 16px; width: 100%; }

.watb-video-embed {
    position: relative; width: 100%;
    padding-bottom: 56.25%; height: 0;
    overflow: hidden; border-radius: 8px; background: #000;
}

.watb-video-embed iframe,
.watb-video-embed video {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: 0; border-radius: 8px;
}

.watb-video-embed video { object-fit: cover; }

/* ================================================================
   SLIDER — Swiper.js
   ================================================================ */
.watb-layout-slider .swiper { width: 100%; overflow: hidden; padding-bottom: 48px; }
.watb-layout-slider .swiper-slide { height: auto; display: flex; }
.watb-layout-slider .watb-card { width: 100%; height: auto; }
.watb-layout-slider .watb-card-inner { height: 100%; }
.watb-layout-slider .watb-client-info { margin-top: auto; }

.watb-layout-slider .swiper-pagination-bullet {
    background: var(--watb-dot-color, #5b5ef4); opacity: .3; width: 8px; height: 8px;
    transition: opacity .2s, width .2s;
}
.watb-layout-slider .swiper-pagination-bullet-active {
    opacity: 1; width: 24px; border-radius: 4px;
}

.watb-layout-slider .swiper-button-prev,
.watb-layout-slider .swiper-button-next {
    color: var(--watb-arrow-color, #5b5ef4); background: #fff; width: 40px; height: 40px;
    border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.12); top: 40%;
}
.watb-layout-slider .swiper-button-prev::after,
.watb-layout-slider .swiper-button-next::after { font-size: 14px; font-weight: 900; }

/* ================================================================
   EMPTY / LOADING
   ================================================================ */
.watb-empty {
    padding: 40px; text-align: center; color: #9ca3af;
    font-style: italic; border: 1.5px dashed #e5e7eb;
    border-radius: 12px; font-size: 15px;
}

.watb-ajax-wrap { position: relative; min-height: 80px; }

.watb-loading::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(255,255,255,.65); border-radius: 12px; z-index: 10;
}

.watb-block-placeholder {
    padding: 20px; background: #eef2ff;
    border: 1.5px dashed #5b5ef4; border-radius: 10px;
    color: #5b5ef4; font-size: 14px; text-align: center;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .watb-layout-grid.watb-cols-4 .watb-grid-wrap { grid-template-columns: repeat(3, 1fr); }
    .watb-layout-masonry.watb-cols-4 .watb-grid-wrap { column-count: 3; }
}

@media (max-width: 768px) {
    .watb-layout-grid.watb-cols-3 .watb-grid-wrap,
    .watb-layout-grid.watb-cols-4 .watb-grid-wrap { grid-template-columns: repeat(2, 1fr); }
    .watb-layout-masonry.watb-cols-3 .watb-grid-wrap,
    .watb-layout-masonry.watb-cols-4 .watb-grid-wrap { column-count: 2; }
    .watb-card-inner { padding: 18px 16px 16px; }
    .watb-testimonial-text { font-size: 14px; }
    .watb-section-headline { font-size: 1.4em; }
    .watb-section-body { font-size: 14px; }
}

@media (max-width: 540px) {
    .watb-layout-grid .watb-grid-wrap { grid-template-columns: 1fr !important; }
    .watb-layout-masonry .watb-grid-wrap { column-count: 1 !important; }
    .watb-layout-slider .swiper-button-prev,
    .watb-layout-slider .swiper-button-next { display: none; }
    .watb-client-avatar img { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
    .watb-client-avatar { width: 44px; height: 44px; }
}

/* ── Text color inheritance ── */
.watb-quote-icon svg { fill: currentColor; }
.watb-testimonial-text { color: inherit; }
.watb-client-name { color: inherit; }
.watb-client-designation { color: inherit; opacity: .7; }
.watb-client-company { color: #5b5ef4 !important; }
