/* ===============================================
 *  Cinema Review System - Front CSS
 *  v1.2 : Modal / 0.1 step star / spoiler flag
 * =============================================== */

/* ---------- Buttons / Triggers ---------- */
.cinema-review-trigger-wrap {
    margin: 24px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    justify-content: center;
}
.cinema-review-btn {
    display: inline-block;
    background: #ff994b;
    color: #fff !important;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: background .15s ease, opacity .15s ease;
}
.cinema-review-btn:hover {background: #fbb37d;}
.cinema-review-btn:focus { outline: 2px solid #ffd2d6; outline-offset: 2px; }
.cinema-review-btn--ghost {
    background: #f3f3f3;
    color: #333;
}
.cinema-review-btn--ghost:hover { background: #e5e5e5; }
.cinema-review-btn--primary { /* ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¨åŒã˜ */ }

.cinema-review-current {
    color: #555;
    font-size: 14px;
}
.cinema-review-current strong { color: #f39c12; }

.cinema-review-flash {
    width: 100%;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid transparent;
}
.cinema-review-flash--success {
    background: #e8f7ee;
    color: #20613b;
    border-color: #b9e1c6;
}
.cinema-review-flash--info {
    background: #eef4fa;
    color: #1f4f7c;
    border-color: #bbd6ee;
}
.cinema-review-flash--error {
    background: #fdecea;
    color: #8b1a16;
    border-color: #f4b6b1;
}

.cinema-review-login-prompt {
    padding: 24px;
    border: 1px dashed #ccc;
    text-align: center;
    background: #ffffff;
    border-radius: 4px;
    margin: 10px;
}
.cinema-review-login-prompt p { margin: 0 0 12px; }


/* ---------- Modal ---------- */
.cinema-review-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.cinema-review-modal[hidden] { display: none; }

.cinema-review-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    animation: cinemaReviewFade .15s ease-out;
}

.cinema-review-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 28px 28px 24px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    animation: cinemaReviewPop .18s ease-out;
}

.cinema-review-modal__close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    border-radius: 50%;
}
.cinema-review-modal__close:hover { background: #f3f3f3; color: #333; }

.cinema-review-modal__title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

body.cinema-review-modal-open { overflow: hidden; }

@keyframes cinemaReviewFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes cinemaReviewPop {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ---------- Form ---------- */
.cinema-review-form {
    display: block;
}
.cinema-review-label {
    display: block;
    font-weight: 600;
    margin: 14px 0 6px;
    color: #333;
    font-size: 14px;
}
.cinema-review-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}
.cinema-review-textarea:focus {
    border-color: #e50914;
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, .12);
}

.cinema-review-spoiler {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    cursor: pointer;
    color: #444;
    font-size: 14px;
}
.cinema-review-spoiler input { transform: translateY(1px); }

.cinema-review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.cinema-review-hint {
    color: #888;
    font-size: 12px;
    margin: 6px 0 0;
}


/* ---------- Stars (Filmarks é¢¨) ---------- */
.cinema-review-stars-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.cinema-review-stars {
    position: relative;
    display: inline-block;
    font-size: 36px;
    line-height: 1;
    letter-spacing: 4px;
    color: #d8d8d8;          /* éžé¸æŠžï¼ˆèƒŒæ™¯ï¼‰ */
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
    white-space: nowrap;
    outline: none;
}
.cinema-review-stars:focus-visible {
    box-shadow: 0 0 0 3px rgba(229, 9, 20, .25);
    border-radius: 4px;
}
.cinema-review-stars.is-invalid {
    animation: cinemaReviewShake .35s ease-in-out;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, .35);
    border-radius: 4px;
}
@keyframes cinemaReviewShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.cinema-review-stars__bg {
    color: #e1e1e1;
}
.cinema-review-stars__fg {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #f5a623;          /* é¸æŠžï¼ˆå‰æ™¯ï¼‰ */
    width: 0%;
    pointer-events: none;
    white-space: nowrap;
}

.cinema-review-score-display {
    font-size: 22px;
    font-weight: 700;
    color: #f5a623;
    min-width: 40px;
}
.cinema-review-score-suffix {
    font-size: 14px;
    color: #888;
}

/* ä¸€è¦§ç”¨ å°ã‚µã‚¤ã‚º */
.cinema-review-stars--small {
    font-size: 18px;
    letter-spacing: 1px;
    cursor: default;
    pointer-events: none;
    vertical-align: middle;
}


/* ---------- Review List ---------- */
.cinema-review-list {
    margin-top: 20px;
}
.cinema-review-list__title {
    font-size: 18px;
    margin: 0 0 12px;
    /* border-bottom: 2px solid #e50914; */
    padding-bottom: 6px;
    display: inline-block;
}
.cinema-review-list__empty {
    color: #888;
    padding: 14px 0;
}

.cinema-review-item {
    border-top: 1px solid #eee;
    padding: 18px 0;
}
.cinema-review-item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 8px;
}
.cinema-review-item__user {
    color: #222;
    font-size: 15px;
}
.cinema-review-item__score {
    color: #f5a623;
    font-weight: 700;
    font-size: 14px;
}
.cinema-review-item__date {
    margin-left: auto;
    color: #999;
    font-size: 12px;
}

.cinema-review-spoiler-badge {
    display: inline-block;
    background: #6ad34814;
    color: #6ad348;
    border: 1px solid #6ad348;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.cinema-review-item__body {
    position: relative;
}
.cinema-review-item__text {
    white-space: pre-wrap;
    margin: 0;
    color: #333;
    line-height: 1.7;
}

.cinema-review-item__body--blurred .cinema-review-item__text {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
    min-height: 3em;
}
.cinema-review-spoiler-toggle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #6ad348;
    color: #6ad348;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    z-index: 1;
}
.cinema-review-spoiler-toggle:hover {background: #6ad34814;}


/* ---------- Mobile ---------- */
@media (max-width: 480px) {
    .cinema-review-modal { padding: 12px; }
    .cinema-review-modal__panel { padding: 20px 18px; }
    .cinema-review-stars { font-size: 30px; letter-spacing: 2px; }
    .cinema-review-score-display { font-size: 18px; }
    .cinema-review-actions { flex-direction: column-reverse; }
    .cinema-review-actions .cinema-review-btn { width: 100%; }
}
