/* =========================================
   KËRKO TATIMPAGUES
   Vetëm shtesat që nuk i mbulon style.css i temës.
   Gjithçka tjetër (hero, panel, tabela, faqosja, butonat)
   vjen nga klasat ekzistuese të temës.
   ========================================= */


/* =========================================
   FORMULARI
   ========================================= */

.tp-kerko-page .form-label {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

/* Lista zgjedhëse në të njëjtin stil me .form-control të temës */
.tp-kerko-page .form-select {
    height: 36px;
    font-size: 14px;
    border: 1px solid #ce2127;
    border-radius: 6px;
}

.tp-kerko-page .form-control:focus,
.tp-kerko-page .form-select:focus {
    border-color: #ce2127;
    box-shadow: 0 0 0 0.2rem rgba(206, 33, 39, 0.15);
}

.tp-kerko-hint {
    color: #6c757d;
    font-size: 13px;
    margin: 6px 0 0;
}

.tp-kerko-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tp-kerko-actions .btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    font-size: 14px;
    border-radius: 6px;
}


/* =========================================
   NGARKIMI
   ========================================= */

.tp-kerko-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 25px 0 0;
    color: #555;
    font-size: 15px;
}

.tp-kerko-loading[hidden] {
    display: none;
}

.tp-kerko-loading .spinner-border {
    color: #ce2127;
}

.tp-kerko-results[aria-busy="true"] {
    opacity: 0.5;
    transition: opacity 0.15s ease;
}


/* =========================================
   REZULTATET
   ========================================= */

.tp-kerko-results {
    margin-top: 30px;
}

.tp-kerko-results:empty {
    margin-top: 0;
}

.tp-kerko-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.tp-kerko-summary-title {
    margin: 0;
    color: #333;
    font-size: 21px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tp-kerko-range {
    margin: 0 0 15px;
    color: #6c757d;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.tp-kerko-summary + .documents-table-wrapper {
    margin-top: 15px;
}


/* =========================================
   TABELA
   ========================================= */

.tp-kerko-table {
    min-width: 980px;
    /* "separate" që kolona e emrit të mbetet plotësisht e mbuluar kur tabela rrëshqet */
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
}

.tp-kerko-table > :not(caption) > * > * {
    border-style: solid;
    border-color: #dee2e6;
    border-width: 0 1px 1px 0;
}

.tp-kerko-table > thead > tr > th {
    border-color: #ce2127;
    border-top-width: 1px;
}

.tp-kerko-table > :not(caption) > * > :first-child {
    border-left-width: 1px;
}

.tp-kerko-table tbody th,
.tp-kerko-table tbody td {
    vertical-align: middle;
    padding: 10px 8px;
    font-size: 14px;
    line-height: 1.45;
}

.tp-kerko-table .tp-kerko-name {
    min-width: 230px;
    color: #222;
    font-weight: 600;
    background-color: #fff;
}

.tp-kerko-table .tp-kerko-nipt {
    white-space: nowrap;
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
}

.tp-kerko-table .tp-kerko-address {
    min-width: 200px;
}

.tp-kerko-table .tp-kerko-nowrap,
.tp-kerko-table .tp-kerko-date {
    white-space: nowrap;
}

.tp-kerko-table .tp-kerko-date {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.tp-kerko-table .is-empty {
    color: #adb5bd;
    text-align: center;
}

/* Emri mbetet i dukshëm kur tabela rrëshqitet horizontalisht (celular) */
.tp-kerko-table thead th:first-child,
.tp-kerko-table tbody th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 1px 0 0 #dee2e6;
}

.tp-kerko-table thead th:first-child {
    z-index: 2;
    background-color: #ce2127;
}

.tp-kerko-table tbody tr:hover th:first-child {
    background-color: #fdf2f2;
}

.documents-table-wrapper:focus-visible {
    outline: 2px solid #ce2127;
    outline-offset: 3px;
}


/* =========================================
   FAQOSJA
   ========================================= */

.tp-kerko-pagination {
    margin-top: 10px;
}

.tp-kerko-pagination .page-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-color: #e5e5e5;
}

.tp-kerko-pagination .page-link:hover {
    background-color: #fff4f4;
    color: #a91b20;
}

.tp-kerko-pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(206, 33, 39, 0.2);
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 767.98px) {

    .tp-kerko-summary-title {
        font-size: 19px;
    }

    .tp-kerko-actions .btn {
        flex: 1 1 0;
        justify-content: center;
    }

    .tp-kerko-table .tp-kerko-name {
        min-width: 145px;
        max-width: 160px;
    }

    .tp-kerko-table tbody th,
    .tp-kerko-table tbody td {
        font-size: 13px;
    }

    .tp-kerko-pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}


/* =========================================
   ACCESSIBILITY CONTRAST MODE
   ========================================= */

.accessibility__contrast .tp-kerko-table .tp-kerko-name,
.accessibility__contrast .tp-kerko-table tbody tr:hover th:first-child {
    background-color: #282828;
    color: #fff;
}

.accessibility__contrast .tp-kerko-hint,
.accessibility__contrast .tp-kerko-range,
.accessibility__contrast .tp-kerko-summary-title {
    color: #fff;
}
