/* ==========================================================================
   Modern Review Reactions & Spoiler Enhancements
   ========================================================================== */

/* 1. Spoiler Checkbox in Comment Form */
.spoiler-check-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #9ca3af;
    user-select: none;
    margin: 0;
    transition: all 0.2s ease;
}
.spoiler-check-pill input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid #4b5563;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    position: relative;
    outline: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.spoiler-check-pill input[type="checkbox"]:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.spoiler-check-pill input[type="checkbox"]:checked {
    background: #e50914;
    border-color: #e50914;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
}
.spoiler-check-pill input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.spoiler-check-pill .spoiler-pill-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.spoiler-check-pill input[type="checkbox"]:checked ~ .spoiler-pill-text {
    color: #fca5a5;
    font-weight: 600;
}

/* 2. Spoiler Blur & Reveal Overlay in Comments */
.spoiler-container {
    position: relative;
    border-radius: 10px;
    margin: 8px 0;
    width: 100%;
}

.spoiler-container.is-spoiler:not(.revealed) {
    user-select: none;
    -webkit-user-select: none;
    min-height: 52px;
}

.spoiler-container .comment-text.spoiler-blur-content {
    font-size: 15px;
    color: #e2e8f0;
    line-height: 1.7;
    margin: 0;
    word-break: break-word;
    transition: filter 0.35s ease, opacity 0.35s ease;
}

.spoiler-container.is-spoiler:not(.revealed) .spoiler-blur-content {
    filter: blur(8px);
    -webkit-filter: blur(8px);
    opacity: 0.16;
    pointer-events: none;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    min-height: 52px;
}

.spoiler-container.revealed .spoiler-blur-content {
    filter: none;
    -webkit-filter: none;
    opacity: 1;
    pointer-events: auto;
    padding: 4px 0;
    background: transparent;
    border: none;
}

/* Modern Spoiler Overlay Bar (Full Width & Aligned) */
.spoiler-container .spoiler-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background: rgba(18, 20, 26, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(229, 9, 20, 0.32);
    border-radius: 10px;
    z-index: 3;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.spoiler-container .spoiler-overlay:hover {
    background: rgba(24, 27, 35, 0.96);
    border-color: rgba(229, 9, 20, 0.6);
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.22);
}

.spoiler-container.revealed .spoiler-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.spoiler-overlay-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.spoiler-overlay-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.spoiler-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.16);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
    transition: transform 0.25s ease, background 0.25s ease;
}

.spoiler-overlay:hover .spoiler-icon-badge {
    transform: scale(1.08);
    background: rgba(229, 9, 20, 0.28);
    color: #ff4d4d;
}

.spoiler-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.spoiler-lead {
    font-size: 13.5px;
    font-weight: 600;
    color: #f3f4f6;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.spoiler-hint {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.3;
}

.spoiler-reveal-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e50914 0%, #b80710 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.spoiler-overlay:hover .spoiler-reveal-chip {
    background: linear-gradient(135deg, #ff1a26 0%, #d40813 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.5);
}

/* Geriye dönük buton uyumluluğu */
.spoiler-reveal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e50914 0%, #b80710 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 3px 12px rgba(229, 9, 20, 0.4);
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.spoiler-reveal-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.55);
}

/* Genel Yorum Metni Tipografisi */
.comment-card .comment-text {
    font-size: 15px !important;
    color: #e2e8f0 !important;
    line-height: 1.7 !important;
    letter-spacing: 0.1px;
}

/* 3. Review Reactions & Actions Bar */
.review-reactions-wrapper {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.review-reactions-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.review-reactions-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Standart Like & Dislike */
.reaction-btn-like,
.reaction-btn-dislike {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #9ca3af;
    padding: 6px 14px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reaction-btn-like i,
.reaction-btn-dislike i {
    font-size: 15px;
}
.reaction-btn-like:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #60a5fa;
    transform: translateY(-1px);
}
.reaction-btn-like.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #60a5fa !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}
.reaction-btn-dislike:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
    transform: translateY(-1px);
}
.reaction-btn-dislike.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #f87171 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.reaction-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 3px;
}

/* 5 Emotion Reactions Bar */
.review-reactions-bar {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(0, 0, 0, 0.32);
    padding: 4px 7px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d1d5db;
    padding: 5px 12px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.reaction-pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.reaction-pill.reacting {
    animation: reaction-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes reaction-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.28); }
    100% { transform: scale(1); }
}

.reaction-pill .reaction-emoji {
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reaction-pill:hover .reaction-emoji {
    transform: scale(1.25);
}

.reaction-pill .reaction-label {
    font-size: 12.5px;
    color: #cbd5e1;
    font-weight: 500;
    transition: color 0.2s ease;
}
.reaction-pill:hover .reaction-label {
    color: #f3f4f6;
}

.reaction-pill .reaction-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    transition: all 0.2s ease;
}
.reaction-pill .reaction-count.has-count {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* Individual Active Emotion Accents */
.reaction-pill-thoughtful.active {
    background: rgba(168, 85, 247, 0.2) !important;
    border-color: #a855f7 !important;
    color: #c084fc !important;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}
.reaction-pill-thoughtful.active .reaction-label,
.reaction-pill-thoughtful.active .reaction-count {
    color: #e9d5ff;
}

.reaction-pill-crying.active {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}
.reaction-pill-crying.active .reaction-label,
.reaction-pill-crying.active .reaction-count {
    color: #dbeafe;
}

.reaction-pill-mindblown.active {
    background: rgba(249, 115, 22, 0.2) !important;
    border-color: #f97316 !important;
    color: #fb923c !important;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}
.reaction-pill-mindblown.active .reaction-label,
.reaction-pill-mindblown.active .reaction-count {
    color: #ffedd5;
}

.reaction-pill-tense.active {
    background: rgba(234, 179, 8, 0.2) !important;
    border-color: #eab308 !important;
    color: #facc15 !important;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
}
.reaction-pill-tense.active .reaction-label,
.reaction-pill-tense.active .reaction-count {
    color: #fef9c3;
}

.reaction-pill-funny.active {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}
.reaction-pill-funny.active .reaction-label,
.reaction-pill-funny.active .reaction-count {
    color: #d1fae5;
}

/* Emoji Picker & Form Elements */
.comment-emoji-item {
    font-size: 24px !important;
    height: 40px !important;
}
.comment-emoji-btn {
    font-size: 13px !important;
    padding: 7px 14px !important;
}
.comment-emoji-btn i {
    font-size: 16px !important;
}

/* Right-side buttons */
.reply-btn-sm {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}
.reply-btn-sm:hover {
    color: #ffffff;
}
.report-spoiler-btn {
    background: none;
    border: none;
    color: #f59e0b;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}
.report-spoiler-btn:hover {
    color: #fbbf24;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .reaction-pill .reaction-label {
        display: none;
    }
    .reaction-pill {
        padding: 5px 10px;
        gap: 5px;
    }
    .reaction-pill .reaction-emoji {
        font-size: 18.5px;
    }
    .review-reactions-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .review-reactions-right {
        width: 100%;
        justify-content: flex-end;
    }
}
