/**
 * @preserve
 * © 2025 Narong Sungkhamalai & T-LIVE-Code Channel
 * This file is protected and licensed for use only on T-LIVE-Code Projects.
 * https://www.youtube.com/@t-live-code
 */
body{
   font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
   margin: 0;
   padding: 0;
   background-color: white;
   color:#333;
   -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
   display: flex;
  flex-direction: column;
}
.content {
    flex: 1;
}
.site-footer {
  background: #f0f0f0;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #666;
}
.calendar-page {
  display: flex;
  flex-direction: row;
  width: 210mm;
  height: 280mm;
  padding: 4mm;
  box-sizing: border-box;
  /* Removed `gap` */
}

.left-calendar {
  width: 70%;
  padding-right: 5mm; /* Optional small buffer */
}

.right-holiday {
  width: 30%;
  overflow-y: auto;
  border-left: 1px solid #ccc;
  padding-left: 2mm;
  font-size: 10px;
}

.holiday-table {
  width: 100%;
  border-collapse: collapse;
}

.holiday-table th,
.holiday-table td {
  border: 1px solid #ccc;
  padding: 3px;
  text-align: left;
}

.holiday-table th {
  background-color: #f0f0f0;
  font-weight: bold;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, auto);
  gap: 8px;
}

.calendar-grid .holiday {
  background-color: #ffecec;
  color: #c00;
  position: relative;
  cursor: help;
}
.calendar-month {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.calendar-month h3 {
    background-color: #003366;
  color: white;
  padding: 8px;
  margin: 0;
  font-size: 16px;
  text-align: center;
}
.month-block {
  border: 1px solid #ccc;
  padding: 5px;
  font-size: 10px;

  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  /*overflow: hidden;*/
  display: flex;
  flex-direction: column;
}



.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.mini-calendar div {
  padding: 2px;
  /*border: 1px solid #eee;*/
}

.holiday-item {
  position: relative;
  padding: 6px 10px;
  /*margin: 5px 0;*/
  background-color: #fa684f91;
  border-left: 5px solid #dd3697;
  cursor: help;
  /*border-radius: 4px;*/
  transition: background 0.2s ease;
}

.holiday-item:hover {
  background-color: #e2edff;
}

.holiday-item:hover::after {
  content: attr(data-description);
  position: absolute;
  left: 105%;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.holiday-item.show-tooltip::after {
  content: attr(data-description);
  position: absolute;
  background: #333;
  color: white;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 999;
  top: -30px;
  left: 0;
}
.day {
  font-size: 12px; /* Increase to 12px or 14px if needed */
}
.holiday-col-d {
  width: 55px;
}



/* Container for UI */
#ui {
  background-color: #f9f9f9;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-family: "Segoe UI", sans-serif;
}

/* Label styling */
#ui label {
  font-weight: 600;
  margin-right: 0.5rem;
  display: block;
  margin-bottom: 6px;
  color: #333;
}

/* Select and Input */
#ui select,
#ui input {
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  min-width: 200px;
  margin-bottom: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#ui select:focus,
#ui input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Modern buttons */
#ui button {
  padding: 10px 18px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 8px;
  color: white;
  transition: background-color 0.3s;
}

/* Generate calendar (default blue) */
#ui button.generate {
  background-color: #007bff;
}
#ui button.generate:hover {
  background-color: #0056b3;
}

/* Print (gray) */
#ui button.print {
  background-color: #6c757d;
}
#ui button.print:hover {
  background-color: #5a6268;
}

/* Export Excel (green) */
#ui button.export {
  background-color: #28a745;
}
#ui button.export:hover {
  background-color: #218838;
}
/** Clear */
#ui button.clear {
  background-color: #a14952;
}
#ui button.clear:hover {
  background-color: #af1827;
}
footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
}
@media print {
  #ui {
    display: none !important;
  }
 
  @page {
    size: A4 portrait;
    margin-top: 1cm;
    margin-left: 0.5cm;
    margin-right: 0.5cm;
    margin-bottom: 1cm;
  }
}