
/* =========================
table หลัก
========================= */
.period-table thead {
    background: linear-gradient(to bottom, #ff82c0, #ff4fa8) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600 !important;
}


/* =========================
💡 Cell content
========================= */
.period-table table.dataTable td {
  padding: 6px 2px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #eee;
  font-size: clamp(0.75rem, 1vw, 1rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================
📌 Status Pill
========================= */
.period-table .status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.period-table .status.full { background: #e74c3c; }
.period-table .status.wait { background: #f1c40f; color: #222; }
.period-table .status.ok { background: #2ecc71; }

/* =========================
✨ Hover effect
========================= */
/* .period-table table.dataTable tbody tr:hover {
  background-color: #fce6f3 !important;
} */

/* =========================
📐 Table layout & round corners
========================= */
.period-table table.dataTable {
  width: 100% !important;
  border-radius: 8px;
  overflow: hidden;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  word-wrap: break-word;
  white-space: normal !important;
}

/* =========================
🔎 Alignment helpers
========================= */
.period-table .text-left { text-align: left !important; }
.period-table .text-center { text-align: center !important; }
.period-table .text-right { text-align: right !important; }

/* =========================
💸 Price Styling
========================= */
.period-table .price-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  white-space: nowrap;
}

.period-table .price-normal {
  color: #333;
  font-weight: 600;
}

.period-table .price-original {
  color: #999;
  text-decoration: line-through;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.period-table .price-discount {
  color: #e74c3c;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 2px;
}

.period-table .price-discount small {
  color: #555;
  font-size: 0.8em;
  margin-left: 4px;
}

.period-table td.commission {
  font-size: 0.7rem !important;
  white-space: nowrap;
}
.period-table td.traveldate {
  font-size: 0.8rem !important;
}

/* =========================
📱 Responsive adjustments
========================= */
@media (max-width: 768px) {
  .period-table table.dataTable td,
  .period-table table.dataTable th {
    font-size: 0.9rem;
    padding: 6px;
  }
  .period-table .price-original { font-size: 0.75rem; }
  .period-table .price-discount { font-size: 0.9rem; }
  .period-table .price-normal { font-size: 0.9rem; }
}

/* =========================
🎨 Button Status Styling
========================= */
.period-table .btn-status {
  display: inline-block;
  width: 100%;
  padding: 6px 0;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  cursor: pointer;
  text-align: center;
  transition: 0.2s ease-in-out;
  box-sizing: border-box;
  max-width: 200px;
  text-decoration: none !important;
}

.period-table .btn-status.full { background: #e74c3c; }
.period-table .btn-status.wait { background: #f1c40f; color: #222; }
.period-table .btn-status.ok { background: #2ecc71; }

.period-table .btn-status:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .period-table .btn-status {
    font-size: 0.8rem;
    padding: 4px 0;
  }
}

/* =========================
📦 Cell Stack Layout
========================= */
.period-table .cell-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
}

/* =========================
🏷 Badge Styling
========================= */
.period-table .badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.period-table .badge-red { background: #e74c3c; }
.period-table .badge-red-outline { color: #e74c3c; }
.period-table .badge-blue { background: #3498db; }
.period-table .badge-green { background: #2ecc71; }
.period-table .badge-orange { background: #ff9100ff; }

.period-table .announce {
  margin: 2px;
  color: #ff6600ff;
  font-weight: 600;
}

/* Blinking badge */
.period-table .badge.blink {
  animation: blink 2s infinite ease-in-out;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Badge Group */
.period-table .badge-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  line-height: 1.4;
}

/* Mask */
.period-table .badge-group::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.4em;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 90%);
  pointer-events: none;
}
