/* ========================================
   DR Cody A/S Board Skin - Additional Styles
   ======================================== */

/* 그누보드 페이지네이션 래퍼 */
.pagination .pg_wrap {
  margin: 0;
  padding: 0;
  text-align: center;
}

.pagination .pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* sound_only 숨김 (접근성 텍스트) */
.pagination .sound_only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 모든 페이지네이션 링크 기본 스타일 */
.pagination .pg a.pg_page,
.pagination .pg strong.pg_current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #424242;
  background-color: #fff;
  border: 1px solid #E0E0E0;
  transition: all 0.2s;
  text-decoration: none;
  box-sizing: border-box;
  vertical-align: middle;
}

/* 링크 호버 */
.pagination .pg a.pg_page:hover {
  border-color: var(--main-brown01);
  color: var(--main-brown01);
  background-color: #FAFAFA;
}

/* 현재 페이지 (pg_current) */
.pagination .pg strong.pg_current {
  background-color: var(--main-brown01) !important;
  color: #fff !important;
  border-color: var(--main-brown01) !important;
  cursor: default;
}

/* 이전/다음 버튼 */
.pagination .pg a.pg_prev,
.pagination .pg a.pg_next,
.pagination .pg span.pg_prev,
.pagination .pg span.pg_next {
  font-size: 0 !important;
  position: relative;
  min-width: 36px !important;
}

.pagination .pg a.pg_prev::before,
.pagination .pg a.pg_next::before,
.pagination .pg span.pg_prev::before,
.pagination .pg span.pg_next::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.pagination .pg a.pg_prev::before,
.pagination .pg span.pg_prev::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' fill='none' stroke='%23424242' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 19l-7-7 7-7'%3E%3C/path%3E%3C/svg%3E");
}

.pagination .pg a.pg_next::before,
.pagination .pg span.pg_next::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' fill='none' stroke='%23424242' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'%3E%3C/path%3E%3C/svg%3E");
}

.pagination .pg a.pg_prev:hover::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' fill='none' stroke='%23a5836a' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 19l-7-7 7-7'%3E%3C/path%3E%3C/svg%3E");
}

.pagination .pg a.pg_next:hover::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' fill='none' stroke='%23a5836a' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'%3E%3C/path%3E%3C/svg%3E");
}

/* 비활성 화살표 버튼 */
.pagination .pg span.pg_prev.disabled,
.pagination .pg span.pg_next.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination .pg span.pg_prev.disabled::before,
.pagination .pg span.pg_next.disabled::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' fill='none' stroke='%23cccccc' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 19l-7-7 7-7'%3E%3C/path%3E%3C/svg%3E");
}

.pagination .pg span.pg_next.disabled::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' fill='none' stroke='%23cccccc' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'%3E%3C/path%3E%3C/svg%3E");
}

/* 맨 처음/맨 끝 버튼 - 숨김 */
.pagination .pg a.pg_start,
.pagination .pg a.pg_end {
  display: none !important;
}

/* Lock cell - 비밀글이 아닐 때도 공간 유지 */
.lock-cell {
  min-width: 60px;
}

/* 작성자 셀 - 이름과 날짜 */
.author-cell {
  display: flex;
  align-items: center;
}

.author-date {
  display: none !important;
}

/* 데스크톱에서는 날짜 완전히 숨김 (별도 날짜 컬럼 표시) */
@media (min-width: 769px) {
  .author-date {
    display: none !important;
  }
}

/* 모바일에서는 이름 옆에 날짜 표시 */
@media (max-width: 768px) {
  .author-date {
    display: inline-block !important;
    font-size: 13px;
    margin-left: 12px;
  }
}

/* 아코디언 버튼 영역 */
.accordion-buttons {
  padding: 20px;
  text-align: right;
  border-top: 1px solid #e5e7eb;
  background-color: #fafafa;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

/* 상세보기 버튼 */
.detail-view-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background-color: #ffffff;
  color: var(--main-brown01);
  border: 2px solid var(--main-brown01);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.detail-view-btn:hover {
  background-color: var(--main-brown01);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.detail-view-btn svg {
  flex-shrink: 0;
}

/* 관리자 답변 버튼 */
.admin-reply-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background-color: var(--main-brown02);
  color: white;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.admin-reply-btn:hover {
  background-color: var(--main-brown01);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-reply-btn svg {
  flex-shrink: 0;
}

/* ========================================
   사진 첨부 가이드 (write)
   ======================================== */
.as-photo-guide {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  font-size: 14px;
  color: #92400E;
  margin-bottom: 12px;
}

.as-photo-guide svg {
  flex-shrink: 0;
}

.as-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--main-brown01);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.as-file-btn:hover {
  background: var(--main-brown02);
}

/* A/S 부위 드롭다운 */
select.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' fill='none' stroke='%236B7280' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

/* ========================================
   카테고리 태그
   ======================================== */
.as-category-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  margin-right: 8px;
  white-space: nowrap;
  vertical-align: middle;
}

.as-category-tag.cat-기둥     { background: #FEF3C7; color: #92400E; }
.as-category-tag.cat-선반     { background: #DBEAFE; color: #1E40AF; }
.as-category-tag.cat-서랍     { background: #FCE7F3; color: #9D174D; }
.as-category-tag.cat-악세서리 { background: #E0E7FF; color: #3730A3; }
.as-category-tag.cat-이전설치 { background: #D1FAE5; color: #065F46; }
.as-category-tag.cat-기타     { background: #F3F4F6; color: #374151; }

/* 제목 셀 */
.title-cell {
  display: flex;
  align-items: center;
  gap: 0;
}

.title-cell .title-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 첨부파일 아이콘 */
.file-icon {
  flex-shrink: 0;
  margin-left: 6px;
  vertical-align: middle;
}

/* ========================================
   진행 상태 배지 4종
   ======================================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease;
}

.status-icon-svg {
  flex-shrink: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 답변대기 */
.status-badge.status-waiting {
  background: #F3F4F6;
  color: #6B7280;
  border: 1px solid #E5E7EB;
}
.status-badge.status-waiting .status-dot {
  background: #9CA3AF;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 답변완료 - 파란색 */
.status-badge.status-answered {
  background: #EBF5FF;
  color: #007BFF;
  border: 1px solid #B8DAFF;
}

/* 방문예정 */
.status-badge.status-visit {
  background: #EEF2FF;
  color: #4338CA;
  border: 1px solid #C7D2FE;
}

/* 조치완료 - 녹색 (해결 완료 강조) */
.status-badge.status-resolved {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

/* ========================================
   행 호버 효과
   ======================================== */
.list-row-wrapper {
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
}

.list-row-wrapper:hover {
  background-color: #FAFAF8;
  border-left-color: var(--main-brown01);
  transform: translateY(-1px);
}

/* ========================================
   안심 안내 배너
   ======================================== */
.as-reassure-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #FBF8F5 0%, #FFF8F1 100%);
  border: 1px solid #E8DDD4;
  border-radius: 12px;
  margin-bottom: 28px;
}

.as-reassure-icon-svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.as-reassure-main {
  font-size: 15px;
  font-weight: 700;
  color: #1F2937;
  margin: 0 0 2px;
  line-height: 1.4;
}

.as-reassure-sub {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

.as-reassure-sub .md-br {
  display: none;
}

/* ========================================
   브랜드 신뢰 섹션
   ======================================== */
.as-trust-section {
  margin-top: 48px;
  padding: 40px 32px;
  background: linear-gradient(135deg, #FAF7F5 0%, #F5F0EB 50%, #FFF8F4 100%);
  border: 1px solid #E8DDD4;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.as-trust-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--main-brown01), #D4A574, var(--main-brown01));
}

.as-trust-header {
  text-align: center;
  margin-bottom: 28px;
}

.as-trust-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: #1F2937;
  margin: 0 0 10px;
  line-height: 1.4;
}

.as-trust-header p {
  font-size: 15px;
  color: #4B5563;
  margin: 0;
  line-height: 1.6;
}

.as-trust-header .as-trust-sub-msg {
  font-size: 13px;
  color: #9CA3AF;
  margin-top: 6px;
  font-weight: 400;
}

.as-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}

.as-trust-badge {
  text-align: center;
  padding: 20px 12px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E8DDD4;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.as-trust-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.as-trust-icon {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.as-trust-icon svg {
  width: 32px;
  height: 32px;
}

.as-trust-title {
  font-size: 14px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 4px;
}

.as-trust-sub {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.4;
}

/* ========================================
   관리자 상태 변경 드롭다운 (view)
   ======================================== */
.admin-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  margin-bottom: 16px;
}

.admin-status-bar label {
  font-size: 14px;
  font-weight: 600;
  color: #92400E;
  white-space: nowrap;
}

.admin-status-select {
  padding: 6px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  min-width: 140px;
}

.admin-status-select:focus {
  outline: none;
  border-color: var(--main-brown01);
  box-shadow: 0 0 0 2px rgba(165, 131, 106, 0.2);
}

.admin-status-msg {
  font-size: 13px;
  color: #059669;
  opacity: 0;
  transition: opacity 0.3s;
}

.admin-status-msg.show {
  opacity: 1;
}

/* FAQ 변환 버튼 (관리자) */
.as-faq-convert {
  display: inline-block;
  margin-bottom: 16px;
}

.as-faq-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.as-faq-btn:hover {
  background: #DBEAFE;
  border-color: #93C5FD;
}

/* ========================================
   모바일 반응형
   ======================================== */
@media (max-width: 768px) {

  .pagination .pg {
    gap: 6px;
  }

  .pagination .pg a.pg_page,
  .pagination .pg strong.pg_current {
    min-width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .pagination .pg a.pg_prev,
  .pagination .pg a.pg_next {
    min-width: 32px !important;
  }

  .pagination .pg a.pg_prev::before,
  .pagination .pg a.pg_next::before {
    width: 16px;
    height: 16px;
  }

  /* 모바일에서 lock-cell 조정 */
  .lock-cell {
    min-width: 48px;
    width: 48px !important;
  }

  /* 모바일에서 아코디언 버튼 */
  .accordion-buttons {
    padding: 16px;
    flex-direction: column;
    gap: 8px;
  }

  .detail-view-btn,
  .admin-reply-btn {
    padding: 12px 20px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
  }

  /* 카테고리 태그 모바일 */
  .as-category-tag {
    font-size: 11px;
    padding: 2px 8px;
    margin-right: 6px;
  }

  /* 상태 배지 모바일 */
  .status-badge {
    font-size: 12px;
    padding: 3px 10px;
  }

  /* 신뢰 섹션 모바일 */
  .as-trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .as-trust-section {
    margin-top: 32px;
    padding: 24px 16px;
  }

  .as-trust-header h3 {
    font-size: 17px;
    word-break: keep-all;
  }

  .as-trust-header p {
    font-size: 13px;
  }

  .as-trust-header .as-trust-sub-msg {
    font-size: 12px;
  }

  .as-trust-badge {
    padding: 14px 8px 12px;
  }

  .as-trust-icon svg {
    width: 28px;
    height: 28px;
  }

  .as-trust-title {
    font-size: 13px;
  }

  .as-reassure-banner {
    padding: 14px 16px;
    gap: 10px;
    margin-bottom: 20px;
  }

  .as-reassure-icon-svg {
    width: 18px;
    height: 18px;
  }

  .as-reassure-main {
    font-size: 14px;
  }

  .as-reassure-sub {
    font-size: 12px;
  }

  .as-reassure-sub .md-br {
    display: inline;
  }

  /* 관리자 상태바 모바일 */
  .admin-status-bar {
    flex-wrap: wrap;
  }
}

/* ========================================
   A/S 페이지 고급 마감
   ======================================== */

/* 히어로 높이 축소 */
section.h-\[550px\] {
  height: 320px !important;
  min-height: 320px !important;
}

@media (max-width: 768px) {
  section.max-md\:h-\[380px\] {
    height: 180px !important;
    min-height: 180px !important;
  }
}

/* 잘림 방지: transform 제거, padding으로만 조정 */
section.h-\[550px\] .container {
  transform: none !important;
}

section.h-\[550px\] {
  padding-top: 24px !important;
}

section.h-\[550px\].flex.flex-col.justify-end {
  justify-content: center !important;
}

/* 본문 중복 서브타이틀 숨김 */
.PageSubTitleText {
  display: none !important;
}

/* 타이틀 정돈 */
.PageTitleText {
  font-size: 44px !important;
  line-height: 1.05 !important;
  margin-top: 0 !important;
}

@media (max-width: 768px) {
  .PageTitleText {
    font-size: 32px !important;
  }

  section.max-md\:h-\[380px\] {
    padding-top: 16px !important;
  }
}

/* 리스트 행 고급감 */
.board_list li,
.tbl_head01 tbody tr {
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
