/* ============================================================
   Varia WhatsApp Vendors — Frontend v2.1
   Aesthetic: Refined minimalism — clean lines, precise spacing,
   restrained palette with a single sharp green accent.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --vwv-green:      #22c55e;
  --vwv-green-dim:  rgba(34,197,94,.08);
  --vwv-green-mid:  rgba(34,197,94,.18);
  --vwv-black:      #0f0f0f;
  --vwv-gray-1:     #1a1a1a;
  --vwv-gray-2:     #6b7280;
  --vwv-gray-3:     #e5e7eb;
  --vwv-gray-4:     #f9fafb;
  --vwv-white:      #ffffff;
  --vwv-font:       'DM Sans', -apple-system, sans-serif;
  --vwv-radius:     10px;
  --vwv-ease:       cubic-bezier(.4,0,.2,1);
}

/* ─── Reset scope ──────────────────────────────────────────── */
.vwv-btn-wrapper,
.vwv-cart-section,
.vwv-checkout-section,
.vwv-thankyou-section {
  font-family: var(--vwv-font);
  box-sizing: border-box;
}
.vwv-btn-wrapper *,
.vwv-cart-section *,
.vwv-checkout-section *,
.vwv-thankyou-section * { box-sizing: border-box; }

/* ─── Wrapper ──────────────────────────────────────────────── */
.vwv-btn-wrapper {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 16px 0;
}

.vwv-btn-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

/* ─── Vendor avatar ────────────────────────────────────────── */
.vwv-vendor-avatar-link { display: block; flex-shrink: 0; }

.vwv-vendor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--vwv-gray-3);
  display: block;
  transition: border-color .2s var(--vwv-ease);
}
.vwv-vendor-avatar-link:hover .vwv-vendor-avatar {
  border-color: var(--vwv-green);
}

/* ─── Vendor name label ────────────────────────────────────── */
.vwv-vendor-name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--vwv-gray-2);
  line-height: 1;
}

/* ─── The Button ───────────────────────────────────────────── */
.vwv-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 42px;
  font-family: var(--vwv-font);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--vwv-white) !important;
  background: var(--vwv-green);
  border: none;
  border-radius: var(--vwv-radius);
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s var(--vwv-ease),
              transform  .18s var(--vwv-ease),
              box-shadow .18s var(--vwv-ease);
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle inner highlight */
.vwv-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, transparent 55%);
  pointer-events: none;
  border-radius: inherit;
}

.vwv-button:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34,197,94,.28);
  text-decoration: none !important;
}

.vwv-button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Shapes */
.vwv-btn-pill    { border-radius: 100px; }
.vwv-btn-square  { border-radius: 6px; }
.vwv-btn-rounded { border-radius: var(--vwv-radius); }

/* Sizes */
.vwv-btn-small  { height: 34px; padding: 0 14px; font-size: 12.5px; }
.vwv-btn-medium { height: 42px; padding: 0 18px; font-size: 13.5px; }
.vwv-btn-large  { height: 50px; padding: 0 24px; font-size: 14.5px; }

/* Disabled */
.vwv-button[aria-disabled="true"] {
  background: var(--vwv-gray-3);
  color: var(--vwv-gray-2) !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── WhatsApp icon ────────────────────────────────────────── */
.vwv-wa-icon {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  fill: currentColor;
  opacity: .92;
}

/* ─── Pulse ────────────────────────────────────────────────── */
@keyframes vwv-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.35); }
  50%       { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
}
.vwv-pulse { animation: vwv-pulse 2.6s ease-in-out infinite; }

/* ─── Store page button ────────────────────────────────────── */
.vwv-store-btn-wrap {
  margin: 14px 0;
}
.vwv-context-store .vwv-button {
  width: 100%;
  justify-content: center;
}

/* ─── Cart / Checkout / Thank-you sections ─────────────────── */
.vwv-cart-section,
.vwv-checkout-section,
.vwv-thankyou-section {
  margin: 28px 0;
  border: 1px solid var(--vwv-gray-3);
  border-radius: 14px;
  overflow: hidden;
  background: var(--vwv-white);
}

/* Section header bar */
.vwv-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--vwv-gray-3);
  background: var(--vwv-gray-4);
}

.vwv-section-icon {
  width: 30px;
  height: 30px;
  background: var(--vwv-green-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vwv-section-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--vwv-green);
}

.vwv-section-titles { display: flex; flex-direction: column; gap: 1px; }

.vwv-section-title {
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--vwv-font) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--vwv-black) !important;
  border: none !important;
  background: none !important;
  line-height: 1.3 !important;
}

.vwv-section-desc {
  margin: 0;
  font-size: 11.5px;
  color: var(--vwv-gray-2);
  line-height: 1.3;
}

/* Section body */
.vwv-section-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Vendor row (inside cart/checkout) ────────────────────── */
.vwv-vendor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--vwv-gray-3);
  border-radius: var(--vwv-radius);
  background: var(--vwv-white);
  transition: border-color .18s var(--vwv-ease),
              background   .18s var(--vwv-ease);
}
.vwv-vendor-row:hover {
  border-color: var(--vwv-green-mid);
  background: var(--vwv-green-dim);
}

.vwv-vendor-row .vwv-vendor-avatar {
  width: 36px;
  height: 36px;
}

.vwv-vendor-row-info {
  flex: 1;
  min-width: 0;
}

.vwv-vendor-row-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--vwv-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vwv-vendor-row-name a {
  color: inherit;
  text-decoration: none;
}
.vwv-vendor-row-name a:hover {
  color: var(--vwv-green);
}

.vwv-vendor-row-items {
  font-size: 11px;
  color: var(--vwv-gray-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.vwv-vendor-row .vwv-button {
  flex-shrink: 0;
  height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
}

/* ─── Thank-you variant ────────────────────────────────────── */
.vwv-thankyou-section .vwv-section-header {
  background: var(--vwv-green-dim);
  border-bottom-color: var(--vwv-green-mid);
}
.vwv-thankyou-section .vwv-section-icon {
  background: var(--vwv-green);
}
.vwv-thankyou-section .vwv-section-icon svg { fill: #fff; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .vwv-vendor-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .vwv-vendor-row .vwv-button {
    width: 100%;
    justify-content: center;
  }
  .vwv-button {
    width: 100%;
    justify-content: center;
  }
}
