/*  ===== Overlay  =====  */
.sg-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.sg-modal--open .sg-modal { opacity: 1; pointer-events: all; }

/*  ===== Dialog  =====  */
.sg-modal__dialog {
  background: #fff;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/*  ===== Nagłówek / przycisk X  =====  */
.sg-modal__close {
  align-self: flex-end;
  background: transparent;
  border: 0;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: .5rem 1rem 0 0;
}
.sg-modal__title {
  font-weight: 700;
  padding: .5rem 1rem;
}

/*  ===== Treść (scroll)  =====  */
.sg-modal__content {
  padding: 1rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

/*  ===== Prosty spinner  =====  */
.sg-spinner {
  width: 36px;
  height: 36px;
  margin: 3rem auto;
  border: 3px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/*  ===== Blokada body scrolla =====  */
.sg-modal--open {
  overflow: hidden;
  touch-action: none;
}


.table-container {
  width: 100%;
  margin: 16px 0;
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #111111;
}

/* Główna tabela */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

/* Nagłówki */
.schedule-table thead {
  background-color: #fafafa;
}

.schedule-table thead th {
  padding: 10px 12px;
  text-align: center;
  font-weight: 600;
  border-bottom: 1px solid #e5e5e5;
  letter-spacing: 0.02em;
}

/* Wiersze i komórki */
.schedule-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

.schedule-table tbody tr:last-child {
  border-bottom: none;
}

.schedule-table tbody td {
  padding: 8px 10px;
  text-align: center;
}

/* Puste komórki */
.schedule-table tbody td.empty-cell {
  background-color: #fafafa;
  padding: 0;
}

/* Minimalistyczny hover na desktopie */
@media (hover: hover) and (pointer: fine) {
  .schedule-table tbody tr:hover {
    background-color: #f9f9f9;
  }
}

/* --- MOBILE (stacked) --- */
@media (max-width: 600px) {
  .schedule-table {
    border: none;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table tbody tr {
    display: block;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .schedule-table tbody td {
    display: block;
    width: 100%;
    text-align: right;
    padding: 6px 0;
    border: none;
    position: relative;
  }

  .schedule-table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    text-align: left;
    font-weight: 500;
    color: #555555;
  }

  .schedule-table tbody td.empty-cell {
    display: none;
  }
}
