/* 기존 스타일 그대로 유지 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.chat-container {
  width: 100%;
  max-width: 500px;
  height: 90vh;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  /* 2026.02.24 lhe */
  /* background: #2b84d2;
  color: white; */
  background: #ffffff;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;

  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-icon {
  /* 2026.02.24 lhe */
  /* width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px; */
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* 2026.02.24 lhe */
/* 세션 상태 초록점 (아이콘 우상단) */
.session-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #d1d5db;
  display: block;
}

.session-dot.status-green {
  background: #22c55e;
}

.session-dot.status-yellow {
  background: #eab308;
}

.session-dot.status-red {
  background: #ef4444;
}

/* 서브텍스트 옆 인라인 초록점 */
.session-dot-inline {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d1d5db;
  margin-right: 4px;
  vertical-align: middle;
}

.session-dot-inline.status-green {
  background: #22c55e;
}

.session-dot-inline.status-yellow {
  background: #eab308;
}

.session-dot-inline.status-red {
  background: #ef4444;
}


.chat-header-text h1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.chat-header-text p {
  font-size: 13px;

  /* 2026.02.24 lhe */
  /* opacity: 0.9; */
  color: #6b7280;
}

.reset-btn {
  padding: 8px 16px;
  /* 2026.02.24 lhe */
  /* background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white; */
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  color: #6b7280;

  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reset-btn:hover {
  /* 2026.02.24 lhe */
  /* background: rgba(255, 255, 255, 0.3); */

  background: #e5e7eb;
  color: #374151;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f9fafb;
}

.message {
  margin-bottom: 16px;
  display: flex;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  justify-content: flex-end;
}

.message.bot {
  justify-content: flex-start;
}

.message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 14px;
}

.message.user .message-content {
  /* 2026.02.24 lhe */
  /* background: #2b84d2; */
  background: #6366f1;

  color: white;
  border-bottom-right-radius: 4px;
}

.message.bot .message-content {
  background: white;
  color: #1f2937;
  border-top-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}

/* 2026.02.24 lhe */
/* 봇 아바타 아이콘 */
.bot-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  margin-top: 2px;
  flex-shrink: 0;
}

.message.bot {
  justify-content: flex-start;
  align-items: flex-start;
}

.message-time {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 6px;
}

.booking-card {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.booking-card-header {
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 12px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.booking-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #dbeafe;
  font-size: 13px;
}

.booking-info-row:last-child {
  border-bottom: none;
}

.booking-info-label {
  color: #6b7280;
  font-weight: 500;
}

.booking-info-value {
  color: #1f2937;
  font-weight: 600;
}



.info-card-title {
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-input-area {
  padding: 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
  /* 2026.02.24 lhe  -> 얘 없으면 스크롤 투 바텀 위치 이상해짐*/
  position: relative;
}

/* 2026.02.24 lhe */
.scroll-bottom-btn {
  position: absolute;
  z-index: 10;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.scroll-bottom-btn:hover {
  background: #f3f4f6;
  color: #374151;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


.menu-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}




/* 모바일에서도 4열 유지 */
@media (max-width: 480px) {
  .menu-buttons {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }

  .menu-btn {
    padding: 8px 4px;
    font-size: 11px;
  }

  .menu-btn-icon {
    font-size: 16px;
    margin-bottom: 2px;
  }
}

@media (max-width: 360px) {
  .menu-buttons {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }

  .menu-btn {
    padding: 6px 2px;
    font-size: 10px;
  }

  .menu-btn-icon {
    font-size: 14px;
    margin-bottom: 1px;
  }
}


.menu-btn {
  padding: 10px 8px;
  /* 2026.02.24 lhe */
  /* background: white;
  border: 2px solid #2b84d2; */
  background: #fafafa;
  border: 1.5px solid #e5e7eb;
  color: #374151;

  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  /* color: #2b84d2; */
  transition: all 0.2s;
  text-align: center;
}

.notice-btn {
  white-space: nowrap;
  padding: 10px 8px;
  /* 2026.02.24 lhe */
  /* background: white;
  border: 2px solid #2b84d2; */
  background: #fafafa;
  border: 1.5px solid #e5e7eb;
  color: #374151;

  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  /* color: #2b84d2; */
  transition: all 0.2s;
  text-align: center;
}














.menu-btn-icon {
  display: block;
  font-size: 18px;
  margin-bottom: 3px;
}



@media (max-width: 360px) {
  .menu-btn {
    padding: 8px 6px;
    font-size: 11px;
  }

  .menu-btn-icon {
    font-size: 16px;
    margin-bottom: 2px;
  }
}

.menu-btn:hover:not(:disabled) {
  /* background: #2b84d2; */
  color: white;
  transform: translateY(-2px);
  /* box-shadow: 0 4px 12px rgba(43, 132, 210, 0.3); */

  /* 2026.02.24 lhe */
  background: #6366f1;
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.menu-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

.text-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.text-input:focus {
  border-color: #2b84d2;
}

/* 2026.02.24 lhe */
/* .send-btn {
  padding: 12px 24px;
  background: #2b84d2;
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
} 
  
.send-btn:hover:not(:disabled) {
  background: #1e6bb8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 132, 210, 0.3);
}
*/
.send-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn:hover:not(:disabled) {
  background: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  /* 2026.02.24 lhe background: #2b84d2; */
  background: #6366f1;

  animation: pulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.loading-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.timer-bar {
  width: 100px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.timer-progress {
  height: 100%;
  background: #2b84d2;
  border-radius: 2px;
  transition: width 0.1s linear;
}

.timer-text {
  font-weight: 600;
  color: #2b84d2;
}

.error-message {
  color: #dc2626;
  background: #fee2e2;
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 13px;
}

.success-message {
  color: #059669;
  background: #d1fae5;
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 13px;
}

.sub-menu-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  background: white;
  border: 1px solid #2b84d2;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #2b84d2;
  transition: all 0.2s;
  text-align: left;
}

.sub-menu-btn:hover {
  background: #f0f4ff;
}

.phone-input-container {
  margin-top: 12px;
}

.phone-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #2b84d2;
  border-radius: 8px;
  font-size: 14px;
}

.phone-submit-btn {
  padding: 12px;
  background: #2b84d2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.phone-submit-btn:hover {
  background: #1e6bb8;
}

.faq-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 8px 0;
  overflow: hidden;
}

.faq-question {
  padding: 12px;
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.faq-question:hover {
  background: #e2e8f0;
}

.faq-answer {
  padding: 12px;
  color: #475569;
  line-height: 1.6;
  display: none;
}

.faq-answer.show {
  display: block;
}

.hospital-info {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: #1e40af;
}

/* 🔥 로딩 상태 스타일 추가 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.error-content {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  margin: 20px;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-title {
  font-size: 20px;
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 12px;
}

.error-message {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 20px;
}

.retry-btn {
  padding: 12px 24px;
  background: #2b84d2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
}

.default-btn {
  padding: 12px 24px;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* 🔥 FAQ 관련 스타일 업데이트 */
.faq-container,
.faq-container-full {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
  border: 1px solid #e2e8f0;
}

.faq-container-full {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.faq-item {
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: #2b84d2;
  box-shadow: 0 2px 8px rgba(43, 132, 210, 0.1);
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  padding: 12px 16px;
  cursor: pointer;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
  position: relative;
}

.faq-question:hover {
  background: #f8fafc;
}

.faq-number {
  color: #2b84d2;
  font-weight: 600;
  font-size: 14px;
  min-width: 22px;
}

.faq-toggle-icon {
  margin-left: auto;
  color: #2b84d2;
  font-size: 12px;
  transition: transform 0.3s ease;
  font-weight: bold;
}

.faq-answer {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  background: #f8fafc;
  transition: all 0.3s ease;
  opacity: 0;
}

.faq-answer.show {
  padding: 16px;
  max-height: 500px;
  opacity: 1;
}

.faq-answer strong {
  color: #059669;
  margin-right: 8px;
}

/* 🔥 FAQ 정보 표시 스타일 */
.faq-more-info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  text-align: center;
}

.faq-count-info {
  font-size: 14px;
  color: #1e40af;
  margin-bottom: 4px;
}

.faq-more-text {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

.faq-total-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 16px;
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: #15803d;
}

/* 🔥 반응형 FAQ 스타일 */
@media (max-width: 768px) {
  .faq-question {
    padding: 10px 12px;
    font-size: 14px;
  }

  .faq-answer {
    font-size: 14px;
  }

  .faq-answer.show {
    padding: 12px;
  }

  .faq-number {
    font-size: 12px;
    min-width: 18px;
  }

  .faq-toggle-icon {
    font-size: 10px;
  }
}

/* 🔥 FAQ 애니메이션 효과 */
@keyframes faqSlideDown {
  from {
    max-height: 0;
    opacity: 0;
  }

  to {
    max-height: 500px;
    opacity: 1;
  }
}

@keyframes faqSlideUp {
  from {
    max-height: 500px;
    opacity: 1;
  }

  to {
    max-height: 0;
    opacity: 0;
  }
}

.faq-answer.show {
  animation: faqSlideDown 0.3s ease-out;
}

/* 🔥 전화번호 입력 관련 스타일 */
.phone-input-container {
  margin: 12px 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.phone-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.phone-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.phone-input:focus {
  outline: none;
  border-color: #2b84d2;
  box-shadow: 0 0 0 3px rgba(43, 132, 210, 0.1);
}

.phone-submit-btn {
  background: #2b84d2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.phone-submit-btn:hover {
  background: #1e6bb8;
}

.phone-input-hint {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  text-align: center;
}

/* 🔥 SMS 인증 관련 스타일 (전화번호 입력과 동일한 디자인) */
.sms-auth-container {
  margin: 12px 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.sms-auth-phone-info {
  font-size: 14px;
  color: #374151;
  margin-bottom: 12px;
  text-align: center;
  padding: 8px;
  background: #e0f2fe;
  border-radius: 6px;
  border: 1px solid #0284c7;
}

.sms-auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.sms-timer-info {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sms-timer {
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #10b981;
  min-width: 45px;
  text-align: center;
}

.sms-resend-link {
  background: transparent;
  color: #2b84d2;
  border: none;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sms-resend-link:hover:not(:disabled) {
  background: #eff6ff;
  color: #1e6bb8;
}

.sms-resend-link:disabled {
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: none;
}

/* 🔥 반응형 디자인 */
@media (max-width: 768px) {
  .phone-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .phone-submit-btn {
    margin-top: 8px;
  }

  .sms-auth-footer {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .sms-timer-info {
    justify-content: center;
  }
}

/* 🔥 애니메이션 효과 */
.sms-auth-container {
  animation: fadeIn 0.3s ease-out;
}

.phone-input-container {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🔥 SMS 타이머 색상 변화 */
.sms-timer.warning {
  color: #d97706;
  background: #fef3c7;
  border-color: #f59e0b;
}

.sms-timer.danger {
  color: #dc2626;
  background: #fef2f2;
  border-color: #ef4444;
}

.sms-timer.expired {
  color: #7f1d1d;
  background: #fecaca;
  border-color: #dc2626;
}

.booking-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  background: white;
}

.booking-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #007bff;
}

.booking-header {
  background-color: #f8f9fa;
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
}

.booking-content {
  padding: 15px;
  display: none;
  background: white;
}

.booking-content.show {
  display: block;
}

.search-box {
  background: white;
  color: #333;
  padding: 30px 0;
  margin-bottom: 30px;
  border-bottom: 2px solid #f0f0f0;
}

.btn-action {
  margin: 0 2px;
}

.modal-lg {
  max-width: 800px;
}

.form-floating textarea {
  height: 120px;
}

.stats-card {
  background: white;
  color: #333;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.highlight {
  background-color: #fff3cd;
  padding: 2px 4px;
  border-radius: 3px;
}

.booking-id {
  font-size: 0.8em;
  color: #6c757d;
  font-family: monospace;
}

body {
  background-color: #f8f9fa;
}

.container-fluid {
  background: white;
  min-height: 100vh;
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

.product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-card:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
}

.product-card.selected {
  border-color: #007bff;
  background-color: #e7f3ff;
}

.step-indicator {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.step {
  display: flex;
  align-items: center;
  margin: 0 10px;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 8px;
}

.step.active .step-number {
  background-color: #007bff;
  color: white;
}

.step.completed .step-number {
  background-color: #28a745;
  color: white;
}

/* select 스타일 추가 */
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
  background-color: white;
}

.form-group select:focus {
  outline: none;
  border-color: #2b84d2;
  box-shadow: 0 0 0 3px rgba(43, 132, 210, 0.1);
}

/* 예약 폼 스타일 */
.booking-form-container {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 12px 0;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.booking-form-header {
  background: #f8fafc;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
  border-radius: 8px 8px 0 0;
}

.booking-form-content {
  padding: 16px;
}

.selected-product-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
  color: #1e40af;
  font-size: 14px;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.required {
  color: #dc2626;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2b84d2;
  box-shadow: 0 0 0 3px rgba(43, 132, 210, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.booking-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  justify-content: flex-end;
}

.booking-form-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.cancel-btn {
  background: #f3f4f6;
  color: #374151;
}

.cancel-btn:hover {
  background: #e5e7eb;
}

.submit-btn {
  background: #2b84d2;
  color: white;
}

.submit-btn:hover {
  background: #1e6bb8;
}

.submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* 상품 선택 버튼 스타일 */
.product-select-btn {
  background: #f0f9ff !important;
  border: 1px solid #0ea5e9 !important;
  color: #0c4a6e !important;
}

.product-select-btn:hover {
  background: #e0f2fe !important;
  transform: translateY(-1px);
}

/* 반응형 디자인 */
@media (max-width: 480px) {
  .booking-form-content {
    padding: 12px;
  }

  .booking-form-actions {
    flex-direction: column;
  }

  .booking-form-btn {
    width: 100%;
    margin-bottom: 8px;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px;
    /* iOS에서 줌 방지 */
  }
}

/* 예약 정보 카드 개선 */
.booking-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 12px 0;
  background: white;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.booking-card-header {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 15px;
}

.booking-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px x;
  border-bottom: 1px solid #f3f4f6;
}

.booking-info-row:last-child {
  border-bottom: none;
}

.booking-info-label {
  font-weight: 500;
  color: #6b7280;
  font-size: 13px;
}

.booking-info-value {
  font-weight: 600;
  color: #111827;
  text-align: right;
  font-size: 14px;
}

/* 로딩 및 에러 메시지 개선 */
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.5;
}

.success-message {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.5;
}



.info-card-title {
  background: #f8fafc;
  padding: 12px 16px;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  font-size: 15px;
}

.info-card>*:not(.info-card-title) {
  padding: 16px;
  line-height: 1.6;
}

/* 서브메뉴 버튼 스타일 개선 */
.sub-menu-btn {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 8px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-menu-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sub-menu-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 🔥 폼 내부 에러 메시지 스타일 */
.form-error-message {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🔥 폼 필드 에러 상태 */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #dc2626;
  background-color: #fef2f2;
}

/* 🔥 예약 폼 스타일 추가 */
.booking-form-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-top: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.booking-form-header {
  background: linear-gradient(135deg, #2b84d2 0%, #1e6bb8 100%);
  color: white;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
}

.booking-form-content {
  padding: 16px;
}

.selected-product-info {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #1e40af;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-group .required {
  color: #dc2626;
  margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
  box-sizing: border-box;
  background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2b84d2;
  box-shadow: 0 0 0 3px rgba(43, 132, 210, 0.1);
}

.form-group textarea {
  resize: vertical;
  font-family: inherit;
}

.booking-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.booking-form-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.booking-form-btn.cancel-btn {
  background: #f3f4f6;
  color: #6b7280;
}

.booking-form-btn.cancel-btn:hover {
  background: #e5e7eb;
}

.booking-form-btn.submit-btn {
  background: #2b84d2;
  color: white;
}

.booking-form-btn.submit-btn:hover:not(:disabled) {
  background: #1e6bb8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43, 132, 210, 0.3);
}

.booking-form-btn.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}


/* 🔥 모든 입력 요소와 버튼에 폰트 적용 */
input,
textarea,
select,
button {
  font-family: "Inter Medium", "Noto Sans KR Medium", sans-serif;
}

/* 🔥 모든 텍스트 요소에 폰트 적용 */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
label,
a {
  font-family: "Inter Medium", "Noto Sans KR Medium", sans-serif;
}


/* 🔥 FAQ 컨테이너 - 대용량 (8개 이상) */
.faq-container-large {
  max-height: 500px;
  /* 높이를 더 크게 설정 */
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #f9fafb;
}

.faq-container-large::-webkit-scrollbar {
  width: 6px;
}

.faq-container-large::-webkit-scrollbar-track {
  background: #f9fafb;
  border-radius: 3px;
}

.faq-container-large::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.faq-container-large::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* 🔥 기존 FAQ 스타일 유지 */
.faq-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.faq-container-full {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}













/* ─────────────────────────────────────────
   진료과/의료진 드롭다운 셀렉터
───────────────────────────────────────── */
.dept-selector-container {
  margin-top: 12px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.dept-selector-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.dept-selector-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.dept-selector-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: auto;
}

.dept-selector-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.dept-selector-select:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.dept-selector-confirm-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 4px;
}

.dept-selector-confirm-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.dept-selector-confirm-btn:active {
  transform: translateY(0);
}











/* ─────────────────────────────────────────
   스케줄 캘린더
───────────────────────────────────────── */
.schedule-calendar-container {
  margin-top: 12px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 0.3s;
}

/* 날짜 네비 */
.schedule-date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.schedule-nav-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.schedule-nav-btn:hover:not(:disabled) {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
}
.schedule-nav-btn:disabled,
.schedule-nav-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.schedule-date-label {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  flex: 1;
}

/* 시간 드롭다운 */
.schedule-time-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.schedule-time-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.schedule-time-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: auto;
}
.schedule-time-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.schedule-time-select.schedule-select-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  animation: shake 0.3s ease;
}

/* 가장 빠른 예약 배지 */
.schedule-earliest-badge {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
}

.schedule-earliest-btn {
  margin-left: auto;
  padding: 4px 10px;
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.schedule-earliest-btn:hover { opacity: 0.85; }

/* 예약하기 버튼 */
.schedule-confirm-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.3px;
}
.schedule-confirm-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.schedule-confirm-btn:active { transform: translateY(0); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}






/* 섹션 구분 */
.schedule-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}

/* 구분선 "또는" */
.schedule-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  margin: 2px 0;
}
.schedule-divider::before,
.schedule-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* 가장 빠른 예약 섹션 */
.schedule-earliest-section {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
}

.schedule-earliest-info {
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}

.schedule-earliest-goto-btn {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.3px;
}
.schedule-earliest-goto-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.schedule-earliest-goto-btn:active { transform: translateY(0); }

.schedule-earliest-none {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  padding: 8px 0;
}







/* 비활성 네비 버튼 */
.schedule-nav-disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* 섹션 구조 */
.schedule-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}

/* 구분선 */
.schedule-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  margin: 4px 0;
}
.schedule-divider::before,
.schedule-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* 가장 빠른 예약 섹션 */
.schedule-earliest-section {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
}

.schedule-earliest-info {
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}

.schedule-earliest-goto-btn {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.schedule-earliest-goto-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.schedule-earliest-goto-btn:active { transform: translateY(0); }

.schedule-earliest-none {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  padding: 8px 0;
}

/* 날짜 피커 */
.schedule-datepicker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-datepicker {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
}
.schedule-datepicker:focus {
  outline: none;
  border-color: #667eea;
}

.schedule-datepicker-weekday {
  font-size: 13px;
  font-weight: 700;
  color: #667eea;
  white-space: nowrap;
  min-width: 48px;
  text-align: center;
  background: #eff6ff;
  border-radius: 6px;
  padding: 6px 10px;
}

/* 날짜 안내 */
.schedule-date-notice {
  font-size: 13px;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 6px;
  padding: 8px 12px;
  line-height: 1.5;
}







/* ✅ 기본 리셋 */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* ✅ body 자체 스크롤 방지 */
}

/* ✅ 모바일 기본 — 전체화면 고정 */
.chat-container {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  border-radius: 0;
  box-shadow: none;
}

/* ✅ PC — 가운데 카드 형태 */
@media (min-width: 768px) {
  body {
    overflow: hidden; /* body 스크롤 방지 유지 */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f3f4f6;
  }

  .chat-container {
    position: relative;  /* fixed 해제 */
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 500px;
    height: 90vh;

    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
  }
}


/* ✅ 헤더 — 고정 높이 */
.chat-header {
  flex-shrink: 0;           /* ✅ 줄어들지 않음 */
  /* 기존 스타일 유지 */
}

/* ✅ 메시지 영역 — 남은 공간 전부 차지 + 스크롤 */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* ✅ iOS 부드러운 스크롤 */
  overscroll-behavior: contain;      /* ✅ 스크롤 전파 방지 */
}

/* ✅ 입력 영역 — 고정 */
.chat-input-area {
  flex-shrink: 0;           /* ✅ 줄어들지 않음 */
  /* ✅ iOS 홈바 영역 대응 */
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* ✅ 텍스트 입력창 — 모바일 확대 방지 */
.text-input {
  font-size: 16px; /* ✅ 16px 미만이면 iOS에서 자동 확대됨 */
}







/* ── 격자형 월 캘린더 ── */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}
.cal-nav-btn {
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.cal-nav-btn:hover { background: #5a67d8; }
.cal-nav-btn-disabled { background: #d1d5db; cursor: not-allowed; }

.cal-earliest-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #1d4ed8;
  margin-bottom: 10px;
}

.cal-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.cal-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  padding: 4px 0;
}
.cal-weekday.cal-sun { color: #ef4444; }
.cal-weekday.cal-sat { color: #3b82f6; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  position: relative;
  cursor: default;
  transition: all 0.15s;
}
.cal-day-empty { background: transparent; }
.cal-day-disabled {
  color: #d1d5db;
  background: #f9fafb;
}
.cal-day-available {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #bfdbfe;
}
.cal-day-available:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
  transform: scale(1.05);
}
.cal-day-selected {
  background: #667eea !important;
  color: white !important;
  border-color: #5a67d8 !important;
}
.cal-day-today .cal-day-num::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  background: #ef4444;
  border-radius: 50%;
  margin: 1px auto 0;
}
.cal-day-sun { color: #ef4444; }
.cal-day-sat { color: #3b82f6; }
.cal-day-num { font-size: 13px; line-height: 1; }
.cal-slot-count {
  font-size: 9px;
  background: #667eea;
  color: white;
  border-radius: 8px;
  padding: 1px 4px;
  margin-top: 2px;
  line-height: 1.4;
}
.cal-day-selected .cal-slot-count { background: white; color: #667eea; }

/* 시간 패널 */
.cal-time-panel {
  margin-top: 14px;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}
.cal-time-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}
.cal-time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.cal-time-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 4px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.cal-time-btn:hover { background: #eff6ff; border-color: #667eea; color: #667eea; }
.cal-time-btn.selected {
  background: #667eea;
  color: white;
  border-color: #5a67d8;
  font-weight: 600;
}







/* ── 캘린더 스켈레톤 ── */
.cal-day-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: cal-shimmer 1.4s infinite;
  border-radius: 8px;
  aspect-ratio: 1;
}

@keyframes cal-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.cal-skeleton-btn {
  width: 60px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: cal-shimmer 1.4s infinite;
}

.cal-skeleton-title {
  width: 100px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: cal-shimmer 1.4s infinite;
}

/* ── 캘린더 로딩 오버레이 ── */
.cal-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 4px;
}

.cal-loading-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #e5e7eb;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: cal-spin 0.7s linear infinite;
}

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

.cal-loading-text {
  font-size: 12px;
  color: #9ca3af;
}


.menu-btn:focus,
.sub-menu-btn:focus {
  outline: none;
  box-shadow: none;
}






.chat-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-status {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.session-indicator {
  font-size: 10px;
  line-height: 1;
}

.session-time {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.reset-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}


.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  display: inline-block;
  animation: typing-bounce 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-6px); opacity: 1; }
}




.like-btn {
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 3px 12px;
  cursor: pointer;
  font-size: 12px;
  color: #9ca3af;
  transition: all 0.2s;
}

.like-btn:hover:not(:disabled) {
  border-color: #667eea;
  color: #667eea;
}

.like-btn.liked {
  border-color: #667eea;
  background: #eff6ff;
  color: #667eea;
  cursor: default;
}





.like-btn.disliked {
  background-color: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  cursor: default;
}

/* 비활성화 시 흐리게 (클릭 안 한 버튼) */
.like-btn:disabled:not(.liked):not(.disliked) {
  opacity: 0.35;
  cursor: default;
}


/* ── FAQ 카테고리 헤더 ellipsis 강제 적용 ── */
.faq-category-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 8px;
  min-width: 0;        /* ★ flex container에 min-width: 0 필수 */
  overflow: hidden;    /* ★ 부모도 overflow hidden */
}

.faq-category-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  min-width: 0;        /* ★ 핵심 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;             /* ★ max-width 대신 flex: 1 사용 */
}

.faq-category-count {
  font-size: 12px;
  font-weight: 400;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;      /* ★ 개수는 절대 줄어들지 않음 */
}



/* ── FAQ 질문 텍스트 말줄임 ── */
.faq-question {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;   /* ★ 추가 */
}

.faq-question-text {
  flex: 1;
  min-width: 0;          /* ★ 핵심 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}




/* ── FAQ 너비 고정 ── */
.faq-block-wrapper,
.faq-container,
.faq-container-large,
.faq-container-full,
.faq-item,
.faq-question,
.faq-answer {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

.faq-answer {
  overflow: hidden;  /* 내용이 넘쳐도 버블 확장 방지 */
}





.info-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  flex-shrink: 0;
  width: 108px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.6;
  padding-top: 1px;
}

.info-value {
  flex: 1;
  font-size: 13px;
  color: #1e293b;
  line-height: 1.6;
  word-break: keep-all;
}

.info-sub {
  display: block;
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 1px;
}

.info-closed {
  color: #ef4444;
  font-weight: 600;
}

.info-divider {
  height: 1px;
  background: #e8edf5;
  margin: 2px 0;
}



/* ── 병원 정보 카드 (운영시간 / 오시는길) ── */
.info-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  padding: 4px 0;
  margin: 8px 0;
  overflow: hidden;
}

/* info-card 내부 전체 패딩 제거 (이전 규칙 충돌 방지) */
.info-card > * {
  padding: 0;
}

.info-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.03em;
  padding: 10px 14px 6px;
  border-bottom: 1px solid #e8edf5;
}

.info-row {
  display: flex;
  align-items: flex-start;
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  flex-shrink: 0;
  width: 108px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.6;
  padding-top: 1px;
}

.info-value {
  flex: 1;
  font-size: 13px;
  color: #1e293b;
  line-height: 1.6;
  word-break: keep-all;
}

.info-sub {
  display: block;
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 1px;
}

.info-closed {
  color: #ef4444;
  font-weight: 600;
}

.info-divider {
  height: 1px;
  background: #e8edf5;
  margin: 2px 0;
}
