/* =========================================================
   ИЗЧИСТЕН ГРАФИК — ЛЕК ФОН САМО НА ВОДЕЩАТА КОЛОНА (<th>)
   ========================================================= */

table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  background: #ffffff !important;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0 !important;
  font-family: inherit;
}

/* Изчистване на параграфите и забрана за сричкопренасяне навсякъде в таблицата */
table th p,
table td p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.35 !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

/* Хедър (Десктоп) */
table thead th {
  background: #0b2c59 !important;
  color: #ffffff !important;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px !important;
  border: none !important;
}

table thead th:first-child {
  text-align: left !important;
}

table thead th:nth-child(2),
table thead th:last-child {
  text-align: center !important;
  width: 140px;
}

/* Редове (Десктоп) */
table tbody tr {
  border-bottom: 1px solid #eef2f6 !important;
  transition: background-color 0.15s ease;
}

table tbody tr:last-child {
  border-bottom: none !important;
}

table tbody tr:hover {
  background-color: #f8fafc !important;
}

table tbody th,
table tbody td {
  padding: 12px 16px !important;
  border: none !important;
  box-shadow: none !important;
  vertical-align: middle !important;
  background: transparent !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  word-break: normal !important;
}

/* =========================================================
   1. ОБИКНОВЕНА КОМИСИЯ (когато първата клетка е <td>)
   ========================================================= */
table tbody td:first-child {
  text-align: left !important;
  color: #334155 !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
}

table tbody td:first-child p {
  text-align: left !important;
  text-transform: lowercase !important;
}

table tbody td:first-child p::first-letter {
  text-transform: uppercase !important;
}

/* =========================================================
   2. ВОДЕЩА КОМИСИЯ (<th>) — ЛЕК ФОН САМО ВЪРХУ НЕЙНАТА КЛЕТКА
   ========================================================= */
table tbody th:first-child {
  background-color: #f2f7fd !important;
  text-align: left !important;
  color: #0b2c59 !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
}

table tbody th:first-child p {
  text-align: left !important;
  text-transform: lowercase !important;
}

table tbody th:first-child p::first-letter {
  text-transform: uppercase !important;
}

/* Дата и ден (Десктоп) */
table tbody td:nth-child(2) {
  text-align: center !important;
  color: #334155 !important;
  font-size: 0.88rem;
  font-weight: 500;
}

table tbody td:nth-child(2) p:last-child {
  font-size: 0.78rem;
  color: #64748b;
}

/* Час (Десктоп) */
table tbody td:last-child {
  text-align: center !important;
}

table tbody td:last-child p {
  display: inline-block;
  background: #e6effa;
  color: #0b2c59 !important;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 4px 10px !important;
  border-radius: 6px;
}

/* =========================================================
   МОБИЛЕН ИЗГЛЕД (до 720px)
   ========================================================= */
@media screen and (max-width: 720px) {
  table {
    border-radius: 10px;
  }

  table thead {
    display: none;
  }

  table,
  table tbody,
  table tr,
  table th,
  table td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }

  table tbody tr {
    padding: 12px 14px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
  }

  table tbody tr:last-child {
    border-bottom: none !important;
  }

  /* Обикновена комисия на телефон */
  table tbody td:first-child {
    padding: 0 0 6px 0 !important;
    margin: 0 !important;
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
  }

  /* Водеща комисия (<th>) на телефон — лек фон само на нейния блок */
  table tbody th:first-child {
    background-color: #f2f7fd !important;
    padding: 6px 10px !important;
    margin: 0 0 8px 0 !important;
    border-radius: 6px !important;
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
  }

  /* Дата и час на един ред отдолу */
  table tbody td:nth-child(2),
  table tbody td:last-child {
    display: inline-flex !important;
    align-items: center;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.84rem !important;
    text-align: left !important;
  }

  table tbody td:nth-child(2) {
    color: #475569 !important;
    gap: 5px;
    margin-right: 10px !important;
  }

  table tbody td:last-child p {
    font-size: 0.82rem;
    padding: 2px 8px !important;
  }
}
