/* =============================================
   Smart Testimonials — Frontend Styles
   ============================================= */

/* ── CSS Variables ── */
:root {
    --st-font:        'Georgia', 'Times New Roman', serif;
    --st-sans:        -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --st-accent:      #6c63ff;
    --st-star-on:     #f5a623;
    --st-star-off:    #e0e0e0;
    --st-gap:         24px;
    --st-radius:      12px;
    --st-trans:       0.25s ease;
}

/* ── Base wrapper ── */
.st-wrapper {
    font-family: var(--st-sans);
    line-height: 1.6;
}

/* ── No results ── */
.st-no-testimonials {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 40px;
}

/* ════════════════════════════════════════════
   LAYOUTS
   ════════════════════════════════════════════ */

/* Grid */
.st-layout-grid .st-item,
.st-layout-masonry .st-item {
    break-inside: avoid;
}

.st-layout-grid {
    display: grid;
    gap: var(--st-gap);
}
.st-layout-grid.st-cols-1 { grid-template-columns: 1fr; }
.st-layout-grid.st-cols-2 { grid-template-columns: repeat(2, 1fr); }
.st-layout-grid.st-cols-3 { grid-template-columns: repeat(3, 1fr); }
.st-layout-grid.st-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Masonry */
.st-layout-masonry {
    column-gap: var(--st-gap);
}
.st-layout-masonry.st-cols-1 { columns: 1; }
.st-layout-masonry.st-cols-2 { columns: 2; }
.st-layout-masonry.st-cols-3 { columns: 3; }
.st-layout-masonry.st-cols-4 { columns: 4; }
.st-layout-masonry .st-item { margin-bottom: var(--st-gap); }

/* List */
.st-layout-list {
    display: flex;
    flex-direction: column;
    gap: var(--st-gap);
}

/* Slider */
.st-layout-slider { position: relative; overflow: hidden; }
.st-slider-track  { display: flex; transition: transform 0.45s cubic-bezier(.4,0,.2,1); will-change: transform; }
.st-layout-slider .st-item { flex: 0 0 auto; }

.st-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}
.st-prev, .st-next {
    background: var(--st-accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px; height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: opacity var(--st-trans), transform var(--st-trans);
    display: flex; align-items: center; justify-content: center;
}
.st-prev:hover, .st-next:hover { opacity: .85; transform: scale(1.08); }
.st-dots { display: flex; gap: 8px; }
.st-dot  {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--st-star-off);
    cursor: pointer;
    transition: background var(--st-trans), transform var(--st-trans);
}
.st-dot.active { background: var(--st-accent); transform: scale(1.3); }

/* ════════════════════════════════════════════
   THEMES
   ════════════════════════════════════════════ */

/* Card (default) */
.st-theme-card .st-item {
    background: #fff;
    border-radius: var(--st-radius);
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    transition: transform var(--st-trans), box-shadow var(--st-trans);
}
.st-theme-card .st-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(108,99,255,.14);
}

/* Light */
.st-theme-light .st-item {
    background: #fafafa;
    border-radius: var(--st-radius);
    padding: 28px;
    border: 1px solid #eee;
}

/* Dark */
.st-theme-dark {
    background: #1a1a2e;
    padding: 32px;
    border-radius: 16px;
}
.st-theme-dark .st-item {
    background: #16213e;
    border-radius: var(--st-radius);
    padding: 28px;
    border: 1px solid #2d2d4e;
    color: #e8e8f0;
}
.st-theme-dark .st-review       { color: #c8c8d8; }
.st-theme-dark .st-author-name  { color: #fff; }
.st-theme-dark .st-company      { color: #8888aa; }
.st-theme-dark .st-quote-mark   { color: var(--st-accent); }

/* Minimal */
.st-theme-minimal .st-item {
    padding: 24px 0;
    border-bottom: 1px solid #eee;
}
.st-theme-minimal .st-item:last-child { border-bottom: none; }

/* ════════════════════════════════════════════
   STARS
   ════════════════════════════════════════════ */
.st-stars { margin-bottom: 12px; }
.st-star   { font-size: 18px; line-height: 1; }
.st-star.filled { color: var(--st-star-on); }
.st-star.empty  { color: var(--st-star-off); }

/* ════════════════════════════════════════════
   REVIEW TEXT
   ════════════════════════════════════════════ */
.st-review {
    margin: 0 0 20px;
    font-family: var(--st-font);
    font-size: 15px;
    color: #444;
    border: none;
    padding: 0;
    position: relative;
}
.st-quote-mark {
    font-size: 52px;
    line-height: 0;
    vertical-align: -18px;
    color: var(--st-accent);
    opacity: .25;
    margin-right: 4px;
    font-family: Georgia, serif;
}

/* ════════════════════════════════════════════
   AUTHOR
   ════════════════════════════════════════════ */
.st-author {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
}
.st-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--st-accent);
}
.st-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.st-author-name {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    font-family: var(--st-sans);
}
.st-company {
    font-size: 12px;
    color: #888;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 900px) {
    .st-layout-grid.st-cols-4,
    .st-layout-grid.st-cols-3 { grid-template-columns: repeat(2,1fr); }
    .st-layout-masonry.st-cols-4,
    .st-layout-masonry.st-cols-3 { columns: 2; }
}
@media (max-width: 600px) {
    .st-layout-grid.st-cols-4,
    .st-layout-grid.st-cols-3,
    .st-layout-grid.st-cols-2 { grid-template-columns: 1fr; }
    .st-layout-masonry { columns: 1 !important; }
}

/* ════════════════════════════════════════════
   STAR RATING PICKER (HTML Radio Buttons)
   ════════════════════════════════════════════ */

.st-star-picker {
    margin: 12px 0;
}

.st-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.st-stars-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.st-stars-input input[type="radio"] {
    display: none !important;
}

.st-stars-input label {
    font-size: 28px !important;
    color: #ddd !important;
    cursor: pointer !important;
    transition: color 0.15s ease, transform 0.15s ease !important;
    line-height: 1 !important;
    user-select: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.st-stars-input label:hover {
    color: #f5a623 !important;
    transform: scale(1.15) !important;
}

.st-stars-input label:hover ~ label {
    color: #f5a623 !important;
}

.st-stars-input input[type="radio"]:checked ~ label {
    color: #f5a623 !important;
}

/* Persist the color for all labels after the checked input */
.st-stars-input input[type="radio"]:checked ~ label,
.st-stars-input input[type="radio"]:checked ~ * label {
    color: #f5a623 !important;
}

/* On mobile, make stars slightly smaller */
@media (max-width: 600px) {
    .st-stars-input label {
        font-size: 24px;
    }
}
