/* Wind's Pasties Order Form — Block Styles */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Open+Sans:wght@400;500;600&display=swap');

#winds-pasties-order-root {
  --wp-red:          #ee3a43;
  --wp-red-dark:     #cc2f37;
  --wp-red-light:    #fff0f0;
  --wp-red-border:   #f9a0a4;
  --wp-red-text:     #7a1418;
  --wp-green:        #3a7d44;
  --wp-green-bg:     #edf7ee;
  --wp-green-text:   #1e5c28;
  --wp-gray-border:  #d4d4d4;
  --wp-gray-muted:   #666666;
  --wp-text:         #1a1a1a;
  --wp-card-bg:      #ffffff;
  --wp-radius:       8px;
  --wp-radius-sm:    6px;
  font-family: 'Open Sans', sans-serif;
  color: var(--wp-text);
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  font-size: 16px;
  line-height: 1.6;
}

/* Title */
.wp-order-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  text-align: center;
  color: var(--wp-text) !important;
  margin-bottom: 0.25rem !important;
  border: none !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}
.wp-order-sub {
  text-align: center;
  font-size: 16px;
  color: var(--wp-gray-muted);
  margin-bottom: 2rem !important;
  font-style: italic;
}

/* Steps */
.wp-steps { display: flex; align-items: center; justify-content: center; margin-bottom: 2.5rem; }
.wp-step { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--wp-gray-muted); font-weight: 500; }
.wp-step-num { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--wp-gray-border); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; transition: all 0.2s; flex-shrink: 0; }
.wp-step.active .wp-step-num { background: var(--wp-red); color: #fff; border-color: var(--wp-red); }
.wp-step.active { color: var(--wp-red); }
.wp-step.done .wp-step-num { background: var(--wp-green); color: #fff; border-color: var(--wp-green); }
.wp-step.done { color: var(--wp-green); }
.wp-step-label { display: none; }
@media(min-width: 480px) { .wp-step-label { display: inline; } }
.wp-step-line { width: 36px; height: 2px; background: var(--wp-gray-border); margin: 0 4px; flex-shrink: 0; }

/* Cards */
.wp-card { background: var(--wp-card-bg); border: 1px solid var(--wp-gray-border) !important; border-radius: var(--wp-radius); padding: 1.75rem; margin-bottom: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important; }
.wp-card-title { font-family: 'Playfair Display', Georgia, serif !important; font-size: 22px !important; font-weight: 600 !important; margin-bottom: 1.25rem !important; color: var(--wp-text) !important; border: none !important; padding: 0 !important; line-height: 1.3 !important; }

/* Geo */
.wp-geo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wp-geo-btn { border: 2px solid var(--wp-gray-border) !important; border-radius: var(--wp-radius); padding: 20px 16px; cursor: pointer; text-align: center; background: var(--wp-card-bg); transition: all 0.15s; font-family: inherit; width: 100%; }
.wp-geo-btn:hover { border-color: var(--wp-red) !important; background: var(--wp-red-light); }
.wp-geo-btn.selected { border-color: var(--wp-red) !important; border-width: 2px !important; background: var(--wp-red-light); }
.wp-geo-icon { margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }
.wp-geo-icon svg { width: 36px; height: 36px; stroke: var(--wp-red); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wp-geo-name { font-weight: 600; font-size: 17px; color: var(--wp-text); margin-bottom: 4px; }
.wp-geo-detail { font-size: 14px; color: var(--wp-gray-muted); line-height: 1.4; }

/* Delivery address */
#wp-deliveryAddrWrap { margin-top: 1.25rem; }

/* Pickup info box */
.wp-pickup-info { background: var(--wp-red-light); border: 1px solid var(--wp-red-border) !important; border-radius: var(--wp-radius-sm); padding: 16px 18px; margin-bottom: 1.25rem; font-size: 16px; color: var(--wp-red-text); display: flex; gap: 14px; align-items: flex-start; }
.wp-pickup-info strong { color: var(--wp-red-text); font-weight: 600; display: block; margin-bottom: 6px; font-size: 17px; }
.wp-pickup-info p { margin: 3px 0 !important; font-size: 15px; }
.wp-pickup-icon { flex-shrink: 0; line-height: 1.3; margin-top: 2px; }
.wp-pickup-icon svg { width: 22px; height: 22px; stroke: var(--wp-red); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wp-pickup-note { margin-top: 8px !important; font-size: 14px !important; opacity: 0.8; }

/* Pasty rows */
.wp-pasty-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #eeeeee; gap: 12px; }
.wp-pasty-row:last-of-type { border-bottom: none; padding-bottom: 0; }
.wp-pasty-info { flex: 1; min-width: 0; }
.wp-pasty-name { font-weight: 600; font-size: 17px; }
.wp-pasty-price { font-size: 15px; color: var(--wp-gray-muted); margin-top: 3px; }
.wp-bulk-badge { font-size: 12px; background: var(--wp-green-bg); color: var(--wp-green-text); padding: 3px 10px; border-radius: 20px; margin-left: 8px; display: none; font-weight: 600; }
.wp-bulk-badge.show { display: inline; }
.wp-qty-ctrl { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.wp-qty-btn { width: 36px; height: 36px; border-radius: 50% !important; border: 2px solid var(--wp-gray-border) !important; background: none; cursor: pointer; font-size: 22px; display: flex; align-items: center; justify-content: center; color: var(--wp-text); line-height: 1; transition: all 0.15s; }
.wp-qty-btn:hover { border-color: var(--wp-red) !important; color: var(--wp-red); background: var(--wp-red-light); }
.wp-qty-val { font-size: 17px; font-weight: 600; min-width: 48px; text-align: center; }
.wp-bulk-note { font-size: 14px; color: var(--wp-gray-muted); margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #eeeeee; }

/* TOC notice */
.wp-toc-box { background: var(--wp-red-light); border: 1px solid var(--wp-red-border) !important; border-radius: var(--wp-radius-sm); padding: 16px 18px; margin-bottom: 1.25rem; font-size: 15px; color: var(--wp-red-text); display: flex; gap: 12px; align-items: flex-start; }
.wp-toc-icon { font-size: 20px; flex-shrink: 0; line-height: 1.4; }

/* Side-by-side fields */
.wp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 1rem; }
.wp-field-row .wp-field { margin-bottom: 0; }

/* Fields */
.wp-field { margin-bottom: 1.1rem; }
.wp-field:last-child { margin-bottom: 0; }
.wp-field-label { display: block; font-size: 15px; color: var(--wp-text); margin-bottom: 6px; font-weight: 600; }
.wp-opt-label { font-size: 13px; color: var(--wp-gray-muted); margin-left: 4px; font-weight: 400; }
#winds-pasties-order-root input[type="text"],
#winds-pasties-order-root input[type="email"],
#winds-pasties-order-root input[type="tel"],
#winds-pasties-order-root select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--wp-gray-border) !important;
  border-radius: var(--wp-radius-sm) !important;
  font-size: 16px; font-family: inherit;
  background: var(--wp-card-bg); color: var(--wp-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none; box-shadow: none !important;
}
#winds-pasties-order-root input:focus,
#winds-pasties-order-root select:focus {
  outline: none !important;
  border-color: var(--wp-red) !important;
  box-shadow: 0 0 0 3px rgba(238,58,67,0.12) !important;
}
.wp-ack { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--wp-gray-muted); margin-top: 1.25rem; }
.wp-ack input[type="checkbox"] { margin-top: 3px; accent-color: var(--wp-red); flex-shrink: 0; width: 17px; height: 17px; }

/* Square card */
#wp-card-container { border: 1px solid var(--wp-gray-border); border-radius: var(--wp-radius-sm); padding: 14px; background: var(--wp-card-bg); min-height: 56px; }
#wp-payment-status { font-size: 15px; color: #c0392b; margin-top: 10px; min-height: 20px; }

/* Summary */
.wp-summary-row { display: flex; justify-content: space-between; font-size: 16px; padding: 8px 0; border-bottom: 1px solid #eeeeee; color: var(--wp-text); }
.wp-summary-row:last-of-type { border-bottom: none; }
.wp-summary-total { display: flex; justify-content: space-between; font-size: 19px; font-weight: 700; padding-top: 12px; margin-top: 8px; border-top: 2px solid var(--wp-gray-border); }
.wp-summary-meta { font-size: 15px; color: var(--wp-gray-muted); display: flex; flex-direction: column; gap: 8px; }
.wp-summary-meta strong { color: var(--wp-text); font-weight: 600; }

/* Buttons */
.wp-btn { display: block; width: 100%; padding: 16px; border-radius: var(--wp-radius-sm) !important; font-size: 17px; font-family: 'Open Sans', sans-serif !important; font-weight: 600; cursor: pointer; text-align: center; transition: all 0.15s; border: none !important; line-height: 1.4; letter-spacing: 0.01em; }
.wp-btn-stack { display: flex; flex-direction: column; gap: 0; margin-top: 1.25rem; }
.wp-btn-primary { background: var(--wp-red) !important; color: #fff !important; }
.wp-btn-primary:hover:not(:disabled) { background: var(--wp-red-dark) !important; }
.wp-btn-primary:disabled { background: #cccccc !important; color: #888 !important; cursor: not-allowed; }
.wp-btn-back { background: none !important; color: var(--wp-gray-muted) !important; border: 1px solid var(--wp-gray-border) !important; margin-top: 10px; font-family: inherit !important; font-size: 15px !important; }
.wp-btn-back:hover { border-color: #999 !important; color: var(--wp-text) !important; }
.wp-btn-narrow { max-width: 240px; margin: 0 auto; }

/* Success */
.wp-success-wrap { text-align: center; padding: 3rem 1.5rem; }
.wp-success-check { width: 72px; height: 72px; border-radius: 50%; background: var(--wp-green-bg); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 32px; color: var(--wp-green); border: 2px solid var(--wp-green); }
.wp-success-title { font-family: 'Playfair Display', Georgia, serif !important; font-size: 28px !important; font-weight: 700 !important; margin-bottom: 0.75rem !important; border: none !important; padding: 0 !important; }
.wp-success-sub { color: var(--wp-gray-muted); font-size: 16px; margin: 0.5rem 0 2rem !important; }

/* Spinner */
.wp-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: wp-spin 0.7s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes wp-spin { to { transform: rotate(360deg); } }

/* Google Places */
.pac-container { z-index: 999999 !important; font-size: 15px !important; }

/* Zone result */
.wp-zone-msg { margin-top: 1rem; padding: 12px 16px; border-radius: var(--wp-radius-sm); font-size: 15px; font-weight: 500; }
.wp-zone-free  { background: var(--wp-green-bg); color: var(--wp-green-text); border: 1px solid #a3d9a5; }
.wp-zone-paid  { background: var(--wp-red-light); color: var(--wp-red-text); border: 1px solid var(--wp-red-border); }
.wp-zone-error { background: #fff0f0; color: #7a1418; border: 1px solid #f9a0a4; }

/* Validation */
.wp-btn-hint { font-size: 14px; color: #c0392b; margin-top: 10px; text-align: center; }
.wp-btn-shake { animation: wp-shake 0.4s ease; }
@keyframes wp-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

.wp-hidden { display: none !important; }

/* Tabs */
.wp-tabs { display: flex; gap: 0; margin-bottom: 2rem; border-bottom: 2px solid var(--wp-gray-border); }
.wp-tab { display: flex; align-items: center; gap: 8px; padding: 12px 20px; cursor: pointer; background: none; border: none !important; font-family: 'Open Sans', sans-serif; font-size: 15px; font-weight: 600; color: var(--wp-gray-muted); border-bottom: 3px solid transparent !important; margin-bottom: -2px; transition: all 0.15s; }
.wp-tab:hover { color: var(--wp-text); }
.wp-tab.active { color: var(--wp-red); border-bottom-color: var(--wp-red) !important; }
.wp-tab-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wp-tab-badge { font-size: 11px; font-weight: 700; background: var(--wp-red); color: #fff; padding: 2px 8px; border-radius: 20px; margin-left: 4px; }

/* Subscription box summary */
.wp-sub-summary { margin-top: 1.25rem; padding: 12px 16px; background: var(--wp-red-light); border: 1px solid var(--wp-red-border); border-radius: var(--wp-radius-sm); font-size: 15px; color: var(--wp-red-text); }

/* Order type cards (step 1) */
.wp-order-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media(max-width: 480px) {
  .wp-order-type-grid { grid-template-columns: 1fr; }
}
.wp-order-type-btn {
  border: 2px solid var(--wp-gray-border) !important;
  border-radius: var(--wp-radius);
  padding: 20px 14px; cursor: pointer;
  text-align: center; background: var(--wp-card-bg);
  transition: all 0.15s; font-family: inherit; width: 100%;
}
.wp-order-type-btn:hover { border-color: var(--wp-red) !important; background: var(--wp-red-light); }
.wp-order-type-btn.selected { border-color: var(--wp-red) !important; background: var(--wp-red-light); }
.wp-order-type-icon { margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }
.wp-order-type-icon svg { width: 32px; height: 32px; stroke: var(--wp-red); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wp-order-type-name { font-weight: 600; font-size: 16px; color: var(--wp-text); margin-bottom: 4px; }
.wp-order-type-detail { font-size: 13px; color: var(--wp-gray-muted); line-height: 1.4; }
.wp-order-type-badge { display: inline-block; font-size: 11px; font-weight: 700; background: var(--wp-red); color: #fff; padding: 2px 8px; border-radius: 20px; margin-top: 4px; }

/* Subscription box summary */
.wp-sub-summary { margin-top: 1.25rem; padding: 12px 16px; background: var(--wp-red-light); border: 1px solid var(--wp-red-border); border-radius: var(--wp-radius-sm); font-size: 15px; color: var(--wp-red-text); }

/* Override selected state — dark border, white bg, no pink */
.wp-order-type-btn.selected,
.wp-geo-btn.selected {
  border-color: var(--wp-red) !important;
  background: #ffffff !important;
  box-shadow: inset 0 0 0 1px var(--wp-red);
}
.wp-order-type-btn.selected .wp-order-type-name,
.wp-geo-btn.selected .wp-geo-name {
  color: var(--wp-red);
}

/* ── Mobile responsive ── */
@media (max-width: 600px) {

  #winds-pasties-order-root {
    padding: 1rem 1rem 3rem;
    font-size: 15px;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  .wp-order-title { font-size: 24px !important; }
  .wp-order-sub   { font-size: 14px; margin-bottom: 1.25rem !important; }

  /* Step indicators — smaller on mobile */
  .wp-step { font-size: 12px; gap: 5px; }
  .wp-step-num { width: 24px; height: 24px; font-size: 11px; }
  .wp-step-line { width: 20px; }
  .wp-steps { margin-bottom: 1.5rem; }

  /* Cards — prevent overflow */
  .wp-card { padding: 1.25rem 1rem; overflow: hidden; }
  .wp-card-title { font-size: 18px !important; }

  /* Three order type cards — stack on mobile */
  .wp-order-type-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .wp-order-type-btn {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 14px 16px;
    gap: 14px;
  }
  .wp-order-type-icon { margin-bottom: 0; flex-shrink: 0; }
  .wp-order-type-icon svg { width: 28px; height: 28px; }
  .wp-order-type-name { font-size: 15px; margin-bottom: 2px; }
  .wp-order-type-detail { font-size: 13px; }

  /* Geo grid — 2 cols on mobile is fine, 1 col for size grid */
  .wp-geo-grid { gap: 10px; }
  #wp-step2s [style*="repeat(3"] {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  /* Pasty rows */
  .wp-pasty-name { font-size: 15px; }
  .wp-pasty-price { font-size: 14px; }
  .wp-qty-btn { width: 32px; height: 32px; font-size: 20px; }
  .wp-qty-val { font-size: 15px; min-width: 36px; }

  /* Fields */
  .wp-field-label { font-size: 14px; }
  #winds-pasties-order-root input[type="text"],
  #winds-pasties-order-root input[type="email"],
  #winds-pasties-order-root input[type="tel"],
  #winds-pasties-order-root select {
    font-size: 16px; /* prevents iOS zoom */
    padding: 11px 12px;
  }

  /* Side by side name fields — stack on small screens */
  .wp-field-row { grid-template-columns: 1fr; gap: 0; }
  .wp-field-row .wp-field { margin-bottom: 1rem; }

  /* Buttons */
  .wp-btn { font-size: 16px; padding: 15px; }

  /* Summary */
  .wp-summary-row { font-size: 15px; }
  .wp-summary-total { font-size: 17px; }
  .wp-summary-meta { font-size: 14px; }

  /* Success */
  .wp-success-wrap { padding: 2rem 1rem; }
  .wp-success-title { font-size: 22px !important; }
}

/* Mobile button width fix */
@media (max-width: 600px) {
  .wp-order-type-btn {
    width: 100%;
    max-width: 100%;
  }
  .wp-geo-grid {
    grid-template-columns: 1fr 1fr;
  }
  .wp-geo-btn {
    width: 100%;
    padding: 12px 8px;
  }
  .wp-geo-name { font-size: 14px; }
  .wp-geo-detail { font-size: 12px; }
}

/* Mobile overflow fix for order type buttons */
@media (max-width: 600px) {
  .wp-order-type-btn {
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
  }
  .wp-order-type-detail {
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
  }
  .wp-order-type-badge {
    display: inline-block;
    margin-top: 4px;
  }
}
