/* ========================================
   Vasanta 회원 컴포넌트 CSS (최적화 버전)
   Bootstrap 5 기반, 프로젝트 특화 스타일만 포함
   작성일: 2025-10-02
   ======================================== */

/* ==========================================
   1. 공통 유틸리티
   ========================================== */

a {
  text-decoration: none;
  color: var(--bs-a-text-color);
}

[data-bs-theme="light"][data-skin="bordered"] {
  --bs-a-text-color: black;
}

[data-bs-theme="dark"][data-skin="bordered"] {
  --bs-a-text-color: white;
}

.layout-page {
  padding-top: 0 !important;
}

/* 스크롤바 항상 표시 (페이지 흔들림 방지) */
html {
  overflow-y: scroll;
}

body {
  min-height: 100vh;
}

/* 게시판 내용 영역 스타일 */
#nttCn {
  line-height: 1.6;
  min-height: 200px;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

#nttCn * {
  font-family: inherit !important;
}

#nttCn p {
  margin-bottom: 1rem;
}

#nttCn img {
  max-width: 100%;
  height: auto;
}

#nttCn pre {
  background-color: var(--bs-gray-100);
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
}

#nttCn code {
  background-color: var(--bs-gray-100);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

#nttCn blockquote {
  border-left: 4px solid var(--bs-primary);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--bs-text-muted);
}

/* ==========================================
   2. 파일 업로드 컴포넌트
   ========================================== */

.drop-zone {
  border: 2px dashed var(--bs-border-color);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  background-color: var(--bs-body-bg);
  transition: all 0.3s ease;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--bs-primary);
  background-color: var(--bs-primary-bg-subtle);
}

.drop-zone-icon {
  font-size: 48px;
  color: var(--bs-text-muted);
  margin-bottom: 16px;
  display: block;
}

.drop-zone.dragover .drop-zone-icon {
  color: var(--bs-primary);
}

.drop-zone-text {
  color: var(--bs-text-muted);
  font-size: 16px;
  margin-bottom: 16px;
}

.uploaded-file-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
}

.uploaded-file-info {
  display: flex;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.uploaded-file-icon {
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

.uploaded-file-details {
  flex: 1;
  min-width: 0;
}

.uploaded-file-name {
  font-weight: 500;
  margin-right: 8px;
  word-break: break-all;
  line-height: 1.4;
}

.uploaded-file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.uploaded-file-size,
.uploaded-file-date {
  color: var(--bs-text-muted);
  font-size: 15px;
}

.uploaded-file-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

/* ==========================================
   3. 정보 뷰어 컴포넌트
   ========================================== */

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background-color: var(--bs-gray-50);
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .info-item {
  background-color: var(--bs-gray-800);
}

.info-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--bs-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--bs-body-color);
  min-height: 24px;
  display: flex;
  align-items: center;
}

.info-value:empty:before {
  content: "-";
  color: var(--bs-text-muted);
}

/* ==========================================
   4. 구독 컴포넌트
   ========================================== */

.subscription-list-item {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  transition: all 0.3s ease;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
}

.subscription-list-item:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.status-badge.active {
  background: linear-gradient(45deg, #28a745, #20c997);
}

.status-badge.paused {
  background: linear-gradient(45deg, #ffc107, #fd7e14);
}

.status-badge.cancelled {
  background: linear-gradient(45deg, #dc3545, #e83e8c);
}

.subscription-price {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--bs-primary);
}

.subscription-info {
  font-size: 0.9rem;
  color: var(--bs-text-muted);
}

.subscription-actions {
  min-width: 200px;
}

.subscription-actions .btn {
  margin: 0 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
}

.payment-history {
  max-height: 200px;
  overflow-y: auto;
}

.subscription-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.subscription-meta > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================
   5. 상품 컴포넌트
   ========================================== */

.product-card,
.galleryBox .galleryItem {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  border-radius: 0.375rem;
}

.product-card:hover,
.galleryBox .galleryItem:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.product-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}

.product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--bs-primary);
}

.product-thumbnail {
  height: 200px;
  object-fit: cover;
  background: var(--bs-secondary-bg);
}

/* 제품 갤러리 */
.galleryBox {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.galleryBox .galleryItem {
  width: calc(25% - 0.75rem);
  box-shadow: 0 2px 6px 0 rgba(67, 89, 113, 0.12);
}

.galleryBox .galleryItem:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px 0 rgba(67, 89, 113, 0.16);
}

.galleryBox .galleryItem a {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 0.375rem;
  overflow: hidden;
}

.galleryBox .galleryItem a img {
  width: 100%;
  height: 12.5rem;
  object-fit: cover;
}

.galleryBox .galleryItem .item-content {
  padding: 1rem;
}

.galleryBox .galleryItem .item-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: #566a7f;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.galleryBox .galleryItem .item-price {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #696cff;
}

/* ==========================================
   6. 결제 컴포넌트
   ========================================== */

.payment-container {
  max-width: 800px;
  margin: 0 auto;
}

.order-info-table {
  background: var(--bs-body-bg);
}

.order-info-table th {
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  font-weight: 600;
}

.order-info-table td {
  color: var(--bs-body-color);
}

.payment-method-card {
  border: 2px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}

.payment-method-card.selected {
  border-color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
}

.final-amount {
  font-size: 2rem;
  font-weight: bold;
  color: var(--bs-primary);
}

.agreement-box {
  background: var(--bs-secondary-bg);
  border: 1px solid var(--bs-border-color);
  padding: 15px;
  border-radius: 8px;
}

/* ==========================================
   7. Empty State
   ========================================== */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state i {
  font-size: 4rem;
  color: var(--bs-text-muted);
  margin-bottom: 1rem;
}

/* ==========================================
   8. 테스트/유틸리티 페이지
   ========================================== */

.pop_wrap {
  padding: 20px;
  background: #fff;
  border-radius: 8px;
}

.tbl_th {
  background-color: #f8f9fa;
  padding: 12px;
  border: 1px solid #ddd;
  font-weight: bold;
}

.tbl_td {
  padding: 12px;
  border: 1px solid #ddd;
}

/* ==========================================
   9. 모바일 반응형 - 공통 테이블 카드 스타일
   ========================================== */

@media (max-width: 768px) {
  /* 공통 테이블 → 카드 변환 */
  #taskListTable,
  #occasionalTaskTable,
  #signListTable,
  #lineTable table {
    font-size: 1rem;
  }

  #taskListTable thead,
  #occasionalTaskTable thead,
  #signListTable thead,
  #lineTable table thead {
    display: none !important;
  }

  #taskListTable,
  #taskListTable tbody,
  #taskListTable tr,
  #taskListTable td,
  #occasionalTaskTable,
  #occasionalTaskTable tbody,
  #occasionalTaskTable tr,
  #occasionalTaskTable td,
  #signListTable,
  #signListTable tbody,
  #signListTable tr,
  #signListTable td,
  #lineTable table,
  #lineTable table tbody,
  #lineTable table tr,
  #lineTable table td {
    display: block;
    width: 100%;
  }

  /* 개선된 카드 스타일 */
  #taskListTable tr,
  #occasionalTaskTable tr,
  #signListTable tr,
  #lineTable table tr {
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    margin-bottom: 16px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
  }

  /* taskListTable 특별 카드 레이아웃 - 강제 적용 */
  .table-responsive #taskListTable tr {
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 18px !important;
    margin-bottom: 16px !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }

  /* 번호는 숨기고 제목에 번호를 포함 */
  .table-responsive #taskListTable .postNum {
    display: none !important;
  }

  /* 제목 영역 - 카드 헤더 */
  .table-responsive #taskListTable .title {
    padding: 16px 16px 8px 16px !important;
    margin-bottom: 16px !important;
    position: relative !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #252525 !important;
    background: white !important;
    border: none !important;
    text-align: left !important;
  }

  .table-responsive #taskListTable .title:before {
    content: "" !important;
    display: none !important;
  }

  .table-responsive #taskListTable .title a {
    color: #252525 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
  }

  /* 회색 점선 구분선 */
  .table-responsive #taskListTable .title:after {
    content: "" !important;
    display: block !important;
    width: calc(100% - 32px) !important;
    height: 1px !important;
    background: repeating-linear-gradient(
      to right,
      #d0d0d0 0px,
      #d0d0d0 4px,
      transparent 4px,
      transparent 8px
    ) !important;
    position: absolute !important;
    bottom: 0px !important;
    left: 16px !important;
  }

  /* 정보 영역 스타일링 */
  .table-responsive #taskListTable .category,
  .table-responsive #taskListTable .subcategory,
  .table-responsive #taskListTable .frequency,
  .table-responsive #taskListTable .period {
    padding: 8px 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border: none !important;
    margin: 0 !important;
    min-height: 40px !important;
    background: white !important;
    text-align: left !important;
  }

  .table-responsive #taskListTable .category:before,
  .table-responsive #taskListTable .subcategory:before,
  .table-responsive #taskListTable .frequency:before,
  .table-responsive #taskListTable .period:before {
    position: static !important;
    width: auto !important;
    padding: 0 !important;
    font-size: 15px !important;
    color: #545454 !important;
    font-weight: 500 !important;
    flex-shrink: 0 !important;
  }

  .table-responsive #taskListTable .category:before {
    content: "대분류" !important;
  }
  .table-responsive #taskListTable .subcategory:before {
    content: "중분류" !important;
  }
  .table-responsive #taskListTable .frequency:before {
    content: "주기유형" !important;
  }
  .table-responsive #taskListTable .period:before {
    content: "주기" !important;
  }

  /* 상태와 관리 버튼 영역 */
  .table-responsive #taskListTable .status,
  .table-responsive #taskListTable .action {
    padding: 12px 16px !important;
    background: #f8f9fa !important;
    margin: 0 !important;
    text-align: center !important;
    border: none !important;
  }

  .table-responsive #taskListTable .status {
    border-bottom: 1px solid #e9ecef !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .table-responsive #taskListTable .status:before,
  .table-responsive #taskListTable .action:before {
    content: "" !important;
    display: none !important;
  }

  /* 상태 배지 스타일 - 문서 ##5 업무 상태 태그 색상표 적용 */
  .table-responsive #taskListTable .status .badge {
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 15px !important;
    border: none !important;
  }

  /* 관리 버튼 스타일링 - PC와 동일한 색상 적용 (색상 오버라이드 제거) */
  .table-responsive #taskListTable .action .btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    font-size: 15px !important;
  }

  /* 기존 다른 테이블들 스타일 유지 */
  #occasionalTaskTable td,
  #signListTable td,
  #lineTable table td {
    border: none;
    padding: 0.25rem 0;
    text-align: left !important;
    position: relative;
  }

  #occasionalTaskTable td {
    padding-left: 40% !important;
  }

  #signListTable td {
    padding-left: 45% !important;
  }

  #lineTable table td {
    padding-left: 50% !important;
  }

  #occasionalTaskTable td:before,
  #signListTable td:before,
  #lineTable table td:before {
    position: absolute;
    left: 6px;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: #495057;
    content: attr(data-label) ": ";
  }

  #lineTable table td:before {
    width: 45%;
  }

  #occasionalTaskTable td:before {
    width: 35%;
  }

  #signListTable td:before {
    width: 40%;
  }

  /* ==========================================
     TBM/교육 목록 테이블 모바일 반응형 스타일
     ========================================== */
  #tbmListTable,
  #tbmScheduleTable,
  #eduExecTable,
  #eduPlanTable {
    font-size: 1rem;
  }

  #tbmListTable thead,
  #tbmScheduleTable thead,
  #eduExecTable thead,
  #eduPlanTable thead {
    display: none !important;
  }

  #tbmListTable tbody,
  #tbmScheduleTable tbody,
  #eduExecTable tbody,
  #eduPlanTable tbody {
    display: block;
  }

  #tbmListTable tr,
  #tbmScheduleTable tr,
  #eduExecTable tr,
  #eduPlanTable tr {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  #tbmListTable td,
  #tbmScheduleTable td,
  #eduExecTable td,
  #eduPlanTable td {
    display: block;
    border: none;
    padding: 0.5rem 0.75rem;
    text-align: right !important;
    position: relative;
    padding-left: 40% !important;
    border-bottom: 1px solid #f0f0f0;
  }

  #tbmListTable td:last-child,
  #tbmScheduleTable td:last-child,
  #eduExecTable td:last-child,
  #eduPlanTable td:last-child {
    border-bottom: none;
  }

  #tbmListTable td:before,
  #tbmScheduleTable td:before,
  #eduExecTable td:before,
  #eduPlanTable td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 0.75rem;
    width: 35%;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }

  /* 관리 버튼 셀 스타일 */
  #tbmListTable td:last-child .btn,
  #tbmScheduleTable td:last-child .btn,
  #eduExecTable td:last-child .btn,
  #eduPlanTable td:last-child .btn {
    font-size: 0.875rem;
    padding: 6px 12px;
  }

  /* signListTable 추가 스타일 */
  #signListTable td:last-child {
    padding-bottom: 0.5rem;
  }
  /* signListTable 추가 스타일 */
  #signListTable td:last-child {
    padding-bottom: 0.5rem;
  }

  #signListTable td:last-child .btn {
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    margin-top: 0.25rem;
  }

  /* 공통 모달 테이블 스타일 */
  #detailInfoTable,
  #signInfoTable {
    font-size: 1rem;
    border: none;
  }

  #detailInfoTable tr,
  #signInfoTable tr {
    display: flex;
    flex-direction: column;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.75rem 0;
    margin: 0;
  }

  #detailInfoTable tr:last-child,
  #signInfoTable tr:last-child {
    border-bottom: none;
  }

  #detailInfoTable th,
  #signInfoTable th {
    display: block;
    width: 100%;
    font-weight: 600;
    color: var(--bs-primary);
    background-color: transparent;
    border: none;
    padding: 0 0 0.25rem 0;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  #detailInfoTable td,
  #signInfoTable td {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background-color: white;
    border-radius: 0.375rem;
    color: var(--bs-dark);
    border: 1px solid #f0f0f0;
  }
}

/* ==========================================
   10. 모바일 반응형 - 공통 모달
   ========================================== */

@media (max-width: 768px) {
  .modal-dialog.modal-lg {
    max-width: 95%;
    margin: 0.5rem;
  }

  /* 공통 모달 스크롤 제한 */
  #occasionalTaskModal .modal-dialog,
  #taskDetailModal .modal-dialog,
  #detailModal .modal-dialog {
    max-height: calc(100vh - 1rem);
    margin: 0.5rem auto;
  }

  #occasionalTaskModal .modal-content,
  #taskDetailModal .modal-content,
  #detailModal .modal-content {
    max-height: calc(100vh - 1rem);
    display: flex;
    flex-direction: column;
  }

  #occasionalTaskModal .modal-body,
  #taskDetailModal .modal-body,
  #detailModal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
  }

  /* 상시업무 모달 특수 처리 */
  #occasionalTaskModal .table-responsive {
    overflow-y: visible;
  }

  /* 상세보기 모달 개선 */
  #detailModal .modal-dialog {
    margin: 1rem auto;
    max-height: calc(100vh - 2rem);
  }

  #detailModal .modal-content {
    max-height: calc(100vh - 2rem);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  }

  #detailModal .modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
    background-color: white;
    border-radius: 0.5rem 0.5rem 0 0;
  }

  #detailModal .modal-body {
    padding: 1.5rem;
    max-height: calc(100vh - 200px);
  }

  #detailModal .modal-footer {
    border-top: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
    background-color: white;
    border-radius: 0 0 0.5rem 0.5rem;
  }

  #detailModal .mb-3 h6 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bs-primary);
    display: inline-block;
  }

  #detailSignatureDiv .border {
    background-color: white;
    border: 1px solid var(--bs-border-color) !important;
  }

  #detailSignatureImage {
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  }
}

/* ==========================================
   11. 모바일 반응형 - 파일 업로드
   ========================================== */

@media (max-width: 768px) {
  .uploaded-file-item {
    flex-direction: column;
    align-items: stretch;
  }

  .uploaded-file-info {
    margin-bottom: 12px;
  }

  .uploaded-file-actions {
    margin-left: 0;
    justify-content: flex-end;
  }

  .uploaded-file-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 576px) {
  .uploaded-file-actions {
    flex-direction: column;
    gap: 4px;
  }

  .uploaded-file-actions .btn {
    font-size: 15px;
    padding: 4px 8px;
  }
}

/* ==========================================
   12. 모바일 반응형 - 페이징 (1줄 유지)
   @modified 2025-12-05 - 모바일에서 2줄 표시 문제 해결
   ========================================== */

@media (max-width: 768px) {
  .pagination {
    flex-wrap: nowrap !important;
    gap: 2px;
    justify-content: center;
  }

  .pagination .page-item {
    margin: 0;
  }

  .pagination .page-link {
    padding: 0.5rem 0.625rem;
    font-size: 0.875rem;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 첫/마지막/이전/다음 버튼 아이콘 크기 조정 */
  .pagination .page-item.first .page-link,
  .pagination .page-item.last .page-link,
  .pagination .page-item.prev .page-link,
  .pagination .page-item.next .page-link {
    padding: 0.5rem;
  }

  /* 아이콘 크기 */
  .pagination .page-link i {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .pagination .page-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
    min-width: 32px;
    min-height: 32px;
  }
}

/* ==========================================
   13. 모바일 반응형 - 검색 폼
   ========================================== */

@media (max-width: 768px) {
  .card-body form .col-md-3,
  .card-body form .col-md-6 {
    margin-bottom: 5px;
    margin-top: 5px;
  }

  .card-body form button {
    /* width: 48%; */
    display: inline-block;
  }
}

/* ==========================================
   14. 모바일 반응형 - 구독 페이지
   ========================================== */

@media (max-width: 768px) {
  .page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .page-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start !important;
  }

  .page-actions .btn {
    flex: 1;
    max-width: 150px;
  }

  .subscription-list-item .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .subscription-meta {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .subscription-actions {
    margin-top: 1rem;
    width: 100%;
    min-width: auto;
  }

  .subscription-actions .btn {
    margin: 0.25rem 0;
    width: 100%;
  }

  .subscription-meta > div {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ==========================================
   15. 모바일 반응형 - 제품 갤러리
   ========================================== */

@media (max-width: 1200px) {
  .galleryBox .galleryItem {
    width: calc(33.333% - 0.75rem);
  }
}

@media (max-width: 768px) {
  .galleryBox .galleryItem {
    width: calc(50% - 0.5rem);
  }
}

@media (max-width: 480px) {
  .galleryBox .galleryItem {
    width: 100%;
  }

  .modal-dialog.modal-lg {
    max-width: 100%;
    margin: 0;
  }

  #detailModal .modal-dialog {
    max-height: 100vh;
    margin: 0;
  }

  #detailModal .modal-content {
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ==========================================
   16. 환불 요청 페이지 전용 스타일
   ========================================== */

.refund-card {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}

.refund-policy {
  background-color: var(--bs-warning-bg-subtle);
  border: 1px solid var(--bs-warning-border-subtle);
  color: var(--bs-warning-text-emphasis);
}

.refund-amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--bs-success);
}

.calculation-detail {
  background-color: var(--bs-light);
  border: 1px solid var(--bs-border-color);
}

/* ==========================================
   17. 모달 Cascade (중첩 모달) 스타일
   - 정보입력용 모달 크기 통일
   - 중첩 시 백드랍 처리 (ModalCascadeManager에서 관리)
   ========================================== */

/* 정보입력 모달 (openActionModal) - 크기 통일 */
.modal-type-action .modal-dialog {
  max-width: 800px;
}

.modal-type-action .modal-body {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

/* 알림 모달 (customAlert) - 작고 중앙 정렬 */
.modal-type-alert .modal-dialog {
  max-width: 400px;
}

.modal-type-alert .modal-content {
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-type-alert .modal-header {
  border-bottom: none;
  padding-bottom: 0;
}

.modal-type-alert .modal-body {
  text-align: center;
  padding: 1.5rem;
}

.modal-type-alert .modal-footer {
  border-top: none;
  justify-content: center;
  padding-top: 0;
}

/* 중첩 모달용 추가 백드랍 - ModalCascadeManager에서 생성 */
.cascade-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

/* 반응형 - 모바일에서 모달 크기 조정 */
@media (max-width: 768px) {
  .modal-type-action .modal-dialog {
    max-width: 95%;
    width: 95%;
    margin: 0.5rem auto;
  }

  .modal-type-alert .modal-dialog {
    max-width: 90%;
    margin: auto;
  }
}

/* ==========================================
   공지사항 상세 페이지 - 모바일 헤더 스타일
   ========================================== */
@media (max-width: 768px) {
  /* 제목과 버튼 높이 맞춤 */
  #step1 .card-header .d-flex.justify-content-between {
    align-items: flex-start;
    gap: 0.5rem;
  }

  #step1 .card-header .card-title {
    font-size: 1rem;
    line-height: 1.5;
    flex: 1;
    word-break: keep-all;
  }

  #step1 .card-header .d-flex.gap-2 {
    flex-shrink: 0;
  }

  #step1 .card-header .btn-sm {
    padding-block: 0;
    font-size: 0.75rem;
  }
}

/* ==========================================
   의견청취 상세 - 상태 변경 이력 테이블 모바일 반응형
   ========================================== */
@media (max-width: 768px) {
  #opinionStatusLogTable thead {
    display: none;
  }

  #opinionStatusLogTable tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
  }

  #opinionStatusLogTable tbody td {
    display: block;
    text-align: right !important;
    position: relative;
    padding-left: 40% !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border: none;
    border-bottom: 1px solid #f0f0f0;
  }

  #opinionStatusLogTable tbody td:last-child {
    border-bottom: none;
  }

  #opinionStatusLogTable tbody td:before {
    content: attr(data-label);
    position: absolute;
    left: 0.75rem;
    width: 35%;
    text-align: left;
    font-weight: 600;
    color: #566a7f;
  }
}
