/* ============================================================
   Vien Feedback – Statistics Page (Public Shortcode)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.vfbs-wrap {
    font-family: 'Inter', sans-serif;
    color: #111827;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* ── Header ── */
.vfbs-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 32px 0 24px;
    border-bottom: 2px solid #f3f4f6;
    margin-bottom: 28px;
}

.vfbs-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}

.vfbs-header-text h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.3px;
}

.vfbs-header-text p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* ── Summary Cards ── */
.vfbs-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.vfbs-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 20px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .2s;
}

.vfbs-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.vfbs-card-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.vfbs-card-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.vfbs-card.total   .vfbs-card-value { color: #6366f1; }
.vfbs-card.avg     .vfbs-card-value { color: #f59e0b; }
.vfbs-card.five    .vfbs-card-value { color: #10b981; }

/* ── Rating Distribution ── */
.vfbs-distribution {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.vfbs-distribution h3 {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.vfbs-dist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.vfbs-dist-row:last-child { margin-bottom: 0; }

.vfbs-dist-stars {
    width: 36px;
    text-align: right;
    color: #f59e0b;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.vfbs-dist-bar-wrap {
    flex: 1;
    height: 10px;
    background: #f3f4f6;
    border-radius: 99px;
    overflow: hidden;
}

.vfbs-dist-bar {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width .6s ease;
}

.vfbs-dist-count {
    width: 28px;
    text-align: right;
    font-weight: 600;
    color: #374151;
    flex-shrink: 0;
}

/* ── Filter Dropdown ── */
.vfbs-filter-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.vfbs-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.vfbs-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.vfbs-select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 9px 38px 9px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    min-width: 220px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.vfbs-select:hover  { border-color: #a5b4fc; }
.vfbs-select:focus  { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

.vfbs-select-arrow {
    position: absolute;
    right: 12px;
    font-size: 12px;
    color: #6b7280;
    pointer-events: none;
    line-height: 1;
}

/* ── List ── */
.vfbs-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vfbs-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .18s;
    animation: vfbsFadeIn .3s ease both;
}

@keyframes vfbsFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vfbs-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.09);
    transform: translateY(-2px);
}

.vfbs-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.vfbs-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vfbs-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.vfbs-name {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
}

.vfbs-time {
    font-size: 12px;
    color: #9ca3af;
}

.vfbs-stars {
    font-size: 17px;
    color: #f59e0b;
    letter-spacing: 1px;
}

.vfbs-stars .empty { color: #d1d5db; }

.vfbs-message {
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Empty State ── */
.vfbs-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.vfbs-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.vfbs-empty p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* ── Pagination ── */
.vfbs-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.vfbs-pagination a,
.vfbs-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    transition: all .18s;
}

.vfbs-pagination a:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.vfbs-pagination span.current {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .vfbs-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .vfbs-item-header { flex-direction: column; align-items: flex-start; }
    .vfbs-summary { grid-template-columns: repeat(2, 1fr); }
}

/* ── Answers (Q&A) collapsible block ── */
.vfbs-answers {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

/* Summary = clickable toggle */
.vfbs-answers-title {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;          /* Firefox */
    font-size: 12px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: .7px;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    border-radius: 6px;
    transition: color .15s;
}

/* Remove default disclosure triangle */
.vfbs-answers-title::-webkit-details-marker { display: none; }
.vfbs-answers-title::marker               { display: none; }

/* Custom chevron via ::after */
.vfbs-answers-title::after {
    content: '▾';
    font-size: 14px;
    margin-left: auto;
    transition: transform .2s ease;
    color: #a5b4fc;
}

details.vfbs-answers[open] .vfbs-answers-title::after {
    transform: rotate(-180deg);
}

.vfbs-answers-title:hover { color: #4f46e5; }

.vfbs-answers-count {
    font-size: 10px;
    background: #e0e7ff;
    color: #4f46e5;
    border-radius: 99px;
    padding: 1px 7px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.vfbs-answers-list {
    margin: 10px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vfbs-answers-list dt {
    font-size: 11.5px;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 3px;
    line-height: 1.4;
}

.vfbs-answers-list dd {
    margin: 0 0 2px 0;
    font-size: 14px;
    color: #1f2937;
    line-height: 1.7;
    word-break: break-word;
    white-space: pre-wrap;
    background: #f9fafb;
    border-left: 3px solid #e0e7ff;
    border-radius: 0 8px 8px 0;
    padding: 8px 12px;
}
