/* 假日列表共用樣式 (holiday-table.css) - 用於精簡版與詳細版 */

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* 詳細版需要較寬的容器 */
.container.wide {
  max-width: 1100px;
}

.header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.header h1 {
  font-size: 1.6em;
  font-weight: 600;
}

.header h1 span {
  font-size: 0.6em;
  opacity: 0.8;
  margin-left: 8px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.controls select {
  padding: 10px 16px;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.controls select:hover {
  background: white;
  transform: translateY(-1px);
}

.controls .status {
  font-size: 0.85em;
  opacity: 0.9;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.85em;
  padding: 8px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.2s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.table-container {
  overflow-x: auto;
}

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

th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75em;
  letter-spacing: 0.5px;
  padding: 14px 20px;
  text-align: left;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

td {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

tr:hover {
  background: #f8f9ff;
}

tr:last-child td {
  border-bottom: none;
}

.col-date { width: 140px; }
.col-holiday { width: 70px; }
.col-name { width: 120px; }
.col-category { width: 90px; }

.date-cell {
  font-family: "SF Mono", "Consolas", monospace;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.date-cell .weekday {
  font-size: 0.8em;
  color: #868e96;
  margin-left: 6px;
  font-weight: 400;
}

.name-cell {
  color: #495057;
  word-break: break-word;
}

.holiday-cell {
  text-align: center;
}

.holiday-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.holiday-yes { background: #ffe3e3; color: #c92a2a; }
.holiday-no { background: #d3f9d8; color: #2b8a3e; }

.category-cell {
  color: #495057;
  font-size: 0.9em;
  white-space: nowrap;
}

.desc-cell {
  color: #495057;
  word-break: break-word;
}

.desc-cell .main-desc {
  font-weight: 500;
  margin-bottom: 4px;
}

.desc-cell .sub-desc {
  font-size: 0.85em;
  color: #868e96;
  line-height: 1.4;
}

/* 詳細版的說明樣式 */
.desc-cell.detail {
  color: #868e96;
  font-size: 0.9em;
  line-height: 1.5;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: #868e96;
}

.loading-spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid #e9ecef;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #868e96;
}

.footer {
  padding: 16px 30px;
  background: #f8f9fa;
  text-align: center;
  font-size: 0.8em;
  color: #868e96;
}

@media (max-width: 768px) {
  .header { padding: 20px; }
  .header h1 { font-size: 1.3em; }
  th, td {
    padding: 12px 14px;
    font-size: 0.85em;
  }
  .date-cell .weekday { display: block; margin: 4px 0 0; }
  
  .container.wide { max-width: 100%; }
}
