/* =============================================================================
   SNW Testimonials — Frontend Section
   [snw_ticker] shortcode output

   Card layout inspired by reference design:
     ┌──────────────────────────────────┐
     │ [Name Badge ▼]     ╭──────────╮  │
     │                    │  Avatar  │  │
     │ ★★★★★             ╰──────────╯  │
     │ Designation (opt)               │
     │ Review text here …              │
     │ March 2026 (opt)                │
     └──────────────────────────────────┘

   Brand tokens:
     Primary blue   #418fde
     Pink           #f67599
     Dark navy      #0a2137
     Fonts          Lilita One (headings) · IBM Plex Sans (body)
   ============================================================================= */

/* ── Section shell ─────────────────────────────────────────────────────────── */

.snw-ticker-section {
    padding: 72px 0 80px;
    background: #fff;
    border-top: 1px solid #e8f0f8;
    border-bottom: 1px solid #e8f0f8;
    overflow: hidden;
    margin-top: 80px;
    margin-bottom: 80px;
}

/* ── Section header ─────────────────────────────────────────────────────────── */

.snw-ticker-header {
    text-align: center;
    padding: 0 24px 44px;
}

.snw-ticker-title {
    font-family: "Lilita One", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: #418fde;
    margin: 0 0 10px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.snw-ticker-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 15px;
    color: #6f8090;
    margin: 0;
}

.snw-summary-stars {
    color: #f5a623;
    font-size: 17px;
    letter-spacing: 1px;
    line-height: 1;
}

.snw-summary-score {
    font-weight: 700;
    color: #0a2137;
}

/* ── Viewport + track ────────────────────────────────────────────────────────── */

.snw-ticker-viewport {
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 8%,
        #000 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 8%,
        #000 92%,
        transparent 100%
    );
}

.snw-ticker-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: snw-scroll linear infinite;
    /* duration set inline via PHP */
    /* top/bottom padding: room for the avatar that sits at card top-right */
    padding: 10px 32px 20px;
    align-items: flex-start;
}

.snw-ticker-section:hover .snw-ticker-track,
.snw-ticker-section:focus-within .snw-ticker-track {
    animation-play-state: paused;
}

@keyframes snw-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Card ─────────────────────────────────────────────────────────────────────── */

.snw-dog-card {
    position: relative;
    width: 340px;
    min-width: 340px;
    flex-shrink: 0;
    background: #ecf6ff;
    border-radius: 24px;
    /* Symmetric padding; avatar reserve is scoped to .snw-card-header so the
       paragraph and date below it can span the full card width. */
    padding: 22px 24px 24px 24px;
    box-shadow: 0 2px 12px rgba(10, 33, 55, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    /* min-height keeps cards a consistent height even with short reviews */
    min-height: 210px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Top section: name badge + stars + designation. Reserves space for the
   absolutely-positioned avatar (top-right) and is tall enough that the
   following text/date wrap below the avatar's bottom edge. */
.snw-card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 106px;
    min-height: 108px;
}

.snw-dog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(10, 33, 55, 0.12);
}

/* Featured variant: swap badge to pink */
.snw-dog-card--featured .snw-card-name-badge {
    background: #f67599;
}
.snw-dog-card--featured .snw-card-name-badge::after {
    background: #f67599;
}

/* ── Avatar — absolute top-right ─────────────────────────────────────────────── */

.snw-card-avatar {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f67599;
    box-shadow: 0 4px 14px rgba(246, 117, 153, 0.22);
    background: #d9e9f8;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.snw-dog-card:hover .snw-card-avatar {
    border-color: #418fde;
}

.snw-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.snw-dog-card:hover .snw-card-avatar img {
    transform: scale(1.07);
}

/* Placeholder when no image uploaded */
.snw-card-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #c8e0f8;
}

.snw-card-avatar--placeholder span {
    font-family: "Lilita One", sans-serif;
    font-size: 28px;
    color: #418fde;
    line-height: 1;
}

/* ── Name badge — speech-bubble style ───────────────────────────────────────── */

.snw-card-name-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #418fde;
    color: #fff;
    padding: 9px 16px;
    border-radius: 500rem; /* full pill */
    font-family: "Lilita One", sans-serif;
    font-size: 15px;
    line-height: 1.2;
    position: relative;
    /* Don't grow beyond the content column (leaves room for avatar) */
    max-width: 100%;
    /* Speech-bubble tail via ::after */
    margin-bottom: 4px;
}

/* Triangular pointer pointing down-left — classic speech bubble tail */
.snw-card-name-badge::after {
    content: '';
    position: absolute;
    left: 14px;
    bottom: -8px;
    width: 16px;
    height: 9px;
    background: #418fde;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.snw-card-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* ── Verified badge — inside the name pill ───────────────────────────────────── */

.snw-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    flex-shrink: 0;
}

.snw-verified-badge svg {
    display: block;
}

/* ── Stars ───────────────────────────────────────────────────────────────────── */

.snw-card-stars {
    display: flex;
    gap: 1px;
    /* Push stars down past the badge pointer */
    margin-top: 4px;
}

.snw-star {
    font-size: 17px;
    line-height: 1;
}

.snw-star--on  { color: #f5a623; }
.snw-star--off { color: #d0dae5; }

/* ── Designation ─────────────────────────────────────────────────────────────── */

.snw-card-designation {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 12px;
    color: #6f8090;
    font-style: italic;
}

/* ── Review text ─────────────────────────────────────────────────────────────── */

.snw-card-text {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 14px;
    color: #0a2137;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Date stamp ──────────────────────────────────────────────────────────────── */

.snw-card-date {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 11px;
    color: #9daab6;
    letter-spacing: 0.02em;
    margin-top: auto; /* push to bottom of card */
}

/* ── Accessibility: reduced motion ────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .snw-ticker-track {
        animation: none !important;
    }
    .snw-dog-card,
    .snw-card-avatar img {
        transition: none !important;
    }
    .snw-dog-card:hover {
        transform: none;
    }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .snw-ticker-section {
        padding: 52px 0 60px;
        margin-top: 48px;
        margin-bottom: 48px;
    }

    .snw-ticker-header {
        padding-bottom: 28px;
    }

    .snw-ticker-viewport {
        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 5%,
            #000 95%,
            transparent 100%
        );
        mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 5%,
            #000 95%,
            transparent 100%
        );
    }

    .snw-dog-card {
        width: 300px;
        min-width: 300px;
        padding: 18px 20px 20px 20px;
        min-height: 190px;
    }

    .snw-card-header {
        padding-right: 92px;
        min-height: 92px;
    }

    .snw-card-avatar {
        width: 92px;
        height: 92px;
        top: 14px;
        right: 12px;
    }

    .snw-card-name-badge {
        font-size: 14px;
        padding: 8px 14px;
    }

    .snw-card-name {
        max-width: 140px;
    }
}

@media (max-width: 400px) {
    .snw-dog-card {
        width: 270px;
        min-width: 270px;
        padding: 16px 18px 18px 18px;
    }

    .snw-card-header {
        padding-right: 82px;
        min-height: 82px;
    }

    .snw-card-avatar {
        width: 82px;
        height: 82px;
    }
}
