/**
 * KS Trustpilot - Frontend Styles v1.0.5
 * @package KS_Trustpilot
 */

/* =============================================
   WRAPPER
============================================= */
.kstp-mount {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    font-family: inherit;
}

.kstp-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 18px 22px;
    color: #856404;
}

/* =============================================
   LOADING
============================================= */
.kstp-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 30px 20px;
    color: #888;
    font-size: 14px;
}

.kstp-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #eee;
    border-top-color: #00b67a;
    border-radius: 50%;
    animation: kstp-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes kstp-spin { to { transform: rotate(360deg); } }

/* =============================================
   HEADER
============================================= */
.kstp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 24px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kstp-tp-wordmark {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.kstp-header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kstp-header-stars .kstp-stars { font-size: 26px; letter-spacing: 2px; }
.kstp-header-meta  { font-size: 14px; color: #444; }
.kstp-header-score { font-size: 20px; font-weight: 700; }
.kstp-header-label,
.kstp-header-count { color: #666; }

.kstp-header-link {
    display: inline-block;
    padding: 8px 16px;
    border: 2px solid;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}
.kstp-header-link:hover { opacity: 0.75; }

/* =============================================
   STARS
============================================= */
.kstp-stars { display: inline-flex; gap: 1px; line-height: 1; }
.kstp-star  { font-size: 18px; line-height: 1; }

/* =============================================
   GRID
============================================= */
.kstp-grid {
    display: grid;
    gap: 16px;
}

/* =============================================
   REVIEW CARD
============================================= */
.kstp-review-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.kstp-review-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.09);
    transform: translateY(-2px);
}

.kstp-card-stars .kstp-stars { font-size: 20px; }

.kstp-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kstp-card-text {
    font-size: 13px;
    color: #555;
    line-height: 1.65;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================
   CARD FOOTER
============================================= */
.kstp-card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f2f2f2;
}

/* Avatar-cirkler skjult */
.kstp-avatar { display: none; }

.kstp-author-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kstp-author-name { font-size: 13px; font-weight: 600; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kstp-review-date { font-size: 11px; color: #aaa; }
.kstp-verified    { font-size: 11px; font-weight: 500; }

/* =============================================
   SLIDER LAYOUT
============================================= */
.kstp-layout-slider .kstp-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.kstp-layout-slider .kstp-grid::-webkit-scrollbar { display: none; }

.kstp-layout-slider .kstp-review-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

/* Pile-knapper — skjult */
.kstp-slider-nav { display: none; }

/* Dot-indikatorer — skjult */
.kstp-dots { display: none; }

/* Attribution — skjult */
.kstp-attribution { display: none; }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 991px) {
    .kstp-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .kstp-header-link { width: 100%; text-align: center; }
    .kstp-layout-slider .kstp-review-card { flex: 0 0 260px; }
}

@media (max-width: 575px) {
    .kstp-header-stars .kstp-stars { font-size: 20px; }
    .kstp-header-score { font-size: 17px; }
    .kstp-tp-wordmark  { font-size: 18px; }
    .kstp-review-card  { padding: 15px; }
    .kstp-layout-slider .kstp-review-card { flex: 0 0 85vw; }
}
