/**
 * WC Quick Buy - Commerce Skin
 * Simple & Clean Design
 */

/* ===== VARIABLES ===== */
:root {
  --brand: #6a467e;
  --success: #FFA900;
  --danger: #d0021b;
  --border: #ddd;
  --text: #333;
  --bg: #f9f9f9;
}

/* ===== MODAL ===== */
.wcqbcskin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
}

.wcqbcskin-modal.open {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

/* ===== CARD ===== */
.wcqbcskin-card {
  background: #fff;
  border-radius: 12px;
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* ===== HEADER ===== */
.wcqbcskin-head {
  background: #6A467E!important;
  color: #fff;
  padding: 0px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wcqbcskin-head__title {
  font-size: 18px;
  font-weight: 500;
  flex: 1;
}

.wcqbcskin-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 20px;
  border-radius: 6px;
  cursor: pointer;
}

.wcqbcskin-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== BODY ===== */
.wcqbcskin-body {
  display: grid;
  grid-template-columns: 325px 1fr;
  gap: 20px;
  padding: 20px;
  padding-bottom: 10px;
}

/* ===== PRODUCT INFO ===== */
.wcqbcskin-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wcqbcskin-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.wcqbcskin-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wcqbcskin-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.wcqbcskin-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--danger);
}

/* ===== QUANTITY ===== */
.wcqbcskin-qty {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.wcqbcskin-qty-control {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.wcqbcskin-qty-btn {
  background: #fff;
  border: none;
  width: 32px !important;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  margin: 0 !important;
  padding: 0 !important;
}

.wcqbcskin-qty-btn:hover {
  background: #6a467e !important;
}

#wcqbcskin-qty {
  width: 45px !important;
  text-align: center;
  border: none !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  font-size: 15px;
  font-weight: 600;
  padding: 0 !important;
  margin: 0 !important;
}

/* ===== TOTAL ===== */
.wcqbcskin-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff8e6;
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px dashed #fbbf24;
  font-size: 14px;
}

.wcqbcskin-total strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--danger);
}

/* ===== FORM ===== */
.wcqbcskin-form {
  display: flex;
  flex-direction: column;
}

.wcqbcskin-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.wcqbcskin-form input,
.wcqbcskin-form textarea,
.wcqbcskin-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6bebe !important;
  border-radius: 6px !important;
  font-size: 14px !important;
	height: 2em !important;
  box-sizing: border-box;
}

.wcqbcskin-form input:focus,
.wcqbcskin-form textarea:focus,
.wcqbcskin-form select:focus {
  outline: none;
  border-color: var(--brand);
}

.wcqbcskin-form textarea {
  resize: vertical;
  min-height: 70px;
}

.wcqbcskin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== PAYMENT ===== */

.wcqbcskin-payment-radio p {
  font-weight: 600;
  margin: 0 0 10px;
  font-size: 14px;
}

.wcqbcskin-payment-radio label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500 !important;
  font-size: 12px;
  margin-bottom: 8px !important;
  cursor: pointer;
  padding-left: 8px;
padding-right: 8px;
  border-radius: 6px;
}

.wcqbcskin-payment-radio label:hover {
  background: rgba(193, 21, 131, 0.05);
}

.wcqbcskin-payment-radio input[type="radio"] {
  width: 18px !important;
  height: 18px;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
}

/* ===== SUBMIT ===== */
.wcqbcskin-submit,
.button.wcqbcskin-submit {
  background: var(--success) !important;
  color: #fff !important;
  border: none !important;
  padding: 14px !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  margin: 0 !important;
}

.wcqbcskin-submit:hover:not(:disabled) {
  background: #6a467e !important;
}

.wcqbcskin-submit:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* ===== MESSAGES ===== */
.wcqbcskin-response {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}

.wcqbcskin-response.ok {
  background: #d1fae5;
  color: #065f46;
  display: block;
}

.wcqbcskin-response.err {
  background: #fee2e2;
  color: #991b1b;
  display: block;
}

/* ===== SUCCESS ===== */
.wcqbcskin-success {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  z-index: 20;
}

.wcqbcskin-success.active {
  display: flex;
}

.wcqbcskin-success__box {
  text-align: center;
  padding: 40px;
}

.wcqbcskin-success__icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.wcqbcskin-success__title {
  font-size: 24px;
  font-weight: 800;
  color: var(--success);
  margin-bottom: 8px;
}

.wcqbcskin-success__sub {
  font-size: 15px;
  color: #666;
}

/* ===== FOOTER ===== */
.wcqbcskin-form > p {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin: 0 !important;
}

.wcqbcskin-form > p a {
  color: #0068ff;
  font-weight: 700;
  text-decoration: none;
}

/* ===== CTA BUTTON ===== */
.wcqbcskin-btn.wcqbcskin-btn--cta.button {
  /* layout */
  display: inline-grid;
  grid-auto-rows: min-content;
  gap: 6px;
  width: 100%;
  max-width: 640px; /* co lại cho cân */
  margin: 0 auto;
  padding: 14px 18px;

  /* look & feel */
  border: 0;
  border-radius: 12px;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.wcqbcskin-btn--cta .wcqbcskin-btn__text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.1;
}

.wcqbcskin-btn--cta .wcqbcskin-btn__sub {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0.92;
}

/* Hover/active */
.wcqbcskin-btn--cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  filter: saturate(1.05) brightness(1.03);
}
.wcqbcskin-btn--cta:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* Focus (a11y) */
.wcqbcskin-btn--cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7),
    0 0 0 6px color-mix(in srgb, var(--wcqbcskin-brand, #7b57a6), #fff 30%);
}

/* Disabled */
.wcqbcskin-btn--cta[disabled],
.wcqbcskin-btn--cta.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


/* ==== FIX TRẮNG TRƠN MOBILE (override mạnh) ==== */
@media (max-width: 768px) {

  /* Card + body phải cuộn được */
  .wcqbcskin-card{
    max-height: 94vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .wcqbcskin-body{
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 12px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Left: ảnh + info (KHÔNG dùng grid) */
  .wcqbcskin-left{
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .wcqbcskin-img{
    flex: 0 0 84px !important;
    width: 84px !important;
    height: 84px !important;
  }

  .wcqbcskin-summary{
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  /* Qty + Total không bị lệch */
  .wcqbcskin-qty{
    width: 100% !important;
    margin-top: 8px !important;
  }

  .wcqbcskin-total{
    width: 100% !important;
    margin-top: 8px !important;
  }

  /* Form phải hiện + không bị collapse */
  .wcqbcskin-form{
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .wcqbcskin-form-row{
    grid-template-columns: 1fr !important;
  }

  /* Input mobile chuẩn */
  .wcqbcskin-form input,
  .wcqbcskin-form select{
    height: 44px !important;
    font-size: 16px !important;
  }

  .wcqbcskin-form textarea{
    min-height: 90px !important;
    font-size: 16px !important;
  }
}