/* ============================================================
   branike/testimonial — style.css  v1.9.0
   ============================================================ */

/* ── Základné premenné ──────────────────────────────────────── */
.bb-tst {
    /* 🔴 Šírka = contentSize/wideSize VRÁTANE paddingu a rámu. S content-box bol blok o padding+rám širší (zmerané 1440 px: 744 namiesto 680). */
    box-sizing: border-box;
    --bb-tst-accent: var(--bb-primary, #7C3AED);
    --bb-tst-bg:        var(--bb-surface, #ffffff); /* dark-mode: dedí Blocksy palette */
    --bb-tst-color:     var(--bb-text, inherit);
    --bb-tst-radius:    12px;
    --bb-tst-pad:       28px;
    --bb-tst-av-size:   56px;
    --bb-tst-logo-h:    28px;
    --bb-tst-q-size:    64px;
    --bb-tst-q-fsize:   16px;
    --bb-tst-q-fweight: 400;
    --bb-tst-auth-size: 15px;
    --bb-tst-av-ring:   none;

    position:       relative;
    display:        flex;
    flex-direction: column;
    gap:            16px;
    background:     var(--bb-tst-bg);
    color:          var(--bb-tst-color);
    border-radius:  var(--bb-tst-radius);
    padding:        var(--bb-tst-pad);
}

/* ── Tiene ──────────────────────────────────────────────────── */
.bb-tst--shadow-none { box-shadow: none; }
.bb-tst--shadow-sm   { box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.bb-tst--shadow-md   { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.bb-tst--shadow-lg   { box-shadow: 0 8px 32px rgba(0,0,0,.18); }

/* ── Hviezdy ────────────────────────────────────────────────── */
.bb-tst__rating {
    display:     flex;
    gap:         2px;
    align-items: center;
    line-height: 1;
}

.bb-tst__star {
    display:     inline-flex;
    color:       #D1D5DB;
    font-size:   18px;
    line-height: 1;
    transition:  color .2s, transform .2s;
}

.bb-tst__star--filled {
    color: var(--bb-tst-accent);
}

@media (hover: hover) {
    .bb-tst:hover .bb-tst__star--filled {
        transform: scale(1.15);
    }
}

/* ── Citát ──────────────────────────────────────────────────── */
.bb-tst__quote {
    margin:      0;
    padding:     0;
    font-size:   var(--bb-tst-q-fsize, 16px);
    font-weight: var(--bb-tst-q-fweight, 400);
    line-height: 1.7;
    font-style:  italic;
    color:       var(--bb-tst-color, inherit);
    border:      none;
    quotes:      none;
}

/* ── Footer: avatar + autor + logo ─────────────────────────── */
.bb-tst__footer {
    display:     flex;
    align-items: center;
    gap:         12px;
    margin-top:  4px;
}

.bb-tst__avatar-wrap {
    flex-shrink: 0;
}

.bb-tst__avatar {
    display:       block;
    width:         var(--bb-tst-av-size);
    height:        var(--bb-tst-av-size);
    border-radius: 50%;
    object-fit:    cover;
    flex-shrink:   0;
    outline:       var(--bb-tst-av-ring, none);
    outline-offset: 2px;
}

/* Iniciály namiesto fotky (17. 10. 2026) — prechod z palety, písmo veľkosťou z avatara.
   Písmo = plocha stránky `--bb-surface` (most: Blocksy color-8 → preset base) — 18. 10.: v tmavej palete je accent
   svetlý a biele iniciály mali 2,00 : 1. */
.bb-tst__avatar--initials {
    display:         grid;
    place-items:     center;
    background:      linear-gradient( 135deg, var(--bb-primary, #7C3AED), var(--bb-primary-strong, #5B21B6) );
    color:           var( --bb-surface, #ffffff );
    font-size:       calc( var( --bb-tst-av-size ) * 0.38 );
    font-weight:     700;
    line-height:     1;
    letter-spacing:  0.02em;
    box-shadow:      0 0 0 3px color-mix( in srgb, var(--bb-primary, #7C3AED) 22%, transparent );
    user-select:     none;
}

.bb-tst__author {
    display:        flex;
    flex-direction: column;
    gap:            2px;
    flex:           1;
    min-width:      0;
}

.bb-tst__name {
    font-weight:   700;
    font-size:     var(--bb-tst-auth-size, 15px);
    /* Zalomiť, nie orezať trojbodkou — pri medzerách WCAG 1.4.12 a 320 px zmizla
       časť mena a pozície (zmerané 21. 11. 2026, 5 vzorov). Orezaný text sa nedá prečítať nikde inde. */
    overflow-wrap: anywhere;
}

.bb-tst__title,
.bb-tst__company {
    font-size:     0.82em;
    opacity:       0.7;
    overflow-wrap: anywhere;
}

.bb-tst__logo {
    display:    block;
    height:     var(--bb-tst-logo-h);
    width:      auto;
    max-width:  120px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: auto;
    opacity:     0.8;
    filter:      grayscale(0.3);
    transition:  opacity .2s, filter .2s;
}

.bb-tst:hover .bb-tst__logo {
    opacity: 1;
    filter:  grayscale(0);
}

/* ── Meta (zdroj + dátum) ───────────────────────────────────── */
.bb-tst__meta {
    display:      flex;
    gap:          4px;
    align-items:  center;
    flex-wrap:    nowrap;
    font-size:    0.85em;
    opacity:      0.8;
    overflow:     hidden;
    border-top:   1px solid var(--bb-border, rgba(0,0,0,.08));
    padding-top:  10px;
    margin-top:   4px;
}

.bb-tst__source,
.bb-tst__date {
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
    min-width:     0;
}

.bb-tst__meta-dot {
    flex-shrink: 0;
}

/* ── Vlastné polia ──────────────────────────────────────────── */
.bb-tst__custom-fields {
    display:        flex;
    flex-direction: column;
    gap:            4px;
    margin-top:     4px;
}

.bb-tst__custom-field {
    display:   flex;
    gap:       6px;
    font-size: 0.85em;
}

.bb-tst__cf-label {
    font-weight: 600;
    opacity:     0.7;
}

/* ============================================================
   LAYOUT: card (default)
   ============================================================ */
.bb-tst--card {
    /* štandardný flex-column — všetko je OK */
}

/* ============================================================
   LAYOUT: inline — avatar vľavo, obsah vpravo
   ============================================================ */
.bb-tst--inline {
    flex-direction: row;
    align-items:    flex-start;
    gap:            20px;
}

.bb-tst--inline .bb-tst__content {
    display:        flex;
    flex-direction: column;
    gap:            12px;
    flex:           1;
    min-width:      0;
}

.bb-tst--inline .bb-tst__footer {
    flex-wrap: wrap;
}

/* Mobile — inline sa zloží */
@media (max-width: 560px) {
    .bb-tst--inline {
        flex-direction: column;
    }
}

/* ============================================================
   LAYOUT: quote — veľký citát, bez avatara
   ============================================================ */
.bb-tst--quote {
    text-align: center;
    align-items: center;
}

.bb-tst__quote-icon {
    font-size:   var(--bb-tst-q-size);
    line-height: 0.8;
    color:       var(--bb-tst-accent);
    font-family: Georgia, serif;
    font-style:  normal;
    user-select: none;
    opacity:     0.25;
    transition:  opacity .3s;
}

.bb-tst--quote:hover .bb-tst__quote-icon {
    opacity: 0.45;
}

.bb-tst--quote .bb-tst__quote {
    font-size:   clamp(1.1em, 2.5vw, 1.4em);
    max-width:   640px;
}

.bb-tst--quote .bb-tst__footer {
    justify-content: center;
}

.bb-tst--quote .bb-tst__logo {
    margin-left: 0;
}

/* ── Dekoratívna úvodzovka ──────────────────────────────────── */
.bb-tst__quote-mark {
    display:      inline-block;
    font-family:  Georgia, serif;
    font-size:    1.4em;
    line-height:  0.6;
    vertical-align: -0.15em;
    color:        var(--bb-tst-accent);
    opacity:      0.5;
    margin-right: 3px;
    font-style:   normal;
    user-select:  none;
}

/* ── Meno autora — akcentová farba ─────────────────────────── */
.bb-tst__name--accent {
    color: var(--bb-tst-accent);
}

/* ── Pozícia · Firma — inline ───────────────────────────────── */
.bb-tst__author-meta {
    font-size:   0.82em;
    opacity:     0.7;
    white-space: nowrap;
    overflow:    hidden;
    text-overflow: ellipsis;
}

.bb-tst__author-dot {
    opacity: 0.6;
}

/* ── Entrance animácie ──────────────────────────────────────── */
.bb-tst-anim-ready {
    opacity:    0;
    will-change: opacity, transform;
}

.bb-tst-anim--fade-up.bb-tst-anim-ready    { transform: translateY(32px); }
.bb-tst-anim--fade-in.bb-tst-anim-ready    { transform: none; }
.bb-tst-anim--slide-left.bb-tst-anim-ready { transform: translateX(-40px); }
.bb-tst-anim--slide-right.bb-tst-anim-ready{ transform: translateX(40px); }

.bb-tst-anim-in {
    opacity:   1;
    transform: none !important;
    transition: opacity .55s ease, transform .55s ease;
}

.bb-tst-anim-in[data-bb-delay] {
    transition-delay: calc(var(--bb-delay, 0) * 1ms);
}

/* Reduced-motion / fallback: obsah vždy viditeľný (aj keby JS nezbehol). */
@media (prefers-reduced-motion: reduce) {
    .bb-tst-anim-ready { opacity: 1 !important; transform: none !important; }
}

/* ── Editor helpers ─────────────────────────────────────────── */
.bb-tst-editor-wrap {
    padding: 4px;
    /* 🔴 Bez toho bol blok v editore o 8 px širší ako na webe (zmerané: 688 namiesto 680). */
    box-sizing: border-box;
}

.bb-tst-rating-picker {
    margin-bottom: 16px;
}

.bb-tst-rating-picker__stars {
    display:   flex;
    flex-wrap: wrap;
    gap:       4px;
    margin-top: 6px;
}

.bb-inspector-media-field {
    margin-bottom: 16px;
}

.bb-inspector-media-preview--circle img {
    width:         64px;
    height:        64px;
    border-radius: 50%;
    object-fit:    cover;
    margin-bottom: 8px;
}

.bb-inspector-media-preview--rect img {
    max-height:    40px;
    width:         auto;
    object-fit:    contain;
    margin-bottom: 8px;
}
