/* Sürüm notları zaman tüneli (müşteri alanı ve herkese açık sayfa) */

.crm-changelog-empty {
    padding: 2rem;
    text-align: center;
    color: #64748b;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
}

.crm-changelog-years {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
}

.crm-changelog-year-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    color: #475569;
    background: rgba(148, 163, 184, 0.2);
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.crm-changelog-year-pill:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
    transform: translateY(-1px);
}

.crm-changelog-year-pill.active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.crm-changelog-timeline {
    position: relative;
    padding-left: 1.25rem;
}

.crm-changelog-timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #3b82f6 0%, rgba(59, 130, 246, 0.15) 100%);
}

.crm-changelog-card {
    position: relative;
    margin-bottom: 1.5rem;
    margin-left: 0.5rem;
    padding: 1.35rem 1.5rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
}

.crm-changelog-card::before {
    content: "";
    position: absolute;
    left: -1.35rem;
    top: 1.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* «Daha fazlası» — ek güncelleştirme paketi (örnek görünüme yakın serif + ayırıcı çizgi) */
.crm-changelog-load-more-wrap {
    margin-top: 1.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(148, 163, 184, 0.45);
    text-align: center;
}

.crm-changelog-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.35rem;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    font-weight: 400;
    color: #334155;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.crm-changelog-load-more:hover:not(:disabled) {
    color: #1e3a8a;
}

.crm-changelog-load-more:disabled {
    opacity: 0.72;
    cursor: progress;
}

.crm-changelog-load-more-caret {
    font-size: 0.62rem;
    line-height: 1;
    translate: 0 1px;
}

.crm-changelog-load-more-hint {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: #b91c1c;
    min-height: 1.25em;
}

/* Üst satır: solda tarih + başlık (+ sürüm), sağda rozetler */
.crm-changelog-card-top {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem 1rem;
    margin-bottom: 0.55rem;
}

/* Tarih ile başlık aynı satırda (dar ekranda kayar) */
.crm-changelog-card-datetitle {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.crm-changelog-card-datetitle-sep {
    color: #94a3b8;
    flex-shrink: 0;
    user-select: none;
}

.crm-changelog-card-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0;
}

.crm-changelog-card-datetitle .crm-changelog-card-meta {
    flex-shrink: 0;
}

.crm-changelog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0;
    line-height: 1.35;
}

.crm-changelog-card-datetitle .crm-changelog-card-title {
    flex: 1 1 12rem;
    min-width: 0;
}

.crm-changelog-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0;
    flex: 0 1 auto;
    justify-content: flex-end;
    max-width: min(46%, 26rem);
}

.crm-changelog-badges .crm-badge {
    max-width: 100%;
}

.crm-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    text-transform: uppercase;
}

/* Platform renkleri (PlatformType enum ile uyumlu sınıf adları) */
.crm-badge-platform.sddop {
    background: #dbeafe;
    color: #1e40af;
}

.crm-badge-platform.onlinebilgisistemi {
    background: #e0f2fe;
    color: #0369a1;
}

.crm-badge-platform.mobiluygulama {
    background: #dcfce7;
    color: #166534;
}

.crm-badge-platform.onkayitsistemi {
    background: #fef3c7;
    color: #92400e;
}

.crm-badge-platform.bursluluksistemi {
    background: #ede9fe;
    color: #5b21b6;
}

.crm-badge-platform.yayinevisinavdegerlendirmesistemi {
    background: #fee2e2;
    color: #991b1b;
}

.crm-badge-platform.tercihsistemi {
    background: #f1f5f9;
    color: #334155;
}

.crm-badge-platform.dersdagitimuygulamasi {
    background: #cffafe;
    color: #0e7490;
}

/* Güncelleme tipi renkleri */
.crm-badge-type.feature {
    background: #d1fae5;
    color: #065f46;
}

.crm-badge-type.bugfix {
    background: #fee2e2;
    color: #991b1b;
}

.crm-badge-type.enhancement {
    background: #e0e7ff;
    color: #3730a3;
}

.crm-badge-type.performance {
    background: #ffedd5;
    color: #9a3412;
}

.crm-changelog-version {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    background: rgba(100, 116, 139, 0.12);
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

/* Üst satırda başlıktan sonra gösterilen sürüm etiketi */
.crm-changelog-version--inline {
    margin-bottom: 0;
    flex-shrink: 0;
}

.crm-changelog-body {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #334155;
}

.crm-changelog-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.crm-changelog-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2563eb;
    text-decoration: none;
}

.crm-changelog-doc-link:hover {
    text-decoration: underline;
}

.crm-changelog-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}

.crm-changelog-gallery-thumb {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: transparent;
    color: inherit;
}

.crm-changelog-gallery-thumb:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.crm-changelog-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.crm-changelog-gallery-thumb:hover img {
    transform: scale(1.04);
}

/* Tam ekran görsel modalı (Bootstrap bağımlılığı yok) */
.crm-changelog-image-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.crm-changelog-image-modal.crm-changelog-image-modal--open {
    display: flex;
}

.crm-changelog-image-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    cursor: pointer;
}

.crm-changelog-image-modal__panel {
    position: relative;
    z-index: 1;
    max-width: min(96vw, 1120px);
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.crm-changelog-image-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    flex-shrink: 0;
}

.crm-changelog-image-modal__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
}

.crm-changelog-image-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.crm-changelog-image-modal__close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.crm-changelog-image-modal__body {
    padding: 0.75rem;
    overflow: auto;
    text-align: center;
    flex: 1;
    min-height: 0;
}

.crm-changelog-image-modal__body img {
    max-width: 100%;
    max-height: calc(90vh - 4.5rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* Herkese açık sayfa arka plan uyumu */
.crm-changelog-page--public {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Herkese açık sayfada yıl seçimi: mavi gradient görünür kalır; seçili olmayan pill’ler beyaza yakın zeminle okunaklı */
.crm-changelog-page--public .crm-changelog-years {
    gap: 0.5rem;
}

.crm-changelog-page--public .crm-changelog-year-pill:not(.active) {
    color: #172554;
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.14);
}

.crm-changelog-page--public .crm-changelog-year-pill:not(.active):hover {
    color: #1d4ed8;
    background: #ffffff;
    border-color: rgba(191, 219, 254, 1);
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.28);
}

.crm-changelog-page--public .crm-changelog-year-pill.active {
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        0 4px 20px rgba(15, 23, 42, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.35);
}

.crm-changelog-page--public .crm-changelog-empty {
    color: #fff;
}

.crm-changelog-page--public .crm-changelog-card {
    background: rgba(255, 255, 255, 0.97);
}

.crm-changelog-public-heading {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.crm-changelog-public-lead {
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.crm-changelog-page--public .crm-changelog-load-more-wrap {
    border-top-color: rgba(255, 255, 255, 0.35);
}

.crm-changelog-page--public .crm-changelog-load-more {
    color: #1e3a5f;
}

.crm-changelog-page--public .crm-changelog-load-more:hover:not(:disabled) {
    color: #172554;
}

/* --- Koyu tema (Sneat: html[data-bs-theme="dark"]) — müşteri kartı içi timeline --- */
[data-bs-theme="dark"] .crm-changelog-empty {
    color: var(--bs-secondary-color, #a7acb2);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--bs-border-color, rgba(255, 255, 255, 0.12));
}

[data-bs-theme="dark"] .crm-changelog-year-pill:not(.active) {
    color: var(--bs-heading-color, #e4e6eb);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--bs-border-color, rgba(255, 255, 255, 0.14));
}

[data-bs-theme="dark"] .crm-changelog-year-pill:not(.active):hover {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(96, 165, 250, 0.45);
}

[data-bs-theme="dark"] .crm-changelog-year-pill.active {
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
}

[data-bs-theme="dark"] .crm-changelog-timeline::before {
    background: linear-gradient(180deg, #60a5fa 0%, rgba(96, 165, 250, 0.12) 100%);
}

[data-bs-theme="dark"] .crm-changelog-card {
    background: var(--bs-card-bg, #2b3344);
    border: 1px solid var(--bs-border-color, rgba(255, 255, 255, 0.12));
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    color: var(--bs-body-color, #cbcbe2);
}

[data-bs-theme="dark"] .crm-changelog-card::before {
    background: var(--bs-card-bg, #2b3344);
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.22);
}

[data-bs-theme="dark"] .crm-changelog-card-meta {
    color: var(--bs-secondary-color, #a7acb2);
}

[data-bs-theme="dark"] .crm-changelog-card-title {
    color: var(--bs-heading-color, #e4e6eb);
}

[data-bs-theme="dark"] .crm-changelog-card-datetitle-sep {
    color: var(--bs-secondary-color, #8890a0);
}

[data-bs-theme="dark"] .crm-changelog-version {
    color: var(--bs-secondary-color, #c9ccd6);
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .crm-changelog-body {
    color: var(--bs-body-color, #cbcbe2);
}

[data-bs-theme="dark"] .crm-changelog-doc-link {
    color: #93c5fd;
}

[data-bs-theme="dark"] .crm-changelog-gallery-thumb {
    border-color: var(--bs-border-color, rgba(255, 255, 255, 0.14));
}

[data-bs-theme="dark"] .crm-changelog-image-modal__panel {
    background: var(--bs-card-bg, #2b3344);
    border: 1px solid var(--bs-border-color, rgba(255, 255, 255, 0.12));
}

[data-bs-theme="dark"] .crm-changelog-image-modal__header {
    border-bottom-color: var(--bs-border-color, rgba(255, 255, 255, 0.12));
}

[data-bs-theme="dark"] .crm-changelog-image-modal__title {
    color: var(--bs-heading-color, #e4e6eb);
}

[data-bs-theme="dark"] .crm-changelog-image-modal__close {
    background: rgba(255, 255, 255, 0.08);
    color: var(--bs-body-color, #cbcbe2);
}

[data-bs-theme="dark"] .crm-changelog-image-modal__close:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #fecaca;
}

/* Rozetler: koyu zeminde pastel yerine daha dengeli kontrast */
[data-bs-theme="dark"] .crm-badge-platform.sddop {
    background: rgba(59, 130, 246, 0.28);
    color: #bfdbfe;
}

[data-bs-theme="dark"] .crm-badge-platform.onlinebilgisistemi {
    background: rgba(14, 165, 233, 0.28);
    color: #bae6fd;
}

[data-bs-theme="dark"] .crm-badge-platform.mobiluygulama {
    background: rgba(34, 197, 94, 0.28);
    color: #bbf7d0;
}

[data-bs-theme="dark"] .crm-badge-platform.onkayitsistemi {
    background: rgba(245, 158, 11, 0.28);
    color: #fde68a;
}

[data-bs-theme="dark"] .crm-badge-platform.bursluluksistemi {
    background: rgba(139, 92, 246, 0.28);
    color: #ddd6fe;
}

[data-bs-theme="dark"] .crm-badge-platform.yayinevisinavdegerlendirmesistemi {
    background: rgba(239, 68, 68, 0.28);
    color: #fecaca;
}

[data-bs-theme="dark"] .crm-badge-platform.tercihsistemi {
    background: rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
}

[data-bs-theme="dark"] .crm-badge-platform.dersdagitimuygulamasi {
    background: rgba(6, 182, 212, 0.28);
    color: #a5f3fc;
}

[data-bs-theme="dark"] .crm-badge-type.feature {
    background: rgba(34, 197, 94, 0.28);
    color: #bbf7d0;
}

[data-bs-theme="dark"] .crm-badge-type.bugfix {
    background: rgba(239, 68, 68, 0.28);
    color: #fecaca;
}

[data-bs-theme="dark"] .crm-badge-type.enhancement {
    background: rgba(99, 102, 241, 0.28);
    color: #c7d2fe;
}

[data-bs-theme="dark"] .crm-badge-type.performance {
    background: rgba(249, 115, 22, 0.28);
    color: #fed7aa;
}

[data-bs-theme="dark"] .crm-changelog-load-more-wrap {
    border-top-color: var(--bs-border-color, rgba(255, 255, 255, 0.14));
}

[data-bs-theme="dark"] .crm-changelog-load-more {
    color: var(--bs-body-color, #cbcbe2);
}

[data-bs-theme="dark"] .crm-changelog-load-more:hover:not(:disabled) {
    color: #93c5fd;
}

[data-bs-theme="dark"] .crm-changelog-load-more-hint {
    color: #fca5a5;
}

/* Herkese açık sayfa + koyu tema */
[data-bs-theme="dark"] .crm-changelog-page--public .crm-changelog-year-pill:not(.active) {
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .crm-changelog-page--public .crm-changelog-year-pill:not(.active):hover {
    color: #fff;
    background: rgba(59, 130, 246, 0.35);
    border-color: rgba(147, 197, 253, 0.6);
}

[data-bs-theme="dark"] .crm-changelog-page--public .crm-changelog-card {
    background: rgba(30, 41, 59, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .crm-changelog-page--public .crm-changelog-card-title {
    color: #f8fafc;
}

[data-bs-theme="dark"] .crm-changelog-page--public .crm-changelog-card-meta,
[data-bs-theme="dark"] .crm-changelog-page--public .crm-changelog-body {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .crm-changelog-page--public .crm-changelog-card-datetitle-sep {
    color: rgba(148, 163, 184, 0.85);
}

[data-bs-theme="dark"] .crm-changelog-page--public .crm-changelog-card::before {
    background: rgba(30, 41, 59, 0.94);
}

@media (max-width: 576px) {
    .crm-changelog-card {
        padding: 1.1rem;
    }

    .crm-changelog-card-top {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-changelog-badges {
        justify-content: flex-end;
        align-self: flex-end;
        max-width: 100%;
    }

    .crm-changelog-card-title {
        font-size: 1.05rem;
    }
}
