/**
 * El terminali (5 inç / 720×1280) kompakt yoğunluk katmanı.
 * Opt-in: body.hh-compact + kısa ekran (max-width 767.98px and max-height 620px).
 * iframe yüksekliğini ölçer; masaüstü / uzun telefon etkilenmez.
 * .hh-row / .hh-stack: tüm boyutlarda kullanılabilir satır yardımcıları.
 */

/* Etiket solda, alan sağda — tüm ekran boyutları */
.hh-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    min-width: 0;
}

.hh-row > .form-label,
.hh-row > .hh-label {
    flex: 0 0 auto;
    min-width: 4.5rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.hh-row > .form-control,
.hh-row > .form-select,
.hh-row > .input-group,
.hh-row > .hh-field {
    flex: 1 1 auto;
    min-width: 0;
}

.hh-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (max-width: 767.98px) and (max-height: 620px) {
    body.hh-compact .form-label {
        font-size: 0.7rem;
        margin-bottom: 0;
    }

    body.hh-compact .form-control,
    body.hh-compact .form-select {
        font-size: 0.875rem !important;
        min-height: calc(2.25rem + 2px);
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
        line-height: 1.3;
    }

    body.hh-compact .form-control-sm,
    body.hh-compact .form-select-sm {
        min-height: calc(2.25rem + 2px);
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }

    body.hh-compact .card {
        box-shadow: none !important;
        margin-bottom: 0.5rem;
    }

    body.hh-compact .card-body {
        padding: 0.4rem 0.5rem;
    }

    body.hh-compact .nav-tabs .nav-link {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
        line-height: 1.25;
    }

    body.hh-compact .btn {
        font-size: 0.8rem;
        min-height: 36px;
        padding: 0.35rem 0.75rem;
        line-height: 1.25;
    }

    body.hh-compact .btn-sm {
        min-height: 32px;
        padding: 0.25rem 0.55rem;
        font-size: 0.75rem;
    }

    body.hh-compact .hh-row > .form-label,
    body.hh-compact .hh-row > .hh-label {
        min-width: 4.5rem;
        font-size: 0.7rem;
    }

    body.hh-compact .hh-stack {
        gap: 0.35rem;
    }

    body.hh-compact .sticky-action-footer {
        padding: 0.35rem 0.5rem;
        padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
    }

    body.hh-compact .select2-container .select2-selection--single {
        min-height: calc(2.25rem + 2px) !important;
        height: calc(2.25rem + 2px) !important;
    }

    body.hh-compact .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
        font-size: 0.8rem;
        line-height: calc(2.25rem + 2px);
        padding-left: 0.5rem;
    }

    body.hh-compact .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
        height: calc(2.25rem + 2px);
    }
}
