/* ======================================
   스마트스토어 전용 공통 스타일
   ====================================== */
:root {
  --button-primary-bg: #2271b1;
  --button-secondary-bg: #f6f7f7;
}
/* 헤더·푸터 숨김 */
body.smartstore header {
  display: none;
}
body.smartstore footer {
  /* display: none; */
}

/* 본문 최소 높이 보장 + 중앙 정렬 */
body.smartstore .wp-block-group.alignfull.has-global-padding {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* =============================
   카드 기본 스타일
   ============================= */
.order-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 20px;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  box-sizing: border-box;
}

/* 카드 헤더 */
.order-card-header {
  padding: 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 500;
  font-size: 16px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

/* 카드 본문 */
.order-card-body {
  color: #000;
  font-weight: 400;
  padding: 16px 20px;
  font-size: 14px;
}

/* =============================
   주문 정보 섹션
   ============================= */
.order-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 14px;
  word-break: keep-all;
}

/* =============================
   주문 상세 영역 (좌우 배치)
   ============================= */
.order-detail-wrapper {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.order-detail-card {
  flex: 5;
}
.order-tip-card {
  flex: 5;
}

/* 안내사항 카드 */
.order-tip-card {
  background: #fefce8;
  border: 1px solid #fde68a;
  color: #92400e;
}
.order-tip-card .order-card-header {
  background: #fffbe6;
  border-bottom: 1px solid #fde68a;
}

.order-tip-card li {
  margin-bottom: 4px;
}

/* 안내문 안의 가짜 버튼 */
.ui-btn-token {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin: 0;
  border-radius: 4px;
  background: var(--button-primary-bg);
  border: 1px solid var(--button-primary-bg);
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}
/* 안내문 안의 가짜 버튼 */
.ui-same-btn-token {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin: 0;
  border-radius: 4px;
  background-color: #e5533d;

  border: none;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}
/* 가짜 체크박스 토큰 */
.ui-check-token {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  margin: 0;
  border-radius: 4px;
  /* background: #f0f0f0;
  border: 1px solid #000; */
  font-size: 12px;
  font-weight: 500;
}

.ui-check-token::before {
  content: "✓";
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3b82f6;
  color: #fff;
  font-size: 10px;
  border-radius: 3px;
}
/* =============================
   제품 슬롯 (이미지 + 버튼)
   ============================= */
.product-card-header {
  cursor: pointer;
}
.product-info-row {
  padding: 10px;
}
.slot-row {
  background: #f9fafb;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap; /* ✅ 반응형 줄바꿈 */
  word-break: keep-all;
}
.slot-row span {
  font-weight: 500;
  min-width: 40px;
}
.slot-row .slot-images {
  flex: 1;
  display: flex;
  /* justify-content: center; */
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.slot-row img {
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 60px;
  height: auto;
  object-fit: cover;
}

/* =============================
   버튼 스타일
   ============================= */
.button {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  height: 40px;
  line-height: 1.5;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  box-sizing: border-box;
}

.button-primary {
  background: var(--button-primary-bg);
  border-color: #2271b1;
  color: #fff;
}
.button-primary:hover {
  background: #135e96;
  border-color: #135e96;
}

.button-secondary {
  background: var(--button-secondary-bg);
  border-color: #ccc;
  color: #1d2327;
}
.button-secondary:hover {
  background: #f0f0f0;
  border-color: #999;
}
.edit-btn {
  width: 200px;
}
.bulk-btn {
  width: 200px;
  background: #e5533d;
  border: none;
  color: #fff;
}

.toggle-btn {
  flex-shrink: 0; /* 절대 줄어들지 않게 */
  min-width: 64px; /* 상세보기/접기 모두 커버 */
  /* height: 32px; */
  padding: 0 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* font-size: 12px; */
  white-space: nowrap;
}

/* =============================
   요청사항 영역
   ============================= */
#order-note {
  margin: 30px auto 20px;
  max-width: 60%;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
}
#order-note label {
  display: block;
  font-weight: 600;
  margin: 4px 16px;
}
#note {
  width: 100%;
  font-size: 14px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
}

/* =============================
   모달
   ============================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal.show {
  display: flex;
}
.modal-card {
  background: #fff;
  border-radius: 10px;
  width: 80%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-height: 90vh;
  height: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
  padding: 10px 15px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 15px;
  gap: 16px;
}
.modal-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #555;
}
.modal-close:hover {
  color: #000;
}
.modal-download {
  background: #2271b1;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.modal-download:hover {
  background: #135e96;
}
.modal-body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  padding: 0;
}
.modal-body img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  margin: auto;
}

/* =============================
   상태 표시등
   ============================= */
.status-text {
  font-size: 14px;
  font-weight: 500;
}
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: default; /* 버튼 인식 제거 */
  user-select: none;
}

.status-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
/* 보류 / 처리 전 */
.status-pending::before {
  background-color: #f59e0b;
}

/* 요청됨 */
.status-requested::before {
  background-color: #3b82f6;
}

/* 제작 중 */
.status-placed::before {
  background-color: #8b5cf6;
}
/* 제작 중 */
.status-confirmed::before {
  background-color: #22c55e;
}
/* 취소 */
.status-canceled::before {
  /* background-color: #6b7280; */
  background-color: #d90000;
}

/* ====================
  background-color: #842029;=========
   첫번째 디자인 전체 적용
   ============================= */
.same-design-box {
  width: 100%; /* 핵심 */
  box-sizing: border-box; /* 핵심 */
  padding: 16px 18px;

  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.same-design-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.same-design-text strong {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.same-design-text p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

/* 버튼은 기존 WP 스타일을 살리고 약간만 커스텀 */
.same-design-btn {
  min-width: 180px;
  height: 38px;
  padding: 0 14px;

  font-size: 13px;
  font-weight: 600;

  border-radius: 6px;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  background-color: #e5533d;
}

/* hover 강조 */
.same-design-btn:hover {
  background-color: #d84a35;
}

/* =============================
   반응형 (모바일 최적화)
   ============================= */
@media (max-width: 768px) {
  .order-detail-wrapper {
    flex-direction: column;
    gap: 16px;
  }
  .product-info-row,
  .slot-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .slot-row button,
  .bulk-btn {
    width: 100%;
    text-align: center;
  }
  .toggle-btn {
    min-width: 60px;
    /* height: 30px; */
    font-size: 11px;
  }
  #order-note {
    max-width: 90%;
  }

  .order-card-header {
    font-size: 13px;
    padding: 12px;
  }

  .order-card-body {
    font-size: 13px;
    padding: 14px;
  }
  .same-design-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
