/* 全体のスタイル */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  padding-bottom: 20px;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ヘッダー */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #006e54;
  color: white;
  padding: 10px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin: 0;
  font-size: 24px;
}

nav {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

nav li {
  margin-right: 20px;
  margin-bottom: 5px;
}

nav a {
  color: white;
  font-weight: bold;
}

/* ドロップダウンメニュー */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #005a45;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border-radius: 4px;
  margin-top: 2px;
  padding-top: 3px;
}

.dropdown-menu li {
  margin: 0;
  border-bottom: 1px solid #006e54;
}

.dropdown-menu li:last-child {
  border-bottom: none;
}

.dropdown-menu a {
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  font-weight: normal;
}

.dropdown-menu a:hover {
  background-color: #006e54;
  text-decoration: none;
}

/* ドロップダウンメニューの表示制御を改善 */
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  display: block;
}

/* ドロップダウンとメニューの間の隙間を埋める */
.dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 5px;
  background: transparent;
  z-index: 999;
}

/* メインコンテンツ */
main {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

h1 a {
  color: #eeeeee;
  text-decoration: none;
}

h1 a:hover {
  color: #ffffff;
  text-decoration: none;
}

h2 {
  color: #006e54;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #006e54;
}

h3 {
  color: #006e54;
  margin: 15px 0;
}

/* フォーム */
form {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

/*レスポンシブタブレット以上*/
@media (min-width: 768px) {
  .row-grid-1-1 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .row-grid-1-1-1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .row-grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
  }

  .row-grid-3-1 {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
  }

  .form-group {
    display: grid;
    align-items: center;
    grid-template-columns: 120px 1fr;
    gap: 10px;
  }

  label {
    margin: 0;
    text-align: right;
  }

  label.align-left,
  label.selection-item {
    text-align: left;
  }
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

input.short {
  max-width: 18em;
}

input[type="date"],
input[type="time"] {
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}


input[type="submit"],
input[type="button"],
button,
.button {
  background-color: #006e54;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
}

input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
  background-color: #005a45;
}

.button-secondary {
  background-color: #666;
}

.button-secondary:hover {
  background-color: #555;
}

/* 申請書プリント */
.button-print-application {
  background-color: #782c7f;
}

.button-print-application:hover {
  background-color: #9d50a4;
}

/* 許可書プリント */
.button-print-permit {
  background-color: #6a8922;
}

.button-print-permit:hover {
  background-color: #9fbf54;
}

/* 領収書プリント */
.button-print-receipt {
  background-color: #cd6022;
}

.button-print-receipt:hover {
  background-color: #db8e61;
}


a.large-button {
  padding: 18px 20px;
  font-size: 20px;
  margin: 10px;
  display: inline-block;
  min-width: 200px;
  text-align: center;
}

.large-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

a.button-success {
  background-color: #0260a2;
}

a.button-success:hover {
  background-color: #1989d9;
}

a.button-secondary {
  background-color: #666;
}

a.button-secondary:hover {
  background-color: #908e8e;
}

a.button-small {
  padding: 8px 5px;
  margin: 2px 4px;
  font-size: 12px;
  background-color: #185ee0;
}

a.button-small:hover {
  background-color: #1989d9;
}


.button-danger {
  background-color: #cc0000;
}

.button-danger:hover {
  background-color: #aa0000;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.badge-success {
  background-color: #4caf50;
  color: white;
}

.badge-warning {
  background-color: #ff9800;
  color: white;
}


ol {
  margin-left: 2em;
  margin-bottom: 20px;
}

/* テーブル */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

th,
td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

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

tr:nth-child(even) {
  background-color: #f9f9f9;
}

table .width-min {
  width: 1em;
  white-space: nowrap;
}

table .fee,
.data-table th.fee {
  text-align: right;
}

/* カレンダー */
.calendar {
  margin-bottom: 20px;
}

.calendar table {
  table-layout: fixed;
}

.calendar th {
  text-align: center;
}

.calendar td {
  height: 80px;
  vertical-align: top;
  padding: 5px;
}

.calendar .date {
  font-weight: bold;
  margin-bottom: 5px;
}

.calendar .holiday {
  background-color: #ffeeee;
}

.calendar .today {
  background-color: #ffffcc;
}

.calendar .other-month {
  background-color: #f0f0f0;
  color: #999;
}

/* 予約状態 span */
span.status-temporary,
.status-temporary .status {
  padding: 4px 5px;
  border-radius: 4px;
  background-color: #996600;
  color: #fff;
}

span.status-confirmed,
.status-confirmed .status {
  padding: 4px 5px;
  border-radius: 4px;
  background-color: #0066cc;
  color: #fff;
}

span.status-approved,
.status-approved .status {
  padding: 4px 5px;
  border-radius: 4px;
  background-color: #006600;
  color: #fff;
}

span.status-rejected {
  padding: 4px 5px;
  border-radius: 4px;
  background-color: #5d5d5d;
  color: #fff;
}

span.status-cancelled,
.status-cancelled .status {
  padding: 4px 5px;
  border-radius: 4px;
  background-color: #cc0000;
  color: #fff;
  text-decoration: line-through;
}

/* 予約グリッド */
.reservation-grid {
  display: grid;
  grid-template-columns: 150px repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 20px;
}

.reservation-grid .header {
  background-color: #f0f0f0;
  font-weight: bold;
  padding: 10px;
  text-align: center;
}

.reservation-grid .room {
  background-color: #f0f0f0;
  font-weight: bold;
  padding: 10px;
}

.reservation-grid .cell {
  border: 1px solid #ddd;
  padding: 5px;
  min-height: 40px;
}

.reservation-grid .available {
  background-color: #e6ffe6;
  cursor: pointer;
}

.reservation-grid .unavailable {
  background-color: #ffeeee;
}

/* メッセージ */
.error-messages,
.success-messages {
  margin-bottom: 20px;
  padding: 10px;
  border-radius: 4px;
}

.error-messages {
  background-color: #ffeeee;
  border: 1px solid #ffcccc;
}

.success-messages {
  background-color: #e6ffe6;
  border: 1px solid #ccffcc;
}

.error {
  color: #cc0000;
}

.success {
  color: #006600;
}

/* フッター */
footer {
  text-align: center;
  margin-top: 20px;
  color: #666;
  font-size: 14px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }

  nav li {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .reservation-grid {
    grid-template-columns: 100px repeat(7, 1fr);
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 20px;
  }

  main {
    padding: 10px;
  }

  .reservation-grid {
    grid-template-columns: 80px repeat(7, 1fr);
    font-size: 12px;
  }

  .calendar td {
    height: 60px;
    font-size: 12px;
  }
}

/* チェックボックスグループ */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.checkbox-item {
  display: flex;
  align-items: center;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 5px;
}

/* タブ */
.tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.tab {
  padding: 10px 15px;
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  margin-right: 5px;
}

.tab.active {
  background-color: white;
  border-color: #ddd;
  border-radius: 5px 5px 0 0;
  font-weight: bold;
  color: #006e54;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 検索フォーム */
.search-form {
  /* display: flex; */
  /* gap: 10px; */
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  gap: 10px;
  /* margin-bottom: 20px; */
}

.search-form input[type="text"] {
  flex: 1;
}

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 5px 10px;
  margin: 0 5px;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.pagination a:hover {
  background-color: #f0f0f0;
  text-decoration: none;
}

.pagination .current {
  background-color: #006e54;
  color: white;
  border-color: #006e54;
}

/* ダッシュボード */
.dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.widget {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  background-color: white;
}

.widget h3 {
  margin-top: 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

/* 予約詳細 */
.reservation-details {
  margin-bottom: 20px;
}

.reservation-details dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
}

.reservation-details dt {
  font-weight: bold;
}

/* 印刷用スタイル */
@media print {
  body {
    background-color: white;
  }

  header,
  nav,
  footer,
  .no-print {
    display: none;
  }

  main {
    max-width: 100%;
  }
}

/* 横スクロール可能な予約カレンダー */
.reservation-calendar-container {
  overflow-x: auto;
  margin-bottom: 20px;
}

.reservation-calendar {
  border-collapse: collapse;
  min-width: 100%;
  white-space: nowrap;
}

.reservation-calendar th,
.reservation-calendar td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.reservation-calendar th {
  background-color: #f0f0f0;
  position: sticky;
  top: 0;
}

.reservation-calendar th.room-header {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: #f0f0f0;
}

.reservation-calendar td.room-name {
  position: sticky;
  left: 0;
  background-color: #f0f0f0;
  font-weight: bold;
  z-index: 1;
}

.reservation-calendar .available {
  background-color: #e6ffe6;
}

.reservation-calendar .unavailable {
  background-color: #ffeeee;
}

.reservation-calendar .holiday {
  background-color: #eeeeee;
}

.reservation-calendar .available-mark {
  cursor: pointer;
  color: #006600;
}

/* すでに予約がある */
.reservation-calendar .unavailable-mark {
  color: #cc0000;
  font-size: 1.5em;
}

.reservation-calendar .holiday-mark {
  color: #cc0000;
}

.reservation-calendar th.holiday {
  background-color: #eeeeee;
  color: #cc0000;
}

.reservation-calendar .selected {
  background-color: #b3ffb3;
  border: 2px solid #006600;
}

/* 選択された予約の表示 */
.selected-slots-display {
  margin: 15px 0;
  padding: 10px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.selected-slots-display p {
  margin: 0;
  font-weight: bold;
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 800px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
}

#confirmation-content {
  margin: 20px 0;
  padding: 15px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
}

#confirmation-content dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

#confirmation-content dt {
  font-weight: bold;
}

/* 管理者向け通知 */
.admin-notice {
  background-color: #ffe6cc;
  border: 1px solid #ffcc99;
  border-radius: 4px;
  padding: 10px 15px;
  margin-bottom: 20px;
  color: #cc6600;
  font-weight: bold;
}

.admin-notice p {
  margin: 0;
}

/* 料金通知 */
.fee-notice {
  margin: 15px 0;
  padding: 10px 15px;
  border-radius: 4px;
  font-weight: bold;
}

.fee-notice.free {
  background-color: #e6ffe6;
  border: 1px solid #ccffcc;
  color: #006600;
}

.ac-notice {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  margin: 15px 0;
  padding: 10px 15px;
  border-radius: 4px;
}