﻿/* === TABULKY === */






/* === Jednoduchá tabulka === */


.table-wrap{
  width: 100%;
  border: 1px solid #d9c4b8;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(122,46,0,.05);
}


.ui-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font: inherit;
  background: #ffffff;
  color: #7a2e00;
}


.ui-table th,
.ui-table td{
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: break-word;
}


/* Hlavička */
.ui-table thead th{
  text-align: left;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #7a2e00;
  background: #f9f2ee;
  border-bottom: 1px solid #d0b2a3;
}


/* Buňky */
.ui-table tbody td{
  padding: 16px 18px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  border-bottom: 1px solid #f2e8e2;
  color: #7a2e00;
  background: #ffffff;
}


/* poslední řádek bez linky */
.ui-table tbody tr:last-child td{
  border-bottom: 0;
}


/* první sloupec */
.ui-table tbody td:first-child{
  font-weight: 600;
  color: #7a2e00;
  background: #fdfaf8;
}


/* první sloupec jen na desktopu bez zalamování */
@media (min-width: 768px){
  .ui-table tbody td:first-child{
    white-space: nowrap;
  }
}


/* hover */
.ui-table tbody tr:hover td{
  background: #fcf8f5;
}


.ui-table tbody tr:hover td:first-child{
  background: #fdfaf8;
}


/* === Mobil: 2–3 sloupce zůstávají tabulkou === */
@media (max-width: 767px){
  .table-mobile-table{
    overflow: hidden;
  }


  .table-mobile-table .ui-table{
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }


  .table-mobile-table .ui-table thead th,
  .table-mobile-table .ui-table tbody td{
    padding: 12px 10px;
    font-size: 14px;
    line-height: 1.45;
  }


  .table-mobile-table .ui-table tbody td:first-child{
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
  }
}


/* === Mobil: 4+ sloupců jako kartičky === */
@media (max-width: 767px){
  .table-mobile-cards{
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }


  .table-mobile-cards .ui-table,
  .table-mobile-cards .ui-table thead,
  .table-mobile-cards .ui-table tbody,
  .table-mobile-cards .ui-table tr,
  .table-mobile-cards .ui-table th,
  .table-mobile-cards .ui-table td{
    display: block;
    width: 100%;
  }


  .table-mobile-cards .ui-table{
    min-width: 0;
    table-layout: auto;
    background: transparent;
  }


  .table-mobile-cards .ui-table thead{
    display: none;
  }


  .table-mobile-cards .ui-table tbody tr{
    margin-bottom: 14px;
    border: 1px solid #d9c4b8;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(122,46,0,.05);
  }


  .table-mobile-cards .ui-table tbody td{
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.5;
    border-bottom: 1px solid #f2e8e2;
    background: #ffffff;
    white-space: normal;
  }


  .table-mobile-cards .ui-table tbody tr td:first-child{
    background: #f9f2ee;
    font-weight: 700;
  }


  .table-mobile-cards .ui-table tbody tr td:last-child{
    border-bottom: none;
  }


  .table-mobile-cards .ui-table tbody td::before{
    content: attr(data-label);
    font-weight: 700;
    color: #7a2e00;
    line-height: 1.4;
  }
}