/**
 * Proje geneli stiller – select yüksekliği input ile aynı
 */
.form-select {
    min-height: calc(1.5em + 0.75rem + 2px);
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

/* Select2: render edilen kutu input ile aynı yükseklikte */
.select2-container--default .select2-selection--single {
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    display: flex;
    align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
    padding: 0;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}

/* Select2: açılan dropdown listedeki seçeneklerin font boyutu – tüm sayfalarda */
.select2-dropdown,
.select2-container--default .select2-results__option,
.select2-container--default .select2-results__options,
.select2-container--bootstrap-5 .select2-dropdown,
.select2-container--bootstrap-5 .select2-results__option,
.select2-container--bootstrap-5 .select2-results__options {
    font-size: 0.75rem !important;
}
.select2-container--default .select2-results__option,
.select2-container--bootstrap-5 .select2-results__option {
    padding: 0.35rem 0.5rem;
}

/* SweetAlert2: Bootstrap'ın * { border-box } kuralı ikon içi span/pseudo ölçülerini bozabilir */
.swal2-icon,
.swal2-icon *,
.swal2-icon *::before,
.swal2-icon *::after {
    box-sizing: content-box !important;
}

/* SweetAlert2: gövde yazı tipi (OK vb. bazı ortamlarda CJK fallback’e düşmesin); Bootstrap ile aynı yığın */
.swal2-popup,
.swal2-popup .swal2-styled {
    font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif) !important;
}

/* SweetAlert2: varsayılan başlık/metin sayfa gövdesine göre abartılı; Bootstrap ~1rem ile hizala */
.swal2-popup {
    font-size: 1rem;
    padding: 1rem 1rem 1.25rem;
}

.swal2-title {
    font-size: 1.0625rem !important;
    font-weight: 600;
    line-height: 1.4;
    padding: 0 0.5rem;
    margin: 0.35em 0 0.5em;
}

.swal2-html-container,
.swal2-content {
    font-size: 0.9375rem !important;
    line-height: 1.45;
}

.swal2-actions {
    margin-top: 0.65rem;
    gap: 0.5rem;
}

.swal2-styled {
    font-size: 0.875rem;
    padding: 0.45em 1.1em;
}

/*
 * SweetAlert2 — koyu tema
 * sweetalert2.all.min.js çalışınca :root değişkenlerini head'e enjekte eder (app.css'ten sonra);
 * :root ile aynı öğede çakışmayı aşmak için html[data-theme="dark"] üzerinden --swal2-* yeniden tanımlanır.
 */
html[data-theme="dark"] {
    --swal2-background: #212529;
    --swal2-color: #e9ecef;
    --swal2-border: 1px solid #343a40;
    --swal2-backdrop: rgba(0, 0, 0, 0.72);
    --swal2-footer-background: #1a1d21;
    --swal2-footer-color: #adb5bd;
    --swal2-footer-border-color: #343a40;
    --swal2-confirm-button-background-color: #4c6ef5;
    --swal2-confirm-button-color: #fff;
    --swal2-cancel-button-background-color: #495057;
    --swal2-cancel-button-color: #f8f9fa;
    --swal2-deny-button-background-color: #c92a2a;
    --swal2-deny-button-color: #fff;
    --swal2-close-button-color: #adb5bd;
    --swal2-validation-message-background: #3d2f32;
    --swal2-validation-message-color: #f1aeb5;
    --swal2-input-background: #2b3035;
    --swal2-input-border: 1px solid #495057;
    --swal2-input-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
    --swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.35);
}

html[data-theme="dark"] .swal2-popup {
    background: #212529 !important;
    color: #e9ecef !important;
    border: 1px solid #343a40 !important;
}
html[data-theme="dark"] .swal2-title {
    color: #f8f9fa !important;
}
html[data-theme="dark"] .swal2-html-container,
html[data-theme="dark"] .swal2-content {
    color: #dee2e6 !important;
}
html[data-theme="dark"] .swal2-close {
    color: #adb5bd !important;
}
html[data-theme="dark"] .swal2-close:hover,
html[data-theme="dark"] .swal2-close:focus {
    color: #f8f9fa !important;
}
html[data-theme="dark"] .swal2-timer-progress-bar {
    background: rgba(255, 255, 255, 0.25) !important;
}
html[data-theme="dark"] .swal2-input,
html[data-theme="dark"] .swal2-textarea,
html[data-theme="dark"] .swal2-select {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #e9ecef !important;
}
html[data-theme="dark"] .swal2-validation-message {
    background: #343a40 !important;
    color: #f8d7da !important;
}
html[data-theme="dark"] .swal2-icon.swal2-question {
    border-color: #6ea8fe !important;
    color: #6ea8fe !important;
}
html[data-theme="dark"] .swal2-icon.swal2-warning {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}
html[data-theme="dark"] .swal2-icon.swal2-success {
    border-color: #51cf66 !important;
    color: #51cf66 !important;
}
html[data-theme="dark"] .swal2-icon.swal2-error {
    border-color: #ff6b6b !important;
    color: #ff6b6b !important;
}

/* İkon boyutu kütüphanenin 5em tasarımına bağlı (X/tik konumları buna göre); küçültme ikonu bozar */

/* Select2 arama kutusu — mobilde native klavye / odak (font ≥16px) */
@media (max-width: 767.98px) {
    .select2-container--open .select2-search__field,
    .select2-search--dropdown .select2-search__field {
        font-size: 16px !important;
        min-height: calc(2.5rem + 2px);
        touch-action: manipulation;
    }

    /* Metin/şifre alanları — iOS zoom engeli ve el terminali native klavye */
    input.form-control:not([readonly]):not(:disabled),
    textarea.form-control:not([readonly]):not(:disabled) {
        font-size: 16px !important;
        touch-action: manipulation;
    }
}
