/* =======================
   기본 스타일 리셋
======================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  /* 배경색, 폰트 설정 등 */
  body {
    
    background-color: #fff;
    color: #333;
    margin-top: 80px;
    font-family: 'Noto Sans KR', sans-serif;
  }
  
  /* =======================
     페이지 공통
  ======================= */
  .booking-page {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
  }
  
  /* 큰 섹션 제목 스타일 */
  .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
  }
  
  /* =======================
     필터/검색 섹션
  ======================= */
  .booking-filter-section {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
  }
  
  .booking-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* 화면이 줄어들 때 줄바꿈 */
    
  }
  
/* 필터 아이템 (드롭다운 포함) */
.filter-item {
  position: relative; /* 📌 부모 요소를 relative로 설정 */
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  min-width: 80px;
}

/* 드롭다운 기본 숨김 */
.custom-dropdown-menu {
  display: none;
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  width: 120px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  z-index: 100;
  top: 40px; /* 📌 아이콘 기준 위치 */
  left: 0;
}

/* 드롭다운이 열릴 때 */
.custom-dropdown-menu.show {
  display: block;
}

/* 드롭다운 옵션 스타일 */
.dropdown-option {
  padding: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.dropdown-option:hover {
  background-color: #f1f1f1;
}
/* 가수 검색 필터 스타일 */
.artist-search-container {
  display: flex;
  align-items: center;
  background-color: #fafafa;
  border-radius: 6px;
  padding: 8px 12px;
  border: 1.5px solid #ccc; /* 기본 테두리 */
  font-size: 0.9rem;
  font-family: "Inter", sans-serif; /* 지역 필터 폰트와 동일하게 설정 */
}

.artist-search-icon {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  opacity: 0.7; /* 아이콘 색 연하게 */
}

.artist-search-input {
  border: none;
  outline: none;
  background: none;
  font-size: 0.9rem;
  font-family: "Inter", sans-serif;
  width: 140px;
  padding: 4px 8px;
}

/* 검색창 포커스 시 스타일 */
.artist-search-container:focus-within {
  border: 1.5px solid #007bff; /* 파란색 강조 */
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}
.artist-search-input::placeholder {
  font-family: 'Noto Sans KR', sans-serif;
}

  
  .filter-icon {
    width: 20px;
    height: 20px;
    margin-right: 6px;
  }
  
  .filter-label {
    font-size: 0.9rem;
    margin-right: 4px;
    font-family: 'Noto Sans KR', sans-serif;
  }
  
  .filter-dropdown-icon {
    width: 16px;
    height: 16px;
  }
  
  .search-button {
    padding: 8px 16px;
    background-color: #007bff;
    color: #fff;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
  }
  
  .search-button:hover {
    background-color: #0056b3;
  }
  
  .divider-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 100px;
    opacity: 0.3; /* 희미하게 표시 */
  }
  
  /* =======================
     검색 결과 섹션
  ======================= */
  .search-result-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
  }
  
  .search-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .result-count {
    font-size: 1rem;
    color: #666;
  }
  
  /* 콘서트 카드 목록 */
  .concert-card-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    max-width: 1000px;
  }
  
  /* =======================
     콘서트 카드
  ======================= */
  .concert-card {
    display: flex;
    height: 220px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    
  }
  
  .concert-image {
    width: 200px;
    height: 100%;
    object-fit: contain;
    
    margin-left: -15px;
    /* 필요한 경우 height 설정 가능 */
  }
  
  .concert-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    margin-left: 0px;
    flex: 1;
  }
  
  .concert-info-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .concert-title {
    font-size: 1.2rem;
    font-weight: 600;
  }
  
  .concert-description {
    margin-top: 4px;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
  }
  
  .concert-badge {
    padding: 4px 8px;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 4px;
    font-size: 0.8rem;
    height: fit-content;
  }
  
  /* 시간 선택 영역 */
  .time-slot-list {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
  }
  
  .time-slot {
    background-color: #eaeaea;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
  }
  .concert-meta,
  .concert-meta span {
    font-family: 'Noto Sans KR', sans-serif !important;
    font-size: 16px !important;
    color: #333 !important;
  }
  
  
  
  /* 예매하기 버튼 */
  .reserve-button {
    margin-left: auto; /* 오른쪽 정렬 */
    padding: 6px 12px;
    background-color: #ff9800;
    color: #ffffff;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Noto Sans KR', sans-serif;
  }
  
  .reserve-button:hover {
    background-color: #e68900;
  }
  
  /* =======================
     페이지네이션
  ======================= */
  .pagination {
    display: flex;
    gap: 8px;
    margin-top: 30px;
    justify-content: center;
    align-items: center;
  }
  
  .page-number,
  .page-next {
    padding: 6px 12px;
    background-color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
    font-size: 0.9rem;
    color: #333;
  }
  
  .page-number:hover,
  .page-next:hover {
    background-color: #f0f0f0;
  }
  
  .page-number.active {
    background-color: #007bff;
    color: #ffffff;
    border-color: #007bff;
  }
  
  .page-next img {
    width: 16px;
    height: 16px;
  }
  /* --- 공통 컴포넌트 --- */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid #409eff;
  border-radius: 4px;
  background: #fff;
  color: #409eff;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-outline:hover {
  background: #f0f8ff;
}
.btn-sm {
  padding: 4px 8px;
  font-size: 0.875rem;
}
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* --- 달력 모달 --- */
.calendar-modal.hidden { display: none; }
.calendar-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);    /* ← 블러 처리 */
  z-index: 1000;
}
.booking-filters .calendar-button {
  margin-left: auto;      /* ✍️ 오른쪽 끝으로 밀기 */
}
/* 1. 펄스 애니메이션 정의 */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 2. 캘린더 버튼에 애니메이션 적용 */
.booking-filters .calendar-button {
  /* 기존 스타일 유지 */
  background-color: #6be3b3;
  color: #fff;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  
  /* 추가: 펄스 애니메이션 */
  animation: pulse 3s ease-in-out infinite;
  transform-origin: center center;
  /* 호버 이펙트는 그대로 두고 싶다면 함께 유지해도 됩니다. */
}

/* (선택) 호버 시 더 강한 이펙트 유지 */
.booking-filters .calendar-button:hover {
  transform: scale(1.1);
}

.calendar-content {
  position: fixed;
  top: 53%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;            /* ← 90% → 95% 로 늘림 */
  max-width: 1000px;      /* ← 최대폭을 900px 로 키움 */
  padding: 24px;
  background: #fff;
  border-radius: 8px;
  z-index: 1001;
    max-height: 80vh;        /* 화면 높이의 80%를 넘지 않도록 */
  overflow: visible;
  -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
  max-height: 650px;
  overflow: hidden;
}
/* ① 세로 스크롤 가능한 래퍼 */
.calendar-scroll {
  /* 원하는 최대 높이만큼 설정 (예: 모달 전체 높이에서 헤더 제외한 영역) */
  max-height: 65vh;
  overflow-y: auto;
  
  -webkit-overflow-scrolling: touch;  /* iOS 부드러운 스크롤 */

  /* ② 스크롤바 숨기기 */
  scrollbar-width: none;             /* Firefox */
  -ms-overflow-style: none;          /* IE 10+ */
}
.calendar-scroll::-webkit-scrollbar {
  display: none;                     /* Chrome, Safari, Opera */
}

/* 헤더 */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding-right: 40px;  /* ← 닫기 버튼과 겹치지 않도록 여유 넣기 */
  margin-bottom: 16px;
}
#next-month-btn {
  order: 2; /* 제목(h2)의 order 1 뒤로, 닫기 버튼(order 3) 앞에 */
}
#close-calendar-btn {
  order: 3;
}
#prev-month-btn {
  order: 1;
}
.calendar-title {
  order: 1;
}
.close-btn {
  position: absolute;
  top: -10px;          /* 위쪽 여유 늘림 */
  right: 10px;        /* 오른쪽 여유 늘림 */
  font-size: 1.4rem;
  border: none;
  background: none;
  cursor: pointer;
}
.calendar-title {
  font-size: 1.25rem;
  font-weight: 600;
}

/* 요일 */
.weekday-row {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  text-align: center;
  font-weight: 500;
  margin-bottom: 8px;
}
.weekday.sunday { color: #f56c6c; }
.weekday.saturday { color: #409eff; }

/* 그리드 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 6px;
  justify-content: center;    /* 그리드를 부모 안에서 가로 중앙에 배치 */
  margin: 0 auto;
}
/* 셀 */
.calendar-cell {
  display: flex;
  flex-direction: column;
  padding: 8px;
  min-height: 100px;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  background: #fff;
    box-sizing: border-box;  /* padding, border 포함한 크기로 계산 */
  width: 120px; 
}
.calendar-cell:hover {
  background: #f5f7fa;
}
.calendar-cell.today {
  box-shadow: 0 0 0 2px #409eff;
}
.calendar-cell .date-number {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.calendar-cell .date-number.sunday { color: #f56c6c; }
.calendar-cell .date-number.saturday { color: #409eff; }
.calendar-cell .event-preview {
  font-size: 0.75rem;
  background: #edf2ff;
  padding: 2px 4px;
  border-radius: 4px;
  margin-top: 2px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booking-calendar .event-title,
.fc-event-title /* FullCalendar 사용 시 클래스 예시 */ {
  display: block;
  white-space: nowrap;         /* 한 줄 고정 */
  overflow: hidden;            /* 넘친 부분 숨김 */
  text-overflow: ellipsis;     /* 말줄임표 표시 */
}
/* booking.css */

.date-detail {
  position: fixed;
  top: 50%;               /* 셀 바로 아래에 붙이려면 JS에서 위치 보정 가능 */
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 360px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 16px;
  z-index: 2000;
}
.close-detail-btn {
  position: absolute;
  top: 8px;               /* 오버레이 안쪽 위쪽 */
  right: 8px;             /* 오버레이 안쪽 오른쪽 */
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2000;          /* .date-detail(1002) 위에 뜨도록 */
}

.date-detail.hidden {
  display: none;
}

/* 내부 제목/목록 스타일 */
.detail-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.detail-list li {
  margin-bottom: 6px;
}


/* 범례 */
.legend {
  margin-top: 24px;
  border-top: 1px solid #ebeef5;
  padding-top: 16px;
}
.legend-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.legend-items .badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 8px;
}
/* 일정 유형 색상 */
.badge.event-meeting       { background: #c9e2ff; color: #409eff; }
.badge.event-maintenance   { background: #e6f7ff; color: #67c23a; }
.badge.event-workshop      { background: #fff0f6; color: #e6a23c; }

/* 마감된 카드에 회색+반투명+클릭 비허용 */
.concert-card.closed {
  position: relative;
  opacity: 0.5;
  filter: grayscale(100%);
  pointer-events: none;
}
.concert-card.closed .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  pointer-events: none;
}

/* 중앙에 “마감되었습니다” 레이블 오버레이 */
.concert-card.closed .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
    z-index: 10;             /* ← 이 줄을 추가하세요 */
  pointer-events: none;
}


  /* ============================
   반응형 스타일 (max-width: 480px)
============================ */
@media (max-width: 480px) {
     .calendar-content {
    overflow: hidden;
    top: 60% !important;
    padding: 25px;
  }
    .calendar-scroll {
      max-height: calc(100vh - 130px); /* 헤더 높이≈60px + modal padding≈50px */
    flex: 1;                 /* 남은 공간 모두 차지 */
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .booking-page {
      padding: 10px;
  }
  .section-title {
      font-size: 1.2rem;
      margin-bottom: 10px;
  }
  .booking-filter-section {
      padding: 10px;
      margin-bottom: 12px;
  }
  .filter-item {
      padding: 4px;
      font-size: 0.8rem;
  }
  .artist-search-input {
      width: 80px;
      font-size: 0.8rem;
  }
  .search-button {
      padding: 5px 10px;
      font-size: 0.8rem;
  }
  /* 모바일에서 콘서트 카드 레이아웃 변경 */
  .concert-card {
    flex-direction: column;  /* 세로로 배치하여 공간 확보 */
    align-items: flex-start;
    margin-bottom: 10px; /* 카드 간 간격 추가 */
    height: auto; /* 고정 높이 제거 */
  }
  .concert-image {
    width: 100%;
    height: 250px;
    margin-bottom: 8px;  /* 이미지와 정보 사이 여백 */
  }
  .concert-info {
    padding: 6px;
    width: 100%;
  }
  .concert-title {
    font-size: 0.95rem;
  }
  .concert-description {
    font-size: 0.8rem;
  }
  .reserve-button {
    padding: 3px 6px;
    font-size: 0.8rem;
    margin-top: 8px;  /* 버튼 위에 여백 추가 */
  }
  .time-slot {
    font-size: 0.85rem;
    padding: 4px 8px;
    margin: 2px 0;  /* 시간 슬롯 간에 여백 추가 */
  }
  .pagination {
    margin-top: 20px;
    justify-content: center;
  }
  .page-number,
  .page-next {
    padding: 5px 10px;
    font-size: 0.8rem;
    margin: 0 3px;  /* 페이지 버튼 사이 여백 */
  }

}
/* 공통 달력 그리드(태블릿 이상) */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 120px);
  gap: 6px;
  overflow-x: auto;
  margin: 0 auto;
  grid-auto-rows: minmax(100px, auto);
}

@media (max-width: 768px) {
  /* 1. 달력 그리드를 그대로 grid로 유지하면서 화면에 맞춰 축소 */
 .calendar-grid {
   display: grid;
   grid-template-columns: repeat(7, 120px);
   gap: 4px;
   width: max-content;
  font-size: 0.75rem;
   margin: 0;
 }
      .calendar-content {
    overflow: hidden;
    top: 60% !important;
    padding: 25px;
  }
  /* 2) 그리드 영역을 flex-grow 시키고 양방향 스크롤 허용 */
 .calendar-scroll {
   flex: 1;
   max-height: calc(100vh - 130px); /* 480px 블록과 동일하게 */
   overflow-y: auto;
   overflow-x: auto;
   -webkit-overflow-scrolling: touch;
 }
  /* 2. 셀 패딩·높이 조정 */
  .calendar-cell {
    padding: 4px;           /* 내부 여백 축소 */
    min-height: 50px;       /* 셀 높이 축소 */
    border-radius: 4px;
  }

  /* 3. 요일 헤더도 grid 유지 */
  .weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 0.75rem;
  }
}

/* ────────────────────────────────
   반응형: 필터 줄과 캘린더 버튼 분리 정렬
──────────────────────────────── */
@media (max-width: 768px), (max-width: 480px) {
  .booking-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  /* 필터 항목(지역·날짜), 검색창, 검색 버튼은 한 줄에 */
  .booking-filters .filter-item,
  .booking-filters .artist-search-container,
  .booking-filters .search-button {
    flex: 1 1 auto;
    min-width: 0;  /* flex 아이템이 줄어들 수 있도록 */
  }
  .booking-filters .search-button {
    flex: 0 0 auto; /* 검색 버튼은 콘텐츠 크기만큼 */
  }

  /* 캘린더 버튼만 줄 바꿔서 풀폭으로 */
  .booking-filters .calendar-button {
    flex: 1 1 100%;
    margin-top: 12px;
  }
}

/* ========== 모바일 (max-width:480px) 반응형 개선 (모두 !important 적용) ========== */
@media (max-width: 480px) {
  /* 카드 전체를 세로 스택으로 */
  .concert-card {
    flex-direction: column !important;
    align-items: stretch !important;
    height: auto !important;
    margin-bottom: 16px !important;
    position: relative !important;
  }

  /* 이미지: 카드 상단에 꽉 채우기 */

  /* 본문 여백 조정 */
  .concert-info {
    padding: 12px !important;
  }

  /* 타이틀/배지 영역을 세로 정렬 */
  .concert-info-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  /* 뱃지 띄워주기 */
  .concert-badge {
    margin-top: 4px !important;
  }

  /* 메타 정보 (장소, 날짜) 사이 여유 */
  .concert-meta {
    margin: 8px 0 !important;
  }
  .concert-meta span {
    display: block !important;
    margin-bottom: 4px !important;
  }

  /* 시간대 + 버튼 영역 */
  .time-slot-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 8px !important;
  }

  /* 각 시간 슬롯 */
  .time-slot {
    flex: 1 1 auto !important;
    min-width: 80px !important;
  }

  /* 예매/마감 버튼 */
  .reserve-button {
    flex: none !important;
    width: 100% !important;
    margin-top: 12px !important;
    padding: 10px !important;
    font-size: 0.9rem !important;
  }

  /* 즐겨찾기 버튼 */
  .favorite-button {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
  }
}
