/* VCB Main Styles - 리팩토링 버전 */

/* PGALL 플러그인이 한국 실정에 맞지 않아 숨기는 필드들을 실제로 보이지 않게 처리합니다. */
.mshop-disable-kr {
  display: none !important;
}

/* 가격 표시 줄바꿈 방지 */
.woocommerce-Price-amount,
.woocommerce-Price-amount.amount {
  white-space: nowrap !important;
  display: inline !important; /* inline-block이 아닌 inline으로 변경 */
}

.woocommerce-Price-currencySymbol {
  white-space: nowrap !important;
  display: inline !important;
}

/* 쿠폰 정보 내 가격이 포함된 span도 처리 */
.mscp-coupon-info span,
.mscp-coupon-popup span {
  display: inline !important;
}

/* 가격을 포함한 전체 문장에 nowrap 적용 */
.mscp-coupon-info span:has(.woocommerce-Price-amount) {
  white-space: normal !important; /* 전체 문장은 normal로 */
  display: inline !important;
}

/* 포인트 적립 안내 스타일 */
.vcb-point-notice-wrapper {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #e2e8f0;
}

.vcb-point-notice {
  display: flex;
  align-items: center;
  background: #fff5f5;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #fee;
}

.vcb-point-message {
  color: #fa5250;
  font-weight: 600;
  font-size: 14px;
}

.vcb-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fa5250;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
}

:root {
  /* Checkout theme colors matching vcb-shortcodes.css */
  --vcb-primary: #fa5250;
  --vcb-primary-rgb: 90, 103, 216;
  --vcb-primary-hover: #4c51bf;
  --vcb-secondary: #6c757d;
  --vcb-success: #48bb78;
  --vcb-warning: #ed8936;
  --vcb-danger: #f56565;
  --vcb-info: #4299e1;

  --vcb-text: #2d3748;
  --vcb-text-light: #718096;
  --vcb-text-lighter: #a0aec0;

  --vcb-background: #f7fafc;
  --vcb-border: #e2e8f0;
  --vcb-border-light: #edf2f7;

  --vcb-radius: 12px;
  --vcb-radius-sm: 8px;
  --vcb-radius-lg: 16px;

  --vcb-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --vcb-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --vcb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --vcb-transition: all 0.3s ease;
}

/* 기본 스타일 리셋 */
.vcb-test-box,
.vcb-cart-wrapper,
.vcb-checkout-wrapper,
.vcb-form-section,
.vcb-shipping-selector,
.vcb-gift-section,
.vcb-no-gifts,
.vcb-payment-methods {
  box-sizing: border-box;
}

.vcb-test-box *,
.vcb-cart-wrapper *,
.vcb-checkout-wrapper *,
.vcb-form-section *,
.vcb-shipping-selector *,
.vcb-gift-section *,
.vcb-no-gifts *,
.vcb-payment-methods * {
  box-sizing: border-box;
}

/* 테스트 박스 */
.vcb-test-box {
  background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
  color: #155724;
  padding: 20px;
  border-radius: var(--vcb-radius);
  border: 1px solid #c3e6cb;
  margin: 20px 0;
  text-align: center;
}

.vcb-test-box h3 {
  margin: 0 0 15px 0;
  font-size: 1.2rem;
}

/* 공통 버튼 스타일 */
.vcb-btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: var(--vcb-radius-sm);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: var(--vcb-transition);
  line-height: 1.4;
}

.vcb-btn-primary {
  background: var(--vcb-primary);
  color: white;
}

.vcb-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--vcb-shadow-md);
}

.vcb-btn-secondary {
  background: var(--vcb-secondary);
  color: white;
}

.vcb-btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.vcb-btn-outline {
  background: transparent;
  color: var(--vcb-primary);
  border: 2px solid var(--vcb-primary);
}

.vcb-btn-outline:hover {
  background: var(--vcb-primary);
  color: white;
  transform: translateY(-1px);
}

.vcb-btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.vcb-btn-large {
  padding: 18px 32px;
  font-size: 18px;
  font-weight: 700;
}

.vcb-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 공통 폼 스타일 - vcb-shortcodes.css와 통일 */
.vcb-form-section,
.vcb-mshop-coupon-checkout-ui,
.vcb-point-section,
.vcb-gift-section-wrapper,
.vcb-payment-methods-section,
.vcb-order-summary-shortcode-wrapper {
  background: #fff;
  border-radius: var(--vcb-radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid var(--vcb-border-light);
  transition: var(--vcb-transition);
}

.vcb-form-section:hover,
.vcb-mshop-coupon-checkout-ui:hover,
.vcb-point-section:hover,
.vcb-gift-section-wrapper:hover,
.vcb-payment-methods-section:hover,
.vcb-order-summary-shortcode-wrapper:hover {
}

/* 각 섹션의 제목 스타일 */

.vcb-form-section h3,
.vcb-mshop-coupon-section-wrapper h4,
.vcb-point-section-wrapper h4,
.vcb-gift-section-wrapper h3,
.vcb-payment-methods-section h4,
.vcb-order-summary-wrapper h3,
.vcb-checkout-cart-items h3 {
  font-size: 18px !important;
  font-weight: 700;
  color: var(--vcb-text) !important;
  margin: 5px 0 24px 0 !important;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--vcb-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.vcb-form-section h3::before,
.vcb-mshop-coupon-section-wrapper h4::before,
.vcb-point-section-wrapper h4::before,
.vcb-gift-section-wrapper h3::before,
.vcb-payment-methods-section h4::before,
.vcb-order-summary-wrapper h3::before,
.vcb-checkout-cart-items h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 24px;
  background: var(--vcb-primary);
  border-radius: 2px;
}

/* Checkout Form Layout */
.vcb-form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4%; /* 수직 간격은 0, 수평 간격은 4% */
}

/* 우커머스 표준 클래스를 Flexbox에 맞게 조정 */
.vcb-form-grid .form-row-wide {
  width: 100%;
  clear: both;
  margin-block-start: 0.75em;
  margin-block-end: 0.75em;
}

p#mshop_shipping_address-addr2_field {
    margin-bottom: 2em;
}

.vcb-form-grid .form-row-first,
.vcb-form-grid .form-row-last {
  width: 100%; /* 100% - 4% gap = 96% / 2 = 48% */
  clear: none;
  margin-block-start: 0.75em;
  margin-block-end: 0.75em;
}

.vcb-form-grid .form-row-last {
  margin-right: 0;
}

/* PGALL 주소 필드 그룹을 위한 스타일 */
#mshop_billing_address-postnum_field,
#mshop_shipping_address-postnum_field {
  display: block !important;
  width: 100%;
  margin-bottom: 0.75em !important;
}

/* 주소 레이블 스타일 */
#mshop_billing_address-postnum_field label,
#mshop_shipping_address-postnum_field label {
  display: block !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--vcb-text);
  margin-bottom: 8px !important;
}

/* 우편번호 입력란과 버튼을 감싸는 컨테이너 */
#mshop_billing_address-postnum_field::after,
#mshop_shipping_address-postnum_field::after {
  content: "";
  display: table;
  clear: both;
}

#mshop_billing_address-postnum_field .input-text,
#mshop_shipping_address-postnum_field .input-text {
  width: 140px !important;
  float: left;
  margin-right: 10px !important;
  margin-bottom: 0 !important;
}

#mshop_billing_address-postnum_field .ms_addr_1,
#mshop_shipping_address-postnum_field .ms_addr_1 {
  display: inline-block;
  float: left;
  padding: 12px 20px !important;
  height: 47px;
  background: var(--vcb-primary) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer;
  text-decoration: none !important;
  line-height: 1.5;
  font-weight: 500;
  transition: var(--vcb-transition);
}

#mshop_billing_address-postnum_field .ms_addr_1:hover,
#mshop_shipping_address-postnum_field .ms_addr_1:hover {
  background: var(--vcb-primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(250, 82, 80, 0.25);
}

/* 주소 필드 간격 조정 */
#mshop_billing_address-addr1_field,
#mshop_shipping_address-addr1_field {
  width: 100%;
  clear: both;
  margin-bottom: 0.75em !important;
}

#mshop_billing_address-addr2_field,
#mshop_shipping_address-addr2_field {
  width: 100%;
}

/* 주소 입력 필드 스타일 통일 */
#mshop_billing_address-addr1_field input,
#mshop_shipping_address-addr1_field input,
#mshop_billing_address-addr2_field input,
#mshop_shipping_address-addr2_field input {
  width: 100% !important;
}

.vcb-form-field {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vcb-form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--vcb-text);
  margin-bottom: 8px;
}

.vcb-form-field label .required {
  color: var(--vcb-danger);
}

.vcb-form-field input,
.vcb-form-field select,
.vcb-form-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--vcb-border);
  border-radius: var(--vcb-radius-sm);
  font-size: 16px;
  transition: var(--vcb-transition);
  background: #fff;
  color: var(--vcb-text);
}

.vcb-form-field input:focus,
.vcb-form-field select:focus,
.vcb-form-field textarea:focus {
  outline: none;
  border-color: var(--vcb-primary);
  box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
}

.vcb-form-field input[readonly] {
  background: #f8f9fa;
  cursor: pointer;
}

/* 필드 크기 조절 */
.vcb-field-third {
  flex: 1;
}

.vcb-field-two-thirds {
  flex: 2;
}

.vcb-field-half {
  flex: 1;
}

.vcb-field-full {
  width: 100%;
}

/* 우편번호 그룹 */
.vcb-postcode-group {
  display: flex;
  gap: 8px;
}

.vcb-postcode-group input {
  flex: 1;
}

.vcb-postcode-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* 에러 메시지 */
.vcb-error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: var(--vcb-radius);
  border: 1px solid #f5c6cb;
  margin: 20px 0;
}

.vcb-login-required {
  background: #fff3cd;
  color: #856404;
  padding: 15px;
  border-radius: var(--vcb-radius);
  border: 1px solid #ffeaa7;
  margin: 20px 0;
  text-align: center;
}

.vcb-disabled {
  background: #e2e3e5;
  color: #6c757d;
  padding: 15px;
  border-radius: var(--vcb-radius);
  border: 1px solid #d6d8db;
  margin: 20px 0;
  text-align: center;
}

/* 장바구니 빈 상태 */
.vcb-cart-empty {
  background: white;
  padding: 40px;
  border-radius: var(--vcb-radius);
  box-shadow: var(--vcb-shadow);
  text-align: center;
  margin: 20px 0;
}

.vcb-cart-empty h3 {
  color: var(--vcb-text-light);
  margin-bottom: 10px;
}

.vcb-cart-empty p {
  color: var(--vcb-text-lighter);
  margin-bottom: 20px;
}

/* Payment Methods Section Styles */
#payment.woocommerce-checkout-payment,
.vcb-payment-methods-section #payment {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

#payment .payment_methods {
  list-style: none !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
  border: none !important;
}

#payment .payment_methods li {
  margin: 0 0 8px !important;
  padding: 0 !important;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

#payment .payment_methods li.payment_method_payco input[type="radio"],
#payment .payment_methods li input[type="radio"] {
  position: absolute;
  opacity: 0;
}

#payment .payment_methods li label {
  display: flex;
  align-items: center;
  padding: 10px 0;
  margin: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--vcb-text);
  position: relative;
}

#vcb-coupon-popup-container {
  display: none;
}

#payment .payment_methods li label::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

#payment .payment_methods li input[type="radio"]:checked + label::before {
  border-color: var(--vcb-primary);
  background: var(--vcb-primary);
  box-shadow: inset 0 0 0 4px white;
}

#payment .payment_methods li label img {
  max-height: 24px;
  margin-left: auto;
}

#payment .payment_box {
  background: #f8f9fa !important;
  border: none !important;
  border-radius: 8px !important;
  margin: -1px 0 0 !important;
  padding: 20px !important;
  box-shadow: none !important;
}

#payment .payment_box p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--vcb-text-light);
  margin-bottom: 12px;
}

#payment .payment_box p:last-child {
  margin-bottom: 0;
}

/* Place Order Button */
#payment #place_order {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  background: var(--vcb-primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

#payment #place_order:hover {
  transform: translateY(-2px);
}

#payment #place_order:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Terms and Conditions */
#payment .form-row.place-order {
  margin: 0;
  padding: 0;
}

#payment .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 20px;
}

#payment .woocommerce-terms-and-conditions-checkbox-text {
  font-size: 14px;
  color: var(--vcb-text);
}

/* Remove extra borders and shadows */
.woocommerce-checkout #payment {
  background: transparent;
}

.woocommerce-checkout #payment div.payment_box {
  background: #f8f9fa;
}

.woocommerce-checkout #payment div.payment_box::before {
  display: none;
}

.woocommerce-checkout #payment ul.payment_methods {
  border: none;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .vcb-form-row {
    flex-direction: column;
  }

  .vcb-form-section {
    padding: 15px;
    margin: 15px 0;
  }

  .vcb-postcode-group {
    flex-direction: column;
  }

  .vcb-btn-large {
    width: 100%;
    padding: 12px;
  }

  /* 모바일에서 주소 필드 스타일 */
  #mshop_billing_address-postnum_field .input-text,
  #mshop_shipping_address-postnum_field .input-text {
    width: calc(50% - 5px) !important;
  }

  #mshop_billing_address-postnum_field .ms_addr_1,
  #mshop_shipping_address-postnum_field .ms_addr_1 {
    text-align: center;
    padding: 12px 10px !important;
  }
}

@media (max-width: 480px) {
  :root {
    --vcb-radius: 8px;
  }

  .vcb-form-section {
    padding: 20px 16px;
    margin: 10px 0;
  }

  .vcb-btn {
    padding: 12px;
  }
}

/* 애니메이션 */
.vcb-fade-in {
  animation: vcbFadeIn 0.3s ease-in-out;
}

@keyframes vcbFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vcb-slide-down {
  animation: vcbSlideDown 0.3s ease-in-out;
}

@keyframes vcbSlideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
  }
}

/* 로딩 상태 */
.vcb-loading {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.vcb-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--vcb-border);
  border-top-color: var(--vcb-primary);
  border-radius: 50%;
  animation: vcbSpin 1s linear infinite;
}

@keyframes vcbSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 접근성 개선 */
.vcb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 포커스 표시 개선 */
.vcb-btn:focus,
.vcb-form-field input:focus,
.vcb-form-field select:focus,
.vcb-form-field textarea:focus {
  outline: 2px solid var(--vcb-primary);
  outline-offset: 2px;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
  :root {
    --vcb-primary: #000;
    --vcb-border: #000;
    --vcb-text: #000;
  }

  .vcb-btn-primary {
    background: #000;
    border: 2px solid #000;
  }

  .vcb-form-field input,
  .vcb-form-field select,
  .vcb-form-field textarea {
    border: 2px solid #000;
  }
}

/* MShop Gifts Integration Styles */
.vcb-gift-section-wrapper {
  margin-bottom: 2em;
}

.vcb-gift-section-wrapper h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5em;
  color: #333;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

.vcb-gift-rule-wrapper {
  margin-bottom: 20px;
}
.vcb-gift-rule-wrapper:last-child {
  margin-bottom: 0;
}

.vcb-gift-rule-wrapper .item-title {
  font-weight: bold;
  margin-bottom: 15px;
  color: #555;
}

@keyframes pop-in {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  80% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Loading Overlay */
.vcb-gift-section-wrapper.vcb-loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative; /* Ensure the loader is positioned correctly */
}

.vcb-gift-section-wrapper.vcb-loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 10;
}

.vcb-gift-section-wrapper.vcb-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  margin-left: -20px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0073e6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 11;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 결제 수단 선택 UI 개선 */
.vcb-payment-methods-section .vcb-payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vcb-payment-methods-section .vcb-payment-option {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid var(--vcb-border);
  border-radius: 8px;
  transition: var(--vcb-transition);
  cursor: pointer;
}

.vcb-payment-methods-section .vcb-payment-option:hover {
  border-color: var(--vcb-primary);
}

.vcb-payment-methods-section .vcb-payment-option input[type="radio"] {
  margin-right: 15px;
}

.vcb-payment-methods-section .vcb-payment-option img {
  max-height: 24px !important; /* Important to override inline styles */
  margin-right: 10px;
}

.vcb-payment-methods-section .vcb-payment-option .vcb-payment-box {
  background: var(--vcb-background);
  padding: 15px;
  margin-top: 15px;
  border-radius: 8px;
}

/* 주문 요약 테이블 디자인 개선 */
.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  padding: 15px;
  text-align: left;
}

.woocommerce-checkout-review-order-table thead th {
  font-weight: 600;
}

.woocommerce-checkout-review-order-table tfoot tr:last-child th,
.woocommerce-checkout-review-order-table tfoot tr:last-child td {
  border-bottom: none;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--vcb-primary);
}

.woocommerce-checkout-review-order-table
  .order-total
  .woocommerce-Price-amount {
  font-size: 1.4rem;
}

/* Place Order Section */
#payment.woocommerce-checkout-payment {
  border-radius: var(--vcb-radius);
  padding: 20px;
}

#payment .wc_payment_methods {
  border: none;
  padding: 0;
}

#payment #place_order {
  width: 100%;
  padding: 15px;
  font-size: 1.2rem;
  font-weight: 700;
  background-color: var(--vcb-primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--vcb-transition);
  margin-top: 20px;
}

.woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid var(--vcb-border);
  border-radius: 8px;
  background: white;
}

/* --- Checkout Form General Input Styling --- */
.vcb-checkout-form .form-row .input-text,
.vcb-checkout-form .form-row select,
.vcb-checkout-form .form-row textarea {
  padding: 12px 15px !important;
  border: 1px solid var(--vcb-border) !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  transition: var(--vcb-transition) !important;
  background: #f7f7f7 !important;
  width: 100% !important;
  box-shadow: none !important;
  height: 45px; /* 높이 초기화 */
}

.vcb-checkout-form .form-row .input-text:focus,
.vcb-checkout-form .form-row select:focus,
.vcb-checkout-form .form-row textarea:focus {
  outline: none !important;
  border-color: var(--vcb-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--vcb-primary-rgb), 0.1) !important;
}

.vcb-checkout-form .form-row label {
  font-weight: 500;
  margin-bottom: 8px;
  display: inline-block;
}

/* "다른 주소로 배송" 체크박스 영역 스타일 */
.vcb-shipping-fields-section .vcb-ship-to-different-address {
  padding: 15px;
  background-color: var(--vcb-background);
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  border: 1px solid var(--vcb-border);
}

.vcb-shipping-fields-section .vcb-ship-to-different-address label {
  margin: 0 0 0 10px;
  font-weight: 500;
}

/* --- MShop Coupon Modal Styles --- */

.vcb-show-coupon-modal-button {
  width: 100%;
  padding: 12px;
  background-color: var(--vcb-secondary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--vcb-transition);
}

.vcb-show-coupon-modal-button:hover {
  background-color: #5a6268;
}

.vcb-applied-coupons {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--vcb-border);
}

.vcb-applied-coupons h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 10px;
}

.applied-coupon-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.applied-coupon-list .vcb-remove-coupon-button {
  color: var(--vcb-danger);
  font-weight: 500;
  text-decoration: none;
  font-size: 13px;
}

/* Modal Overlay */
.vcb-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.vcb-modal-content {
  background-color: white;
  padding: 30px;
  border-radius: var(--vcb-radius);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: vcbFadeIn 0.3s ease;
}

.vcb-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s ease;
}
.vcb-modal-close:hover {
  color: #333;
}

.vcb-modal-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--vcb-border);
}

.vcb-available-coupon-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vcb-available-coupon-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--vcb-border);
}
.vcb-available-coupon-list li:last-child {
  border-bottom: none;
}

.vcb-available-coupon-list .coupon-info {
  display: flex;
  flex-direction: column;
}

.vcb-available-coupon-list .coupon-code {
  font-weight: 600;
  font-size: 1.1em;
  color: var(--vcb-primary);
}

.vcb-available-coupon-list .coupon-description {
  font-size: 0.9em;
  color: var(--vcb-text-light);
  margin-top: 4px;
}

.vcb-available-coupon-list .vcb-apply-coupon-button {
  padding: 8px 15px;
  font-size: 13px;
  white-space: nowrap;
}

.vcb-coupon-list-container .loading-message,
.vcb-coupon-list-container .error-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--vcb-text-light);
}

.vcb-coupon-list-container .error-message {
  color: var(--vcb-danger);
}

.vcb-available-coupon-list li.coupon-invalid {
  opacity: 0.6;
  background-color: #f9f9f9;
}

.vcb-available-coupon-list li.coupon-invalid .coupon-info .coupon-code {
  text-decoration: line-through;
}

.vcb-available-coupon-list li.coupon-invalid .vcb-apply-coupon-button {
  background-color: var(--vcb-text-lighter);
  border-color: var(--vcb-text-lighter);
  cursor: not-allowed;
}

.vcb-available-coupon-list .coupon-error-reason {
  font-size: 0.85em;
  color: var(--vcb-danger);
  margin-top: 5px;
}

/* mshop-coupon이 제공하는 버튼에 대한 기본 스타일 보정 */
.mshop-coupon-check-button {
  width: 100%;
  padding: 12px;
  background-color: var(--vcb-secondary);
  color: white !important; /* mshop-coupon의 인라인 스타일을 재정의하기 위해 !important 사용 */
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  transition: var(--vcb-transition);
  text-decoration: none; /* a 태그일 경우를 대비 */
  display: inline-block; /* a 태그일 경우를 대비 */
  line-height: normal; /* a 태그일 경우를 대비 */
}

.mshop-coupon-check-button:hover {
  background-color: #5a6268;
}

/* mshop-coupon의 모달 스타일을 일부 재정의하여 VCB 디자인과 통일성 유지 */
#mshop-coupon-modal .mshop-modal-content {
  background-color: white;
  padding: 30px;
  border-radius: var(--vcb-radius);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#mshop-coupon-modal .mshop-modal-title {
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--vcb-border);
}

/* VCB 내에서 적용된 쿠폰 목록 스타일 (mshop-coupon이 자체적으로 렌더링할 때 대비) */
.woocommerce-checkout-review-order .cart-discount .coupon-name,
.vcb-applied-coupons .coupon-name {
  /* 다양한 상황에 대응 */
  font-weight: bold;
  color: var(--vcb-primary);
}

.woocommerce-checkout-review-order .cart-discount .woocommerce-remove-coupon,
.vcb-applied-coupons .woocommerce-remove-coupon {
  color: var(--vcb-danger);
  font-weight: 500;
  text-decoration: none;
  font-size: 13px;
}

/* VCB Checkout Page General Styles */
.vcb-checkout-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.vcb-checkout-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vcb-checkout-section h3 {
  font-size: 1.3em;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Form Grid Layout */

.vcb-form-grid .form-row-wide {
  grid-column: 1 / -1;
}

/* Order Summary Styles (Moved from vcb-review-order.php) */
.vcb-order-summary-shortcode-wrapper .product-thumbnail img {
  width: 60px;
  height: auto;
  border-radius: 4px;
  border: 1px solid #eee;
}

.vcb-order-summary-shortcode-wrapper .product-name {
  vertical-align: middle;
}

.vcb-order-summary-shortcode-wrapper .product-thumbnail {
  width: 80px;
  padding-right: 15px !important;
  vertical-align: middle;
}

.vcb-order-summary-shortcode-wrapper .vcb-cart-is-empty {
  padding: 20px;
  text-align: center;
}

/* 야한박스제거 안내 박스 */
.vcb-adult-box-removal-notice {
  background: #ffe6e6;
  border: 1px solid #ffcccc;
  border-radius: 8px;
  padding: 20px 10px;
  margin-top: 0.75em;
  position: relative;
}

.vcb-adult-box-removal-notice h4 {
  color: #ff0000;
  font-size: 16px !important;
  font-weight: 600;
  margin: 0 0 5px 0;
  padding-left: 25px;
  position: relative;
}

.vcb-adult-box-removal-notice h4::before {
  content: "•";
  position: absolute;
  left: 10px;
  color: #ff0000;
  font-size: 20px;
  line-height: 1;
}

.vcb-adult-box-removal-notice p {
  color: #666666;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  padding-left: 20px;
}
