/* Slot detail — player reviews ("Comments") section.
   Ported from the vgcs-* mockup, minus the verified badge / like / reply / report
   (out of scope: no backend), plus status pill, "Your Review" card and inline edit. */

.vgcs-comments-section {
    margin: 40px 0;
}

/* ---- Header ---- */
.vgcs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    gap: 16px;
    flex-wrap: wrap;
}

.vgcs-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #281e32;
    margin: 0;
}

.vgcs-title svg {
    color: #fe5001;
}

.vgcs-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 10px;
    background: linear-gradient(135deg, #fe5001, #ff8c3a);
    color: white;
    font-size: 14px;
    font-weight: 700;
    border-radius: 14px;
}

.vgcs-sort {
    display: flex;
    gap: 8px;
}

.vgcs-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.vgcs-sort-btn:hover {
    background: white;
    border-color: #fe5001;
    color: #fe5001;
}

.vgcs-sort-btn.vgcs-sort-active {
    background: linear-gradient(135deg, #fe5001, #ff8c3a);
    border-color: #fe5001;
    color: white;
}

/* ---- Add-comment form ---- */
.vgcs-add-comment {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.vgcs-avatar-placeholder {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

/* Authenticated avatar sits where the placeholder would; keep it from shrinking. */
.vgcs-add-comment > .vg-avatar {
    flex-shrink: 0;
}

.vgcs-form-wrapper {
    flex: 1;
    min-width: 0;
}

.vgcs-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
}

.vgcs-textarea:focus {
    outline: none;
    border-color: #fe5001;
    box-shadow: 0 0 0 3px rgba(254, 80, 1, 0.1);
}

.vgcs-textarea::placeholder {
    color: #999;
}

.vgcs-form-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #999;
}

.vgcs-error {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
}

.vgcs-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.vgcs-rating-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vgcs-rating-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.vgcs-stars {
    display: flex;
    gap: 6px;
}

/* --- The star selector is the section's signature moment: big, tactile, alive. --- */
.vgcs-star {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #d7d7dd;
    line-height: 0;
    transform-origin: center;
    transition: color 0.18s ease,
                transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.18s ease;
}

.vgcs-star svg {
    width: 30px;
    height: 30px;
    display: block;
}

/* Lit stars (JS lights 1..N on hover / selection) — warm gold with a soft glow + spring. */
.vgcs-star.vgcs-star-active {
    color: #ffb400;
    transform: scale(1.12);
    filter: drop-shadow(0 3px 8px rgba(255, 165, 0, 0.45));
}

/* Radial burst that fires once when a star is clicked. */
.vgcs-star::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 180, 0, 0.55) 0%, rgba(255, 180, 0, 0) 65%);
    opacity: 0;
    transform: scale(0.4);
    pointer-events: none;
}

.vgcs-star-pop {
    animation: vgcs-star-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vgcs-star-pop::after {
    animation: vgcs-star-burst 0.5s ease-out;
}

@keyframes vgcs-star-pop {
    0%   { transform: scale(1.12); }
    40%  { transform: scale(1.42) rotate(-6deg); }
    70%  { transform: scale(1.02) rotate(3deg); }
    100% { transform: scale(1.12) rotate(0); }
}

@keyframes vgcs-star-burst {
    0%   { opacity: 0.6; transform: scale(0.4); }
    100% { opacity: 0; transform: scale(2.4); }
}

/* Live rating word (Poor → Excellent) — slides in beside the stars; doubles as guidance. */
.vgcs-rating-word {
    font-size: 13px;
    font-weight: 700;
    color: #fe5001;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-width: 64px;
}

.vgcs-rating-word.vgcs-rating-word-on {
    opacity: 1;
    transform: translateX(0);
}

.vgcs-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #fe5001, #ff8c3a);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.vgcs-submit-btn:hover {
    box-shadow: 0 4px 12px rgba(254, 80, 1, 0.4);
    transform: translateY(-2px);
}

.vgcs-submit-btn svg {
    transition: transform 0.2s ease;
}

.vgcs-submit-btn:hover svg {
    transform: translateX(3px);
}

.vgcs-submit-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.vgcs-turnstile {
    margin-top: 14px;
}

/* ---- "Your Review" card + inline edit ---- */
.vgcs-your-review {
    margin-bottom: 32px;
    padding: 20px;
    background: #fff7f2;
    border: 1px solid #ffd9c2;
    border-radius: 12px;
}

.vgcs-your-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.vgcs-your-review-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #fe5001;
}

.vgcs-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
}

.vgcs-status-approved {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

.vgcs-status-pending {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.vgcs-status-rejected {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
}

.vgcs-your-review .vgcs-comment {
    padding: 0;
    background: none;
}

.vgcs-your-review .vgcs-comment:hover {
    background: none;
    box-shadow: none;
}

.vgcs-muted {
    color: #999;
    font-style: italic;
}

.vgcs-edit-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #ffd9c2;
}

.vgcs-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vgcs-cancel-btn {
    padding: 10px 18px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.vgcs-cancel-btn:hover {
    border-color: #fe5001;
    color: #fe5001;
}

/* ---- Comments list ---- */
.vgcs-comments-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.vgcs-comment {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.vgcs-comment:hover {
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Newly appended (load-more) comments rise into place instead of snapping in. */
.vgcs-comment.vgcs-enter {
    animation: vgcs-rise 0.45s ease both;
}

@keyframes vgcs-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vgcs-comment-avatar {
    flex-shrink: 0;
}

/* Applies to both the curated <img> avatar and the initials-chip <span>. */
.vgcs-comment-avatar .vg-avatar {
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.vgcs-comment-content {
    flex: 1;
    min-width: 0;
}

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

.vgcs-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vgcs-username {
    font-size: 15px;
    font-weight: 700;
    color: #281e32;
    margin: 0;
}

.vgcs-comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vgcs-user-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #fbbf24;
}

.vgcs-rating-text {
    margin-left: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #666;
}

.vgcs-timestamp {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.vgcs-comment-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.vgcs-comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.vgcs-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.vgcs-action-btn:hover {
    border-color: #fe5001;
    color: #fe5001;
    background: rgba(254, 80, 1, 0.05);
}

/* ---- Empty state + Load more ---- */
.vgcs-empty {
    color: #666;
    font-size: 14px;
    text-align: center;
    padding: 24px 0;
    margin: 0;
}

.vgcs-load-more {
    margin-top: 32px;
    text-align: center;
}

.vgcs-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.vgcs-load-more-btn:hover {
    border-color: #fe5001;
    color: #fe5001;
    background: rgba(254, 80, 1, 0.05);
    transform: translateY(-2px);
}

/* Toggled by JS — never inline display:none, per project convention. */
.vgcs-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .vgcs-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .vgcs-add-comment {
        padding: 16px;
        gap: 12px;
    }

    /* Let the star selector + rating word wrap instead of overflowing on narrow screens. */
    .vgcs-rating-selector {
        flex-wrap: wrap;
        gap: 8px 10px;
    }

    .vgcs-star svg {
        width: 27px;
        height: 27px;
    }

    .vgcs-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .vgcs-form-actions .vgcs-submit-btn {
        justify-content: center;
    }

    .vgcs-edit-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    /* Drop the avatar so the comment box gets the full width on small phones. */
    .vgcs-add-comment > .vgcs-avatar-placeholder,
    .vgcs-add-comment > .vg-avatar {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vgcs-sort-btn,
    .vgcs-textarea,
    .vgcs-submit-btn,
    .vgcs-submit-btn svg,
    .vgcs-comment,
    .vgcs-comment.vgcs-enter,
    .vgcs-action-btn,
    .vgcs-load-more-btn,
    .vgcs-cancel-btn,
    .vgcs-rating-word,
    .vgcs-star {
        transition: none !important;
        animation: none !important;
    }

    .vgcs-star::after {
        animation: none !important;
    }
}
