/* ── WC Quote Button — Public Styles ──────────────────────────── */

/* ── Button base ────────────────────────────────────────────────── */
.wcqb-product-wrap,
.wcqb-cart-wrap {
  margin-top: 12px;
}

.wcqb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
  text-decoration: none;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.wcqb-button:active {
  transform: translateY(1px);
}

.wcqb-btn-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── Style: Solid ───────────────────────────────────────────────── */
.wcqb-button.wcqb-style-solid {
  background: #222;
  color: #fff;
  border-color: #222;
}
.wcqb-button.wcqb-style-solid:hover {
  background: #444;
  border-color: #444;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

/* ── Style: Outline ─────────────────────────────────────────────── */
.wcqb-button.wcqb-style-outline {
  background: transparent;
  color: #222;
  border-color: #222;
}
.wcqb-button.wcqb-style-outline:hover {
  background: #222;
  color: #fff;
}

/* ── Style: Ghost ───────────────────────────────────────────────── */
.wcqb-button.wcqb-style-ghost {
  background: transparent;
  color: #555;
  border-color: #ddd;
}
.wcqb-button.wcqb-style-ghost:hover {
  border-color: #999;
  color: #222;
  background: #f8f8f8;
}

/* ── Style: Custom — inline styles handle colors, no extra CSS needed ─ */

/* ── Ripple effect ──────────────────────────────────────────────── */
.wcqb-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s;
}
.wcqb-button:hover::after {
  background: rgba(255,255,255,.06);
}

/* ── Modal backdrop ─────────────────────────────────────────────── */
.wcqb-modal {
  position: fixed;
  inset: 0;
  z-index: 999990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wcqb-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  cursor: pointer;
}

/* ── Modal box ──────────────────────────────────────────────────── */
.wcqb-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .wcqb-modal {
    align-items: flex-end;
    padding: 0;
  }
  .wcqb-modal-box {
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }
}

/* ── Modal header ───────────────────────────────────────────────── */
.wcqb-modal-header {
  padding: 28px 28px 0;
}

.wcqb-modal-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
}

.wcqb-modal-subtitle {
  margin: 0;
  font-size: 13px;
  color: #777;
  line-height: 1.6;
}

/* ── Close button ───────────────────────────────────────────────── */
.wcqb-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f5f5f5;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555;
  transition: background .15s, color .15s;
  z-index: 2;
  padding: 0;
}
.wcqb-modal-close:hover {
  background: #e8e8e8;
  color: #111;
}

/* ── Context summary ────────────────────────────────────────────── */
.wcqb-context-summary {
  margin: 16px 28px 0;
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #555;
}

.wcqb-context-summary strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
  margin-bottom: 6px;
}

.wcqb-context-summary .wcqb-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  border-bottom: 1px solid #f0f0f0;
}
.wcqb-context-summary .wcqb-item:last-child { border-bottom: none; }
.wcqb-context-summary .wcqb-item-total {
  font-weight: 700;
  color: #222;
  border-top: 2px solid #eee;
  padding-top: 6px;
  margin-top: 4px;
}

/* ── CF7 form inside modal ──────────────────────────────────────── */
.wcqb-modal-form {
  padding: 20px 28px 28px;
  flex: 1;
}

.wcqb-modal-form .wpcf7 { margin: 0; }

.wcqb-modal-form .wpcf7-form-control-wrap {
  display: block;
  margin-bottom: 14px;
}

.wcqb-modal-form input[type="text"],
.wcqb-modal-form input[type="email"],
.wcqb-modal-form input[type="tel"],
.wcqb-modal-form input[type="number"],
.wcqb-modal-form select,
.wcqb-modal-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
  color: #222;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}

.wcqb-modal-form input:focus,
.wcqb-modal-form select:focus,
.wcqb-modal-form textarea:focus {
  outline: none;
  border-color: #222;
  box-shadow: 0 0 0 3px rgba(34,34,34,.08);
}

.wcqb-modal-form textarea { min-height: 90px; resize: vertical; }

.wcqb-modal-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #444;
  margin-bottom: 5px;
  letter-spacing: .02em;
}

.wcqb-modal-form .wpcf7-submit {
  display: block;
  width: 100%;
  padding: 13px;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s;
  margin-top: 4px;
}
.wcqb-modal-form .wpcf7-submit:hover { background: #444; }

.wcqb-modal-form .wpcf7-response-output {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 13px;
}
.wcqb-modal-form .wpcf7-mail-sent-ok {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}
.wcqb-modal-form .wpcf7-validation-errors,
.wcqb-modal-form .wpcf7-acceptance-missing,
.wcqb-modal-form .wpcf7-mail-sent-ng {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* ── Animations ─────────────────────────────────────────────────── */

/* Slide up */
.wcqb-anim-slide_up .wcqb-modal-box {
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(.22,.68,0,1.2), opacity 0.25s ease;
}
.wcqb-modal.wcqb-open .wcqb-anim-slide_up .wcqb-modal-box,
.wcqb-anim-slide_up.wcqb-open .wcqb-modal-box {
  transform: translateY(0);
  opacity: 1;
}

/* Fade */
.wcqb-anim-fade .wcqb-modal-box {
  opacity: 0;
  transition: opacity 0.25s ease;
}
.wcqb-anim-fade.wcqb-open .wcqb-modal-box {
  opacity: 1;
}

/* Scale */
.wcqb-anim-scale .wcqb-modal-box {
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.2), opacity 0.22s ease;
}
.wcqb-anim-scale.wcqb-open .wcqb-modal-box {
  transform: scale(1);
  opacity: 1;
}

/* Overlay always fades */
.wcqb-modal-overlay {
  opacity: 0;
  transition: opacity 0.25s ease;
}
.wcqb-modal.wcqb-open .wcqb-modal-overlay {
  opacity: 1;
}

/* No-form state */
.wcqb-no-form {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 24px 0;
}

/* ── Toast notification ─────────────────────────────────────────── */
.wcqb-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #222;
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.wcqb-toast.wcqb-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Cart notice (quote-only mode) ──────────────────────────────── */
.wcqb-cart-notice {
  margin-bottom: 16px !important;
  font-size: 14px;
}

/* ── Mini-cart quote link ────────────────────────────────────────── */
.wcqb-widget-quote-btn {
  background: #222 !important;
  color: #fff !important;
  border-color: #222 !important;
}
.wcqb-widget-quote-btn:hover {
  background: #444 !important;
  border-color: #444 !important;
}
