/* ローディングスピナー */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  color: #666;
  font-size: 1.1em;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
  padding: 20px;
  max-width: 800px;
}
/* 管理者表示のスタイル */
.admin-notice {
  background-color: #7adba4;
  ;
  color: white;
  padding: 10px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* カレンダーのスタイル */
#reservation-app {
  width: 100%;
  display: none;
}
#reservation-app.is-ready {
  display: block;
}
.calendar-container {
  width: 100%;
  max-width: 900px;
  margin: 20px auto;
  /* padding: 20px; */
  background: #fff;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
  /* box-sizing: border-box; */
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  background: #fff;
  padding: 15px 20px;
  z-index: 1;
  border-bottom: 2px solid #f0f0f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.calendar-header h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin: 0;
  color: #333;
}
.calendar-header button {
  padding: 8px 20px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.calendar-header button:hover {
  background: #005177;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.calendar-header button:active {
  transform: translateY(0);
  box-shadow: none;
}
.calendar-header button.disabled, .calendar-header button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}
.calendar-header button.disabled:hover, .calendar-header button:disabled:hover {
  background-color: #ccc;
  transform: none;
  box-shadow: none;
}
.calendar-scroll {
  /* max-height: 600px; */
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 0;
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  background: #fff;
}
.calendar-scroll::-webkit-scrollbar {
  width: 8px;
}
.calendar-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
}
.calendar-scroll::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}
.calendar-scroll::-webkit-scrollbar-thumb:hover {
  background: #666;
}
.calendar-day {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 20px;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: all 0.2s ease;
  align-items: center;
  position: relative;
}
.calendar-day:hover:not(.is-disabled) {
  background-color: #f5f9ff;
}
.calendar-day.is-today {
  background-color: #e8f5fe;
}
.calendar-day.is-today::before {
  content: '今日';
  position: absolute;
  transform: translateY(-50%);
  background: #0073aa;
  color: white;
  padding: 2px 8px;
  font-size: 0.8em;
  border-radius: 0 3px 3px 0;
}
.calendar-day.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f5f5f5;
}
.day-header {
  display: flex;
  align-items: center;
  gap: 5px;
}
.day-number {
  font-size: 1.2em;
  font-weight: bold;
  min-width: 25px;
}
.day-name {
  color: #666;
  font-size: 0.9em;
}
.day-name.saturday {
  color: #0066cc;
  font-weight: 500;
}
.day-name.sunday {
  color: #cc0000;
  font-weight: 500;
}
.calendar-day-info {
  display: flex;
  gap: 20px;
  width: 100%;
  margin-top: 10px;
}
.user-quota-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reservation-info {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 0px;
  padding: 2px;
  background: #fff;
  border-radius: 4px;
}
.vehicle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0px 8px;
}
.vehicle-number {
  font-weight: 500;
  color: #0066cc;
  min-width: 120px;
}
.vehicle-name {
  color: #666;
}
.user-name {
  color: #0066cc;
  font-size: 0.9em;
  margin-left: 4px;
}
.user-quota-row {
  background: #006fed;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.user-quota-label {
  font-weight: 800;
  color: #ffffff;
}
.user-quota-value {
  background: #fff;
  padding: 4px 8px;
  font-size: 1.6em;
  border-radius: 3px;
  font-weight: bold;
  color: #000000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.factory-quota {
  margin-top: 8px;
}
.factory-quota .quota-row {
  background: #f5f5f5;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.factory-quota .quota-label {
  color: #666;
}
.factory-quota .quota-value {
  color: #333;
}
.quota-label.medium-car, .quota-label.big-car {
  background: #f0f7ff;
  padding: 2px 6px;
  border-radius: 3px;
  min-width: 24px;
  text-align: center;
}
.quota-label.medium-car {
  color: #0066cc;
}
.quota-label.big-car {
  color: #cc0000;
}
.quota-row {
  background: #f0f7ff;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.quota-group {
  display: flex;
  align-items: center;
  width: 100%;
}
.quota-half {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.quota-half:first-child {
  justify-content: flex-start;
}
.quota-label {
  font-weight: 500;
  color: #0066cc;
}
.quota-value {
  background: #fff;
  padding: 4px 8px;
  border-radius: 3px;
  font-weight: bold;
  color: #0066cc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.capacity-row {
  background: #f8f8f8;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.capacity-label {
  font-weight: 500;
  color: #555;
}
.capacity-value {
  background: #fff;
  padding: 4px 8px;
  border-radius: 3px;
  font-weight: bold;
  color: #333;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
@media (max-width: 768px) {
  .calendar-day-info {
    flex-direction: column;
    gap: 10px;
  }
}
/* モーダルのスタイル */
.reservation-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100000;
}
.modal-content {
  background: white;
  padding: 12px 12px 20px 12px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  margin: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.modal-content h2 {
  font-size: 1em;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 3px;
  padding-bottom: 2px;
  border-bottom: 2px solid #0073aa;
}
.form-group {
  margin-bottom: 5px;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.form-group label {
  margin-bottom: 3px;
  font-weight: bold;
  font-size: 0.9em;
}
.form-group input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.input-with-button {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-with-button input[type="text"] {
    flex: 1;
}

.search-button {
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.search-button:hover {
    background: #005177;
}

@media (max-width: 480px) {
    .search-button {
        padding: 8px;
        font-size: 0.9em;
    }
}
.form-group input, .form-group select, .form-group textarea {
  padding: 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: larger;
}
.form-group textarea {
  height: 70px;
  resize: vertical;
}
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.submit-button, .cancel-button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.submit-button {
  background-color: #0073aa;
  color: white;
}
.submit-button:hover {
  background-color: #005177;
}
.cancel-button {
  background-color: #f1f1f1;
  color: #333;
}
.cancel-button:hover {
  background-color: #ddd;
}
/* レスポンシブ対応 */
@media (max-width: 480px) {
    .day-header {
        display: block !important;
    }
  .calendar-day {
    display: block !important;
  }
  .calendar-day.is-today::before {
    top: 30px;
    right: 0%;
    border-radius: 3px 0 0 3px ;
  }
}
  @media (min-width: 481px) {

    .calendar-day.is-today::before {
      top: 57px;
      left: 0;
      border-radius: 3px 0px 0px 3px;
    }
  }
  @media (max-width: 768px) {
    .calendar-day {
      min-width: 120px;
    }
    .modal-content {
      width: 90%;
      padding: 10px;
      font-size: 0.8em;
      position: absolute;
      top: 0%;
      margin: 10px;
      ;
    }
    .form-group textarea {
      height: 40px !important;
      resize: vertical;
    }
}