/* CSS Document */

/* =====================================================
   stránka EVIDENCE (tabulka)
   ===================================================== */

/* SCROLL KONTEJNER POD FILTREM */
.table-wrapper {
    height: 60vh;  /* pevná výška - požadovaná */
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
}

/*  TABULKA  */
.evidence-zvirat-table {
    width: 100%;
    min-width: unset;
    border-collapse: collapse; /* UPRAVA: Excel styl */
    table-layout: fixed;       /* UPRAVA: nutné pro ellipsis */
    font-size: 12px;           /* UPRAVA: menší písmo jako Excel */
}

/*  HLAVIČKA  */
.evidence-zvirat-table th {
    font-weight: 600;
    font-size: 12px;           /* UPRAVA */
    padding: 3px 6px;          /* UPRAVA: menší padding */
    height: 24px;              /* UPRAVA: nízký řádek */
    white-space: nowrap;       /* UPRAVA */
    overflow: hidden;          /* UPRAVA */
    text-overflow: ellipsis;   /* UPRAVA */
}

/*  BUŇKY  */
.evidence-zvirat-table td {
    padding: 2px 6px;          /* UPRAVA: výrazně menší */
    height: 24px;              /* UPRAVA: Excel výška řádku */
    line-height: 1.2;          /* UPRAVA */
    white-space: nowrap;       /* UPRAVA: žádné zalamování */
    overflow: hidden;          /* UPRAVA */
    text-overflow: ellipsis;   /* UPRAVA: … */
    vertical-align: middle;    /* UPRAVA */
    color: #000;              /* skutečná černá */
    font-weight: 400;         /* standardní váha */    
}


/*  ŘÁDKY  */
.evidence-zvirat-table tbody tr td {
    border-bottom: 1px solid #d0d0d0; /* UPRAVA: jemnější linka */
}

.evidence-zvirat-table tbody tr.pes {
    background-color: rgba(255, 255, 255, 0.85);
}

.evidence-zvirat-table tbody tr.kocka {
    background-color: #f0f0f0;
}


/*  STICKY FILTR  */
.evidence-filtr {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    background: #f5f5f5;
    height: 32px;          /* ← KLÍČOVÉ */
    padding: 0 8px;        /* ← žádný padding nahoru/dolů */
    border-bottom: 2px solid #000;
    z-index: 100;
    display: flex;         /* ← rodič řídí výšku */
    align-items: center;    
}

.evidence-filtr form {
    margin: 0;
}

/* flex řádek */
.evidence-filtr .ffiltr {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    margin: 0;
    padding: 0;    
}

/* VŠECHNY OVLÁDACÍ PRVKY STEJNĚ VYSOKÉ */

.evidence-filtr select,
.evidence-filtr input[type="text"],
.evidence-filtr .button-zakladni {
    height: 24px;
    padding: 0 10px;
    box-sizing: border-box;
}

.evidence-filtr input[type="text"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font: inherit;
    line-height: 24px;   /* ← VÝŠKA INPUTU */
    margin: 0;               
}

.evidence-filtr .button-zakladni {
    white-space: nowrap;
}

/* STICKY HEADER TABULKY – DRŽÍ UVNITŘ WRAPPERU */
.evidence-zvirat-table thead th {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 60;
    border-bottom: 2px solid #000000;
}

/*  STICKY LEVÉ SLOUPCE */
.evidence-zvirat-table .col-poradi {
    position: sticky;
    left: 0;
    z-index: 70;
    background: #ffffff;
    border-left: 1px solid #f0f0f0;
    /*border-right: 1px solid #f0f0f0;*/
}

.evidence-zvirat-table .col-jmeno {
    position: sticky;
    left: 45px;
    z-index: 70;
    background: #ffffff;
    border-right: 1px solid #f0f0f0;
}

/*  PRŮNIK HEADER × STICKY SLOUPCE  */
.evidence-zvirat-table thead .col-poradi,
.evidence-zvirat-table thead .col-rok,
.evidence-zvirat-table thead .col-jmeno {
    z-index: 90;
}

/*  STAVY  */
.evidence-zvirat-table td.stav {
    font-weight: 600;
    text-align: center;
    padding: 2px 4px;          
}

.evidence-zvirat-table td.stav-adopt { background-color: #e5e5e5; color: #000; }
.evidence-zvirat-table td.stav-bez-domova { background-color: #ffd6d6; color: #b00000; }
.evidence-zvirat-table td.stav-na-zkousku { background-color: #d9f2d9; color: #1f7a1f; }
.evidence-zvirat-table td.stav-odebran { background-color: #b00000; color: #fff; }
.evidence-zvirat-table td.stav-rezervace { background-color: #e6d9ff; color: #5a2ca0; }
.evidence-zvirat-table td.stav-zemrel { background-color: #4a4a4a; color: #fff; }
.evidence-zvirat-table td.stav-zruseno { background-color: #b00000; color: #fff; }
.evidence-zvirat-table td.stav-prijem { background-color: #ffd6d6; color: #b00000; }
.evidence-zvirat-table td.stav-pomnicek { background-color: #4a4a4a; color: #fff; }
.evidence-zvirat-table td.stav-vyrazen-z-evidence { background-color: #e5e5e5; color: #000; }

/*  ESTETIKA FILTRU  */
.evidence-filtr select,
.evidence-filtr button {
    margin-right: 8px;
}

/*  HLAVIČKA S FILTREM  */
.sort-btn {
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
}

/* ZÁKLADNÍ WRAPPER PRO EVIDENCI (Kopíruje chování inzerce) */


/* KARTA - Identické parametry s inz-card, jen nižší */
.ev-card {
    background: #f7f4ef;  
    border: 1px solid var(--border-card);
    border-radius: 18px; /* místo 8px */
    overflow: hidden;
    width: 300px;  /* pevná šířka */
    height: 235px; /* pevná výška karty */
    display: flex;
    flex-direction: column;

    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform .15s ease, box-shadow .15s ease;
}

.ev-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.ev-body {
    padding: 2px 14px 2px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;

}

.ev-body h3 {
    margin: 0 !important;
    font-size: 18px; 
    line-height: 0.75;  !important;
}

/* Pokud používáte uvnitř <a>, musíme velikost vynutit i tam */
.ev-card .ev-body h3 a {
    font-size: 18px !important;
    line-height: 0.75 !important;
    display: inline-block;
}

/* MOBIL - REAKCE JAKO V INZERCI */
@media (max-width: 700px) {
    .ev-card {
        width: 100%;                     /* karta přes celou šířku */
        max-width: 100%;
        height: auto;                    /* zrušení pevné výšky */
        min-height: unset;
    }
    .ev-text {
        height: auto;                    /* text se může rozvinout */
        overflow: visible;
        margin-bottom: 10px;
    }
}

    
/* =====================================================
   MOBIL 
   ===================================================== */


@media (max-width: 700px) {

    /* === FILTR: musí mít plnou šířku === */
    .evidence-filtr {
        width: 100%;
        max-width: 100%;
        margin: 0 0 16px 0;
        padding: 0;
        position: relative;
        z-index: 2;
        box-sizing: border-box;
        height: auto !important;
        min-height: unset !important;
        overflow: visible !important;        
    }

    /* === FORM: pod sebou === */
    .evidence-filtr .ffiltr {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
    }

    /* === INPUTY / SELECTY / TLAČÍTKA === */
    .evidence-filtr .ffiltr select,
    .evidence-filtr .ffiltr input,
    .evidence-filtr .ffiltr button {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    /* === TABULKA AŽ POD FILTREM === */
    .table-wrapper {
        top: 28px;
    }
    
    
    /* STICKY HEADER TABULKY – POD STICKY FILTREM */
    .evidence-zvirat-table thead th {
        position: sticky;
        background: #ffffff;
        z-index: 80;
        border-bottom: 2px solid #000000;
    }      
             
}