/* 
 * 診療時間表のリデザイン用CSS
 * 見やすく、画面に収まるコンパクトなデザイン
 */

/* PC/SP切り替え用クラス */
.visible-pc {
  display: block;
}

.visible-sp {
  display: none;
}

/* 診療時間表の新デザイン */
.hours-table.new-design {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 25px;
  border-collapse: separate;
  border-spacing: 2px;
  background-color: transparent;
  table-layout: fixed;
}

.hours-table.new-design th,
.hours-table.new-design td {
  text-align: center;
  vertical-align: middle;
  padding: 12px 5px;
  border: none;
  width: calc(100% / 8);
  background-color: white;
  border-radius: 4px;
}

.hours-table.new-design th {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  padding: 10px 0;
  font-size: 0.9rem;
}

.hours-table.new-design td {
  background-color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.hours-table.new-design td.time-label {
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  background-color: rgba(22, 40, 78, 0.05);
}

.hours-table.new-design .time-detail {
  display: block;
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--light-text);
  margin-top: 4px;
}

.hours-table.new-design .circle {
  color: var(--secondary);
  font-size: 0.9rem;
}

.hours-table.new-design .dash {
  color: #ccc;
  font-weight: bold;
}

/* モバイルレイアウト用スタイル */
.hours-mobile-layout {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.hours-time-block {
  background-color: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.time-header {
  background-color: var(--primary);
  color: white;
  padding: 10px 15px;
  font-weight: 600;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.time-header .time-detail {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: normal;
}

.day-indicators {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
}

.day-item {
  flex: 1;
  min-width: calc(100% / 7);
  text-align: center;
  padding: 5px 2px;
}

.day-label {
  font-size: 0.85rem;
  margin-bottom: 5px;
  color: var(--primary);
  font-weight: 600;
}

.day-status {
  font-size: 0.9rem;
}

/* テーブルコンテナの調整 */
.hours-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 25px;
  width: 100%;
  border-radius: var(--radius);
  padding: 15px;
  background-color: rgba(22, 40, 78, 0.02);
}

/* 小型時間表のリデザイン（トップセクション用） */
.mini-hours-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  background-color: rgba(22, 40, 78, 0.03);
  border-radius: 8px;
  padding: 8px;
  overflow: hidden;
  margin-top: 10px;
}

.mini-hours-table th,
.mini-hours-table td {
  text-align: center;
  padding: 5px 3px;
  font-size: 0.8rem;
}

.mini-hours-table th {
  background-color: var(--primary);
  color: white;
  border-radius: 3px;
  font-weight: normal;
}

.mini-hours-table .time-row {
  font-size: 0.75rem;
  color: var(--light-text);
}

.mini-hours-table .circle {
  color: var(--secondary);
  font-size: 0.7rem;
}

.mini-hours-table .dash {
  color: #ccc;
}

/* モバイル用ミニレイアウト */
.mini-hours-mobile {
  background-color: rgba(22, 40, 78, 0.03);
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
}

.mini-hours-time {
  text-align: center;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.mini-day-dots {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.mini-day-label {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}

.mini-day-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ddd;
}

.mini-day-dot.active {
  background-color: var(--secondary);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  /* PC/SP切り替え */
  .visible-pc {
    display: none;
  }
  
  .visible-sp {
    display: block;
  }
  
  /* モバイルレイアウト調整 */
  .hours-mobile-layout {
    gap: 10px;
  }
  
  .time-header {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  
  .time-header .time-detail {
    font-size: 0.8rem;
  }
  
  .day-indicators {
    padding: 8px 5px;
  }
  
  .day-item {
    padding: 4px 1px;
  }
  
  .day-label {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }
  
  .day-status {
    font-size: 0.85rem;
  }
  
  /* ミニテーブルのモバイル対応強化 */
  .mini-hours-table {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .mini-hours-table thead,
  .mini-hours-table tbody {
    display: block;
    width: 100%;
  }
  
  .mini-hours-table tr {
    display: flex;
    width: 100%;
  }
  
  .mini-hours-table th,
  .mini-hours-table td {
    flex: 1;
    min-width: auto;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  .mini-hours-table .time-row {
    flex-direction: column;
    padding: 4px 0;
  }
  
  .mini-hours-table .time-row td {
    font-size: 0.7rem;
    white-space: normal;
    text-align: center;
    padding: 2px 0;
  }
  
  .hours-table-container {
    padding: 10px;
    overflow-x: visible;
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* 超小型画面用の調整 */
  .time-header {
    padding: 8px 5px;
    font-size: 0.85rem;
  }
  
  .time-header .time-detail {
    font-size: 0.75rem;
  }
  
  .day-indicators {
    padding: 5px 2px;
  }
  
  .day-item {
    padding: 3px 1px;
  }
  
  .day-label {
    font-size: 0.75rem;
    margin-bottom: 3px;
  }
  
  .day-status {
    font-size: 0.8rem;
  }
  
  .hours-table-container {
    padding: 8px;
  }
  
  .hours-note {
    font-size: 0.85rem;
  }
  
  .mini-hours-table th,
  .mini-hours-table td {
    font-size: 0.65rem;
    padding: 4px 1px;
  }
}
