/* ==========================================================================
   Ercan Reactions - Ana Konteyner ve Başlık
   ========================================================================== */

div.ercan-reactions {
    margin: 40px auto;
    max-width: 450px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color-scheme: light dark;
}

div.ercan-reactions-header {
    text-align: center;
    margin-bottom: 25px;
}

div.ercan-reactions-header h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    text-align: center;
}

/* YENİ: Toplam Tepki Sayısı Stili */
p.total-reactions-count {
    font-size: 16px;
    font-weight: 600;
    color: #50575e;
    margin: 10px auto 0 auto;
    padding: 5px 15px;
    border-radius: 20px;
    background-color: rgba(128, 128, 128, 0.1);
    display: table; /* İçeriği kadar yer kaplamasını ve ortalanmasını sağlar */
}


/* ==========================================================================
   Tepki Izgarası ve Öğeleri
   ========================================================================== */

div.reactions-grid {
    /* GÜNCELLENDİ: 3x2'lik sabit ve güçlü bir ızgara yapısı */
    display: grid !important; /* Temanın ezmesini engelle */
    grid-template-columns: repeat(3, 1fr) !important; /* Her zaman 3 sütun */
    gap: 30px 20px;
    width: 100%;
}

a.reaction-item {
    position: relative;
    display: flex !important; /* Temanın ezmesini engelle */
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-emoji, .reaction-emoji-img {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 12px;
    transition: transform 0.2s ease-in-out;
    width: 56px;
    height: 56px;
    object-fit: contain; 
}

/* ==========================================================================
   Sayı Balonu
   ========================================================================== */

.reaction-count {
    position: absolute;
    top: -10px;
    right: 50%;
    transform: translateX(calc(100% + 15px));
    background-color: #007cba;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0 8px;
    border-radius: 12px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    pointer-events: none;
}

/* ==========================================================================
   Etiketler ve Hover/Aktif Efektleri
   ========================================================================== */

.reaction-label {
    font-size: 14px;
    color: #444;
    font-weight: 500;
    transition: color 0.2s ease;
}

.reaction-item:hover {
    transform: translateY(-5px);
}

.reaction-item:hover .reaction-emoji,
.reaction-item:hover .reaction-emoji-img {
    transform: scale(1.18);
}

.reaction-item:hover .reaction-label {
    color: #007cba;
}

.reaction-item.active {
    transform: translateY(-5px);
}

.reaction-item.active .reaction-emoji,
.reaction-item.active .reaction-emoji-img {
    transform: scale(1.2);
}

.reaction-item.active .reaction-label {
    color: #007cba;
    font-weight: 700;
}

.reaction-item.active .reaction-count {
    background-color: #2271b1;
}

/* ==========================================================================
   Karanlık Mod Desteği
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .ercan-reactions-header h2 { color: #f0f0f1; }
    .total-reactions-count {
        color: #a7aaad;
        background-color: rgba(167, 170, 173, 0.1);
        text-shadow: 0 0 5px rgba(121, 200, 255, 0.5); /* Neon efekti */
    }
    .reaction-label { color: #a7aaad; }
    .reaction-item:hover .reaction-label,
    .reaction-item.active .reaction-label {
        color: #79c8ff;
    }
    .reaction-count {
        border-color: #2c3338;
    }
    .reaction-item.active .reaction-count {
        background-color: #79c8ff;
        color: #1d2327;
        border-color: #2c3338;
    }
}

/* ==========================================================================
   Mobil Cihazlar İçin Optimizasyon
   ========================================================================== */

@media (max-width: 480px) {
    .reactions-grid {
        gap: 25px 15px;
    }
    .reaction-emoji, .reaction-emoji-img {
        font-size: 48px;
        width: 48px;
        height: 48px;
    }
    .reaction-label {
        font-size: 13px;
    }
    .reaction-count {
        font-size: 13px;
        line-height: 22px;
        height: 22px;
        min-width: 22px;
        transform: translateX(calc(100% + 10px));
    }
}
