/**
 * Paragraph Statistics Badge Styles
 * Paragraf istatistik badge'lerinin görsel stilleri
 */

.paragraph-stats-badge {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    font-family: "Poppins", "Segoe UI", sans-serif;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5),
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: auto;
    max-width: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;

    /* Positioning - JS'den CSS'e taşındı */
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
}

.paragraph-stats-badge:hover {
    opacity: 1;
    box-shadow: 0 0 4px rgba(33, 53, 94, 0.12),
        0 0 2px rgba(33, 62, 126, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(91, 124, 215, 0.25);
}

.paragraph-stats-badge.stats-hidden {
    display: none;
}

.paragraph-stats-wrapper {
    position: relative;
}

/* Bölümler */
.stats-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stats-section.stats-headings {
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    padding-left: 12px;
    margin-left: 4px;
}

.stats-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.stats-section-title i {
    font-size: 11px;
    color: #ffffff;
    filter: none;
    opacity: 1;
}

/* Ana İstatistik Öğeleri */
.stats-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats-item.stats-main {
    background: linear-gradient(135deg, rgba(184, 197, 224, 0.15) 0%, rgba(168, 184, 216, 0.12) 100%);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    border: 1px solid rgba(184, 197, 224, 0.25);
    backdrop-filter: blur(2px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.stats-item.stats-heading-type {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(184, 197, 224, 0.18) 0%, rgba(168, 184, 216, 0.15) 100%);
    border-radius: 8px;
    font-size: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(184, 197, 224, 0.3);
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stats-item.stats-heading-type .stats-label {
    color: #ffffff;
    text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.4px;
    word-spacing: 0.4px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.stats-item.stats-heading-type:hover {
    background: linear-gradient(135deg, rgba(184, 197, 224, 0.25) 0%, rgba(168, 184, 216, 0.22) 100%);
    border-color: rgba(184, 197, 224, 0.45);
    box-shadow:
        0 4px 12px rgba(184, 197, 224, 0.25),
        0 0 8px rgba(184, 197, 224, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.stats-item i {
    font-size: 12px;
    color: #ffffff;
    filter: none;
    opacity: 1;
}

.stats-label {
    font-weight: 700;
    color: #ffffff;
    opacity: 1;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.stats-label-small {
    font-weight: 600;
    font-size: 9px;
    color: #ffffff;
    opacity: 1;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Kırmızı/Yeşil metinlerinin okunabilirliğini artır (font-size sabit, italic korunur) */
.paragraph-stats-badge .stats-item.stats-heading-type .stats-label,
.paragraph-stats-badge .stats-item.stats-heading-type .stats-label-small {
    font-style: italic;
    letter-spacing: 0.4px;
    word-spacing: 0.4px;
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
    text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.stats-value {
    /* Sabit boyutlar - içerikten bağımsız, tüm sayılar için tutarlı */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 24px;
    min-width: 36px;
    max-width: 36px;
    min-height: 24px;
    max-height: 24px;
    box-sizing: border-box;

    background: linear-gradient(135deg,
            rgba(184, 197, 224, 0.4) 0%,
            rgba(168, 184, 216, 0.32) 50%,
            rgba(184, 197, 224, 0.4) 100%);
    padding: 0;
    border-radius: 14px;
    font-weight: 800;
    font-size: 11px;
    text-align: center;
    color: #ffffff;
    position: relative;
    border: 1.5px solid rgba(184, 197, 224, 0.4);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.05),
        inset 0 -1px 1px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(184, 197, 224, 0.15);
    backdrop-filter: blur(3px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    white-space: nowrap;
}

.stats-value::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg,
            rgba(184, 197, 224, 0.15) 0%,
            rgba(200, 210, 230, 0.2) 50%,
            rgba(184, 197, 224, 0.15) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(2px);
}

.stats-value::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 15px;
    background: linear-gradient(135deg,
            rgba(184, 197, 224, 0.25) 0%,
            rgba(200, 210, 230, 0.3) 50%,
            rgba(184, 197, 224, 0.25) 100%);
    z-index: -2;
    opacity: 0.1;
}

.paragraph-stats-badge:hover .stats-value::before {
    opacity: 0.15;
}

.paragraph-stats-badge:hover .stats-value::after {
    opacity: 0.18;
}

.paragraph-stats-badge:hover .stats-value {
    transform: translateY(-1px);
    border-color: rgba(184, 197, 224, 0.45);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.06),
        inset 0 -1px 1px rgba(0, 0, 0, 0.16),
        0 2px 5px rgba(184, 197, 224, 0.2);
}

.stats-value-small {
    /* Sabit boyutlar - içerikten bağımsız (stats-value ile aynı) */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 24px;
    min-width: 36px;
    max-width: 36px;
    min-height: 24px;
    max-height: 24px;
    box-sizing: border-box;

    background: linear-gradient(135deg,
            rgba(184, 197, 224, 0.4) 0%,
            rgba(168, 184, 216, 0.32) 50%,
            rgba(184, 197, 224, 0.4) 100%);
    padding: 0;
    border-radius: 14px;
    font-weight: 800;
    font-size: 11px;
    text-align: center;
    color: #ffffff;
    position: relative;
    border: 1.5px solid rgba(184, 197, 224, 0.4);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.05),
        inset 0 -1px 1px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(184, 197, 224, 0.15);
    backdrop-filter: blur(3px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    white-space: nowrap;
}

.stats-value-small::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg,
            rgba(184, 197, 224, 0.15) 0%,
            rgba(200, 210, 230, 0.2) 50%,
            rgba(184, 197, 224, 0.15) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(2px);
}

.stats-value-small::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 15px;
    background: linear-gradient(135deg,
            rgba(184, 197, 224, 0.25) 0%,
            rgba(200, 210, 230, 0.3) 50%,
            rgba(184, 197, 224, 0.25) 100%);
    z-index: -2;
    opacity: 0.1;
}

.paragraph-stats-badge:hover .stats-value-small::before {
    opacity: 0.15;
}

.paragraph-stats-badge:hover .stats-value-small::after {
    opacity: 0.18;
}

.paragraph-stats-badge:hover .stats-value-small {
    transform: translateY(-1px);
    border-color: rgba(184, 197, 224, 0.45);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.06),
        inset 0 -1px 1px rgba(0, 0, 0, 0.16),
        0 2px 5px rgba(184, 197, 224, 0.2);
}

/* Başlık Badge'leri - Daha belirgin ve görsel */
.heading-badge {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.paragraph-stats-badge .heading-badge::before,
.paragraph-stats-badge .heading-badge::after {
    content: none !important;
}

/* Başlık Badge Renkleri - Daha canlı ve belirgin */
.heading-badge.badge-icon-red {
    background: linear-gradient(135deg, #ff4d6d 0%, #ff1744 100%);
    box-shadow:
        0 0 12px rgba(255, 71, 102, 0.6),
        0 2px 8px rgba(255, 71, 102, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.heading-badge.badge-icon-green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow:
        0 0 12px rgba(34, 197, 94, 0.6),
        0 2px 8px rgba(34, 197, 94, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.heading-badge.badge-icon-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow:
        0 0 12px rgba(249, 115, 22, 0.6),
        0 2px 8px rgba(249, 115, 22, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.heading-badge.badge-icon-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow:
        0 0 12px rgba(59, 130, 246, 0.6),
        0 2px 8px rgba(59, 130, 246, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.heading-badge.badge-icon-purple {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    box-shadow:
        0 0 12px rgba(168, 85, 247, 0.6),
        0 2px 8px rgba(168, 85, 247, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.heading-badge.badge-icon-yellow {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow:
        0 0 12px rgba(245, 158, 11, 0.6),
        0 2px 8px rgba(245, 158, 11, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.heading-badge.badge-icon-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    box-shadow:
        0 0 12px rgba(6, 182, 212, 0.6),
        0 2px 8px rgba(6, 182, 212, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Hover efektleri */
.stats-item.stats-heading-type:hover .heading-badge {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.stats-item.stats-heading-type:hover .heading-badge.badge-icon-red {
    box-shadow:
        0 0 16px rgba(255, 71, 102, 0.8),
        0 4px 12px rgba(255, 71, 102, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.stats-item.stats-heading-type:hover .heading-badge.badge-icon-green {
    box-shadow:
        0 0 16px rgba(34, 197, 94, 0.8),
        0 4px 12px rgba(34, 197, 94, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.stats-item.stats-heading-type:hover .heading-badge.badge-icon-orange {
    box-shadow:
        0 0 16px rgba(249, 115, 22, 0.8),
        0 4px 12px rgba(249, 115, 22, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.stats-item.stats-heading-type:hover .heading-badge.badge-icon-blue {
    box-shadow:
        0 0 16px rgba(59, 130, 246, 0.8),
        0 4px 12px rgba(59, 130, 246, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.stats-item.stats-heading-type:hover .heading-badge.badge-icon-purple {
    box-shadow:
        0 0 16px rgba(168, 85, 247, 0.8),
        0 4px 12px rgba(168, 85, 247, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.stats-item.stats-heading-type:hover .heading-badge.badge-icon-yellow {
    box-shadow:
        0 0 16px rgba(245, 158, 11, 0.8),
        0 4px 12px rgba(245, 158, 11, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.stats-item.stats-heading-type:hover .heading-badge.badge-icon-cyan {
    box-shadow:
        0 0 16px rgba(6, 182, 212, 0.8),
        0 4px 12px rgba(6, 182, 212, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
}


/* Responsive Design */
@media (max-width: 768px) {

    /* Mobil ve tablet'te badge'i gizle - ekran alanı sınırlı */
    .paragraph-stats-badge {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .paragraph-stats-wrapper {
        /* Badge mobilde gizli olduğu için normal padding */
        padding-top: 0;
        margin-top: 0;
    }
}

@media (max-width: 480px) {

    /* Mobil'de badge zaten gizli (768px media query'den) */
    .paragraph-stats-badge {
        display: none;
    }
}

@media (max-width: 480px) {
    .paragraph-stats-wrapper {
        /* Badge paragrafın üstünde olduğu için padding gerekmez */
        padding-top: 0;
        margin-top: 0;
    }
}

/* Print için gizle */
@media print {
    .paragraph-stats-badge {
        display: none !important;
    }
}

/* Dark Mode Desteği - Zaten koyu tema kullanıyoruz */
@media (prefers-color-scheme: dark) {
    .paragraph-stats-badge {
        background: linear-gradient(135deg, #0d0d1a 0%, #0f1624 50%, #0a1e3c 100%);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7),
            0 1px 3px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
}