/*
 * Pencereler (Bootstrap 4.5 .modal) — panelde ve herkese açık kurum sayfalarında ortak görünüm ve davranış.
 *  - Başlık ve alt düğmeler (Vazgeç / Kaydet …) sabit kalır; içerik uzarsa yalnız gövde kendi içinde kayar
 *    (Bootstrap'in .modal-dialog-scrollable davranışı, her pencereye sınıf eklemeden).
 *  - Başlık: belirgin yazı, ince alt çizgi, yuvarlak ve kolay dokunulan kapatma düğmesi.
 *  - Alt kısım: hafif zemin, ince üst çizgi, düğmeler sağda aralıklı; telefonda eşit genişlikte.
 * İçeriği <form class="modal-content"> olan ve formu .modal-content'in içinde duran pencerelerin ikisi de desteklenir.
 * Renkli bilgi pencereleri (.modal-filled) dokunulmadan kalır.
 */

/* ---- sabit başlık/alt, kayan gövde ---- */
.modal-dialog { display: flex; max-height: calc(100% - 1rem); }
.modal-dialog > .modal-content { max-height: calc(100vh - 1rem); overflow: hidden; }
.modal-dialog > .modal-content > form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
.modal-content .modal-header,
.modal-content .modal-footer { flex-shrink: 0; }
.modal-content .modal-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (min-width: 576px) {
    .modal-dialog { max-height: calc(100% - 3.5rem); }
    .modal-dialog > .modal-content { max-height: calc(100vh - 3.5rem); }
}

/* ---- görünüm ---- */
.modal-content:not(.modal-filled) { border: 0; border-radius: .5rem; box-shadow: 0 1rem 3rem rgba(50, 58, 70, .18); }
.modal-content:not(.modal-filled) .modal-header {
    align-items: center; padding: 1rem 1.25rem; background: #fff; border-bottom: 1px solid #eef0f5;
    border-top-left-radius: .5rem; border-top-right-radius: .5rem;
}
.modal-content:not(.modal-filled) .modal-title { margin: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.4; color: #323a46; }
.modal-content:not(.modal-filled) .modal-header .close {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 2.5rem; height: 2.5rem; margin: -.5rem -.5rem -.5rem auto; padding: 0;
    font-size: 1.5rem; font-weight: 400; line-height: 1; color: #6c757d; text-shadow: none; opacity: 1;
    border-radius: 50%; transition: background-color .15s, color .15s;
}
.modal-content:not(.modal-filled) .modal-header .close:hover,
.modal-content:not(.modal-filled) .modal-header .close:focus-visible { background: #f1f3fa; color: #323a46; outline: 0; }
.modal-content:not(.modal-filled) .modal-body { padding: 1.25rem; }
.modal-content:not(.modal-filled) .modal-footer {
    gap: .5rem; padding: .75rem 1.25rem; background: #f8f9fb; border-top: 1px solid #eef0f5;
    border-bottom-left-radius: .5rem; border-bottom-right-radius: .5rem;
}
.modal-content:not(.modal-filled) .modal-footer > * { margin: 0; }

/* telefonda: kenarlardan daha az boşluk, alt düğmeler eşit genişlikte ve rahat dokunulur */
@media (max-width: 575.98px) {
    .modal-dialog { margin: .5rem; }
    .modal-content:not(.modal-filled) .modal-footer { flex-wrap: nowrap; }
    .modal-content:not(.modal-filled) .modal-footer > .btn { flex: 1 1 0; min-height: 2.75rem; }
}
