/* ===========================
   O2 예약 모달 전용 CSS
   =========================== */

.reserve-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.reserve-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
}

.reserve-modal.hidden,
.reserve-backdrop.hidden {
  display: none;
}

.reserve-modal-content {
  width: 520px;
  max-width: 90vw;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reserve-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reserve-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.reserve-close-btn {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #444;
}

/* -------------------- */
/* 기본 필드 구조 */
/* -------------------- */

.reserve-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

.reserve-label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

.reserve-radio-group {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.reserve-radio-group label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.reserve-device-info {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}

.reserve-device-label {
  font-weight: 600;
  color: #555;
}

/* -------------------- */
/* input, select */
/* -------------------- */

#reserve-start-at,
#reserve-repeat-type,
#reserve-name {
  /* padding: 8px 10px; */
  border-radius: 6px;
  border: 1px solid #d0d5dd;
  font-size: 13px;
}

/* -------------------- */
/* 요일 선택 */
/* -------------------- */

.reserve-weekdays {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reserve-weekdays button {
  border: 1px solid #d0d5dd;
  border-radius: 16px;
  padding: 4px 8px;
  background: #f9fafb;
  font-size: 12px;
  cursor: pointer;
}

.reserve-weekdays button.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* -------------------- */
/* 스위치 */
/* -------------------- */

.reserve-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.reserve-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.reserve-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #e5e7eb;
  border-radius: 999px;
  transition: 0.2s;
}

.reserve-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
}

.reserve-switch input:checked + .reserve-switch-slider {
  background-color: #22c55e;
}

.reserve-switch input:checked + .reserve-switch-slider:before {
  transform: translateX(22px);
}

/* -------------------- */
/* 저장 버튼 */
/* -------------------- */

.reserve-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.reserve-save-btn {
  padding: 8px 14px;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;

  /* 🔥 효과 */
  transition: all 0.25s ease;
}

.reserve-save-btn:hover {
  background: #1e40af;  /* 더 진한 블루 */
  transform: translateY(-1px);   /* 살짝 떠오르는 느낌 */
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.reserve-save-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* -------------------- */
/* 리스트 테이블 */
/* -------------------- */

.reserve-list-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
  margin-top: 6px;
}

.reserve-list-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.reserve-list-empty {
  font-size: 12px;
  color: #9ca3af;
}

.reserve-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.reserve-table th,
.reserve-table td {
  border: 1px solid #e5e7eb;
  padding: 4px 6px;
  text-align: center;
}

.reserve-table th {
  background: #f9fafb;
}

.reserve-table button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  color: #ef4444;
}

/* -------------------- */
/* 예약 아이콘 색상 */
/* -------------------- */
/* 예약 아이콘 기본 상태 */
.device-card .btn-device-reserve {
  background-color: #e5e7eb;  /* 연한 회색 */
  color: #374151;            /* 아이콘 기본 진회색 */
  border-radius: 6px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* 예약이 설정된 장치 */
.device-card .btn-device-reserve.has-reservation {
  background-color: #2563eb !important;  /* 🔵 파란 배경 (원하는 색으로 바꿔도 됨) */
  color: #ffffff !important;             /* 아이콘 흰색 */
}

/* 예약된 장치 hover 시 */
.device-card .btn-device-reserve.has-reservation:hover {
  background-color: #1d4ed8 !important;
}

/* ===============================
   🔥 입력창(예약시간, 반복, 예약이름) UI 통일
   =============================== */

/* 공통: 높이 / 폰트 / 기본 패딩(왼쪽) */
.reserve-modal .reserve-field input[type="datetime-local"],
.reserve-modal .reserve-field select,
.reserve-modal .reserve-field input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;   /* 🔹 기본은 좌우 12px */
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  font-family: 'Noto Sans KR', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
/* 🔹 select는 기본 화살표를 숨기고, 우리가 직접 아이콘을 배치 */
.reserve-modal .reserve-field select {
  padding-right: 40px;               /* 텍스트 영역 오른쪽 여유 */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* ▼ 커스텀 화살표 (SVG) */
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23949ba4' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;  /* 🔥 여기서 가로 위치 조절 */
  background-color: #fff;                  /* 필요 시 배경색 */
}