/* TEGEV duyuru penceresi — site ve yönetim paneli önizlemesi ortak kullanır */
.tg-popup { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; font-family: var(--font, "Plus Jakarta Sans", system-ui, sans-serif); }
.tg-popup[hidden] { display: none; }
.tg-popup__backdrop { position: absolute; inset: 0; background: rgba(8, 28, 53, .55); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; transition: opacity .45s ease; }
.tg-popup__dialog {
    position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 22px;
    box-shadow: 0 40px 80px -30px rgba(8, 28, 53, .6); opacity: 0; transform: translateY(24px) scale(.96);
    transition: opacity .5s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1);
}
.tg-popup.is-open .tg-popup__backdrop { opacity: 1; }
.tg-popup.is-open .tg-popup__dialog { opacity: 1; transform: none; }
.tg-popup.is-closing .tg-popup__backdrop { opacity: 0; }
.tg-popup.is-closing .tg-popup__dialog { opacity: 0; transform: translateY(12px) scale(.98); transition-duration: .3s; }
.tg-popup__close {
    position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    border: 0; background: rgba(255,255,255,.92); color: #0f1d33; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12); transition: transform .3s ease, background .2s;
}
.tg-popup__close:hover { transform: rotate(90deg); background: #fff; }
.tg-popup__media { display: block; background: #f4f8fc; }
.tg-popup__media img { width: 100%; max-height: 340px; object-fit: cover; display: block; }
.tg-popup__body { padding: 26px 28px 28px; position: relative; }
.tg-popup__body h2 { margin: 0 0 10px; font-size: 1.45rem; line-height: 1.25; color: #0f1d33; font-weight: 800; letter-spacing: -.01em; }
.tg-popup__text { color: #2b3a50; font-size: .98rem; line-height: 1.65; }
.tg-popup__text p { margin: 0 0 .8em; }
.tg-popup__text :last-child { margin-bottom: 0; }
.tg-popup__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tg-popup__preview-badge { position: sticky; bottom: 0; padding: 8px 14px; background: #fff8eb; color: #7a5413; font-size: .8rem; font-weight: 600; text-align: center; border-top: 1px solid #f3dfb5; }

/* Yalnızca görsel (afiş) */
.tg-popup--imageonly .tg-popup__dialog { width: min(720px, 100%); background: transparent; box-shadow: none; overflow: visible; }
.tg-popup--imageonly .tg-popup__media { border-radius: 18px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); }
.tg-popup--imageonly .tg-popup__media img { max-height: calc(100vh - 80px); object-fit: contain; background: #fff; }

/* Taziye / anma: sade, siyah-beyaz, sessiz */
.tg-popup--mourning .tg-popup__backdrop { background: rgba(10, 10, 12, .7); }
.tg-popup--mourning .tg-popup__dialog { border-radius: 6px; text-align: center; width: min(500px, 100%); }
.tg-popup--mourning .tg-popup__media img { filter: grayscale(1); max-height: 260px; object-fit: cover; }
.tg-popup--mourning .tg-popup__body { padding: 34px 32px 30px; }
.tg-popup--mourning h2 { font-weight: 600; font-size: 1.3rem; color: #111; }
.tg-popup--mourning .tg-popup__text { color: #444; }
.tg-popup--mourning .tg-popup__actions { justify-content: center; }
.tg-popup--mourning .btn-primary { --bg: #222; --bd: #222; background: #222; border-color: #222; }
.tg-popup--mourning .btn-outline { --fg: #333; --bd: #bbb; color: #333; border-color: #bbb; }
.tg-popup__ribbon { display: block; width: 26px; height: 40px; margin: 0 auto 16px; background: #111; clip-path: polygon(50% 0, 100% 30%, 70% 100%, 50% 70%, 30% 100%, 0 30%); }

@media (prefers-reduced-motion: reduce) { .tg-popup__dialog, .tg-popup__backdrop { transition: none; } }
