﻿/* ==========================================================================
   COMMENTABLE SCENES — Site-Consistent Light Design
   ========================================================================== */

/* ── Container ───────────────────────────────────────────────────────────── */

.cm-scenes-container {
    margin-top: 50px;
    font-family: var(--cm-font-body);
}

/* ── Section Header ──────────────────────────────────────────────────────── */

.cm-scenes-container .sub-section-header {
    margin-top: 0 !important;
}

/* ── Scenes List ─────────────────────────────────────────────────────────── */

.cm-scenes-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.cm-scene-empty {
    text-align: center;
    padding: 28px 20px;
    color: #888;
    font-style: italic;
    font-size: 0.9rem;
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 10px;
}

/* ── Scene Card ──────────────────────────────────────────────────────────── */

.cm-scene-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 20px 22px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cm-scene-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    border-color: #d4d4d4;
}

.cm-scene-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.cm-scene-info { flex: 1; }

.cm-scene-title {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1714;
    font-family: var(--cm-font-body);
    line-height: 1.35;
}

.cm-scene-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
    font-family: var(--cm-font-condensed);
}

.cm-scene-time::before {
    content: '▷';
    font-size: 0.65rem;
    opacity: 0.6;
}

.cm-scene-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Action Buttons (Edit / Delete) ─────────────────────────────────────── */

.cm-scene-btn-action {
    background: transparent;
    border: none;
    font-size: 0.78rem;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    font-family: var(--cm-font-body);
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.cm-scene-btn-action:hover {
    background: #f3f4f6;
    color: #111;
}

.cm-scene-delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ── Reflection Count ────────────────────────────────────────────────────── */

.cm-scene-reflection-count {
    background: #f3f4f6;
    color: #555;
    border: 1px solid #e5e7eb;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 0.77rem;
    font-weight: 600;
    font-family: var(--cm-font-condensed);
    white-space: nowrap;
}

/* ── Scene Description ───────────────────────────────────────────────────── */

.cm-scene-desc {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.65;
    margin-bottom: 0;
}

/* ── Embedded YouTube Video ──────────────────────────────────────────────── */

.cm-scene-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 16px;
    border-radius: 10px;
    background: #111;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.cm-scene-video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 10px;
}

/* ── Reflections Divider ─────────────────────────────────────────────────── */

.cm-scene-reflections-wrap {
    margin-top: 4px;
}

.cm-scene-divider {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: 18px 0;
}

/* ── Reflection Comments ─────────────────────────────────────────────────── */

.cm-scene-comments-list {
    margin-bottom: 18px;
}

.cm-scene-comment {
    margin-bottom: 0;
}

.cm-scene-see-more {
    background: transparent;
    border: none;
    color: #065fd4;
    font-family: var(--cm-font-condensed);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 15px;
}

.cm-scene-see-more:hover {
    text-decoration: underline;
}

/* ── Reply Input Area ────────────────────────────────────────────────────── */

.cm-scene-reply-area {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cm-scene-reply-avatar {
    background: var(--cm-red);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    flex-shrink: 0;
    font-family: var(--cm-font-condensed);
}

.cm-scene-reply-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
    transition: border-color 0.2s;
}

.cm-scene-reply-input:focus-within {
    border-color: #111;
}

.cm-scene-reply-box {
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--cm-font-body);
    font-size: 0.92rem;
    resize: none;
    outline: none;
    min-height: 24px;
    color: #111;
}

.cm-scene-reply-box::placeholder {
    color: #aaa;
}

.cm-scene-btn-submit-reply {
    align-self: flex-end;
    background: #065fd4;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 7px 18px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--cm-font-condensed);
    transition: background 0.2s;
}

.cm-scene-btn-submit-reply:hover {
    background: #0056b3;
}

.cm-scene-login-prompt {
    text-align: center;
    padding: 14px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    font-size: 0.88rem;
    color: #444;
    font-family: var(--cm-font-condensed);
    font-weight: 600;
}

.cm-scene-login-prompt a {
    color: #065fd4;
    font-weight: 700;
    text-decoration: none;
}
.cm-scene-login-prompt a:hover {
    text-decoration: underline;
}

/* ── Add Scene Wrapper ───────────────────────────────────────────────────── */

.cm-add-scene-wrapper {
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 20px 24px;
    text-align: center;
}

.cm-add-scene-wrapper .cm-btn-add-scene {
    background: #f8f8f8 !important;
    color: #111 !important;
    border: 1px solid #eaeaea !important;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    padding: 10px 24px;
    border-radius: 30px;
    font-family: var(--cm-font-body);
    transition: all 0.2s ease;
    display: inline-block;
}

.cm-add-scene-wrapper .cm-btn-add-scene:hover {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}

/* ── Add/Edit Scene Form ─────────────────────────────────────────────────── */

.cm-add-scene-form-wrap {
    text-align: left;
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cm-add-scene-heading {
    margin: 0 0 20px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1714;
    font-family: var(--cm-font-body);
}

.cm-form-row {
    margin-bottom: 12px;
}

.cm-form-row-split {
    display: flex;
    gap: 12px;
}

.cm-form-row input,
.cm-form-row textarea {
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 11px 14px;
    font-family: var(--cm-font-body);
    font-size: 0.92rem;
    color: #111;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cm-form-row input::placeholder,
.cm-form-row textarea::placeholder {
    color: #aaa;
}

.cm-form-row input:focus,
.cm-form-row textarea:focus {
    outline: none;
    border-color: #111;
}

.cm-form-row textarea {
    min-height: 85px;
    resize: none;
}

.cm-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.cm-btn-cancel {
    background: transparent;
    color: #111;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--cm-font-condensed);
    font-size: 0.85rem;
    transition: background 0.15s;
}

.cm-btn-cancel:hover {
    background: #f0f0f0;
}

.cm-btn-submit {
    background: #065fd4;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--cm-font-condensed);
    font-size: 0.85rem;
    transition: background 0.2s;
}

.cm-btn-submit:hover {
    background: #0056b3;
}

.cm-add-scene-login {
    font-size: 0.9rem;
    color: #444;
    font-family: var(--cm-font-condensed);
    font-weight: 600;
}

.cm-add-scene-login a {
    color: #065fd4;
    text-decoration: none;
}

.cm-add-scene-login a:hover {
    text-decoration: underline;
}

/* ── Delete Confirmation Modal ───────────────────────────────────────────── */

.cm-scene-delete-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    animation: cmSceneModalFade 0.18s ease;
}

.cm-scene-delete-overlay.active {
    display: flex;
}

@keyframes cmSceneModalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cm-scene-delete-modal {
    background: #fff;
    width: 90%;
    max-width: 320px;
    border-radius: 12px;
    padding: 28px 24px 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
    font-family: var(--cm-font-body);
    animation: cmSceneModalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cmSceneModalPop {
    from { transform: scale(0.93); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.cm-scene-delete-modal-icon {
    width: 44px; height: 44px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.3rem;
}

.cm-scene-delete-modal-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    text-align: center;
}

.cm-scene-delete-modal-text {
    margin: 0 0 22px;
    font-size: 0.88rem;
    color: #606060;
    line-height: 1.5;
    text-align: center;
}

.cm-scene-delete-modal-actions {
    display: flex;
    gap: 8px;
}

.cm-scene-modal-cancel {
    flex: 1;
    background: #f3f4f6;
    color: #111;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-family: var(--cm-font-condensed);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.cm-scene-modal-cancel:hover { background: #e5e7eb; }

.cm-scene-modal-confirm {
    flex: 1;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-family: var(--cm-font-condensed);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.cm-scene-modal-confirm:hover { background: #b91c1c; }
