/* ==========================================
   Story Summary Page
   ========================================== */

/* ── Hero ── */
.summary-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.summary-cover {
    width: 320px;
    min-height: 260px;
    flex-shrink: 0;
    overflow: hidden;
    background: #e9ecef;
}

.summary-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.summary-info {
    padding: 2rem 2rem 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-info h1 {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

.summary-author {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

/* ── Published / Draft status tag (above title) ── */
/* Base pill styles + colours are shared in styles/styles.css (.status-tag,
   .status-published, .status-draft); summary only adds flex alignment. */
.summary-info .status-tag { align-self: flex-start; }

.summary-description {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

/* ── Meta chips ── */
.summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.meta-chip {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
}

/* ── Actions ── */
.summary-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

/* Owner/admin + clone buttons grouped to the right; Play stays left */
.summary-actions-right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* ── Social strip ── */
.social-strip {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.social-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.social-count {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
}

.social-sub {
    font-size: 0.85rem;
    color: var(--text-light);
}

.social-divider {
    width: 1px;
    height: 1.8rem;
    background: var(--border);
    flex-shrink: 0;
}

/* Like button inside social strip */
.social-like-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
    transition: color 0.15s;
    font-family: inherit;
}
.social-like-btn:hover { color: #e74c7c; }
.social-like-btn:disabled { opacity: 0.6; cursor: default; }
.social-like-btn .fav-heart-svg {
    fill: none;
    flex-shrink: 0;
    transition: fill 0.15s, stroke 0.15s, color 0.15s;
}
.social-like-btn .social-count { color: inherit; }
.social-like-btn.is-liked {
    color: #e74c7c;
}
.social-like-btn.is-liked .fav-heart-svg {
    fill: #e74c7c;
    stroke: #e74c7c;
}

.social-action-label {
    font-size: 0.9rem;
    color: inherit;
}

/* ── Stars inside social strip — compact "[avg] ★★★☆☆ (count)" ── */
.star-rating-display {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.star-avg {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
}

.star-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

.social-strip .star-widget {
    display: flex;
    align-items: center;
}

.social-strip .star-btn {
    font-size: 1.35rem;
    padding: 0 0.05rem;
}

/* ── Rating block (inside .summary-info) ── */
.summary-rating-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.star-avg-badge {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: 0.4rem;
}

.star-status {
    font-size: 0.85rem;
    color: var(--text-light);
}
.star-status a {
    color: var(--primary);
}

/* Guest stars — no hover effect */
.star-widget-guest .star-btn {
    cursor: default;
}

/* ── Sections ── */
.summary-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
}

.summary-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Star rating widget ── */
.star-widget {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.star-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #d0d0d0;
    transition: color 0.15s, transform 0.1s;
    padding: 0 0.1rem;
    line-height: 1;
}

.star-btn:hover,
.star-btn.star-filled {
    color: #f59e0b;
}

.star-btn:active {
    transform: scale(1.2);
}


/* ── Comment count badge ── */
.comment-count-badge {
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.55rem;
    vertical-align: middle;
}

/* ── Comment form ── */
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.reply-banner {
    font-size: 0.85rem;
    color: var(--text-light);
    background: #f0f4ff;
    border-left: 3px solid var(--primary);
    padding: 0.4rem 0.75rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 0.4rem 0;
}

.reply-banner button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    text-decoration: underline;
}

.comment-form-actions {
    margin-top: 0.6rem;
    display: flex;
    justify-content: flex-end;
}

/* ── Comments list ── */
.no-comments {
    color: var(--text-light);
    font-style: italic;
}

.comment {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.comment:last-child {
    border-bottom: none;
}

.comment-reply {
    margin-left: 2.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--border);
    background: none;
}

.comment-reply:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.comment-meta {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.comment-meta strong {
    font-size: 0.9rem;
    color: var(--text);
}

.comment-time {
    font-size: 0.78rem;
    color: var(--text-light);
}

.comment-text {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.5;
    margin: 0 0 0.4rem;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: inherit;
}

.btn-link:hover {
    color: var(--primary-dark);
}

.replies {
    margin-top: 0.5rem;
}

/* ── Cover zoom button ── */
.cover-zoom-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    overflow: hidden;
}
.cover-zoom-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.cover-zoom-btn:hover img { transform: scale(1.04); }

/* ── Full-size image modal (shared with editor) ── */
.scene-img-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scene-img-modal[hidden] { display: none; }
.scene-img-modal img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    object-fit: contain;
}
.scene-img-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.scene-img-modal-close:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .summary-hero {
        grid-template-columns: 1fr;
    }
    .summary-cover {
        width: 100%;
        height: 220px;
    }
    .summary-info {
        padding: 1.25rem;
    }
    .summary-info h1 {
        font-size: 1.4rem;
    }
    .summary-section {
        padding: 1.25rem;
    }
}
