/* ========================================
   Auctionafy v2 — shadcn/ui Storefront Styles
   ======================================== */

/* Outfit font loaded via <link> in liquid templates */

/* Cash Sans font — loaded via @font-face in Liquid templates (needs asset_url filter) */

/* --- Design Tokens --- */
:root {
  --afy-background: #ffffff;
  --afy-foreground: #0a0a0a;
  --afy-card: #ffffff;
  --afy-card-foreground: #0a0a0a;
  --afy-muted: #f5f5f5;
  --afy-muted-foreground: #737373;
  --afy-border: #e5e5e5;
  --afy-input: #e5e5e5;
  --afy-ring: #0a0a0a;
  --afy-primary: #18181b;
  --afy-primary-foreground: #fafafa;
  --afy-secondary: #f5f5f5;
  --afy-secondary-foreground: #18181b;
  --afy-accent: #f5f5f5;
  --afy-accent-foreground: #18181b;
  --afy-destructive: #ef4444;
  --afy-destructive-foreground: #fafafa;
  --afy-success: #22c55e;
  --afy-success-foreground: #ffffff;
  --afy-warning: #f59e0b;
  --afy-warning-foreground: #ffffff;
  --afy-radius: 0.5rem;
  --afy-font: 'Outfit', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* --- 3D Button Brand Tokens --- */
  --afy-btn-timing: 0.22s;
  --afy-btn-shadow-height: 4px;
  --afy-btn-gradient-start: #e87dcc;
  --afy-btn-gradient-end: #e259be;
  --afy-btn-shadow: #9b1b69;
  --afy-btn-inset: rgba(255,255,255,0.15);
  --afy-btn-confirm-gradient-start: #e87dcc;
  --afy-btn-confirm-gradient-end: #e259be;
  --afy-btn-confirm-shadow: #9b1b69;
  --afy-btn-text: #ffffff;
  --afy-btn-text-shadow: rgba(0,0,0,0.25);
  --afy-btn-disabled-gradient-start: #797777;
  --afy-btn-disabled-gradient-end: #949494;
  --afy-btn-disabled-shadow: #949494;
}

/* --- Base --- */
.afy2 {
  font-family: var(--afy-font);
  color: var(--afy-foreground);
  text-wrap: balance;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  margin: 16px 0;
  opacity: 0;
  transition: opacity 0.18s ease-out, visibility 0.18s ease-out;
}
#auctionafy-widget.afy2 {
  width: 110%;
  max-width: 110%;
}
#auctionafy-widget:not([data-afy-ready]) {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.afy2[data-afy-ready] {
  visibility: visible;
  opacity: 1;
}
/* FOUC prevention — dark overrides in base CSS so they load simultaneously with bright defaults */
.afy2[data-afy-theme="dark"] { --afy-btn-gradient-start:#e87dcc; --afy-btn-gradient-end:#e259be; --afy-btn-shadow:#9b1b69; --afy-btn-confirm-gradient-start:#e87dcc; --afy-btn-confirm-gradient-end:#e259be; --afy-btn-confirm-shadow:#9b1b69; }
.afy2[data-afy-theme="dark"] .afy2-countdown-box { background:transparent; border:none; }
.afy2[data-afy-theme="dark"] .afy2-product-title { display:none; }

/* --- Loading --- */
.afy2-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  color: var(--afy-muted-foreground);
  font-size: 14px;
}

.afy2-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--afy-border);
  border-top-color: var(--afy-primary);
  border-radius: 50%;
  animation: afy2-spin 0.6s linear infinite;
}

@keyframes afy2-spin {
  to { transform: rotate(360deg); }
}

/* --- Card --- */
.afy2-card {
  background: var(--afy-card);
  border: 1px solid var(--afy-border);
  border-radius: 8px;
  padding: 20px;
}

.afy2-card + .afy2-card {
  margin-top: 12px;
}

/* --- Status Banner --- */
.afy2-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.afy2-banner-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.afy2-banner--winning {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.afy2-banner--outbid {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.afy2-banner--won {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.afy2-banner--lost,
.afy2-banner--lost_sold {
  background: var(--afy-muted);
  color: var(--afy-muted-foreground);
  border: 1px solid var(--afy-border);
}

.afy2-banner--proxy_active {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.afy2-banner--info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.afy2-banner--neutral {
  background: var(--afy-muted);
  color: var(--afy-muted-foreground);
  border: 1px solid var(--afy-border);
}

/* --- Product Title --- */
.afy2-product-title {
  font-family: var(--afy-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--afy-foreground);
  margin: 0 0 16px 0;
}

/* --- Stat Row (time + bid side by side) --- */
.afy2-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--afy-border);
  border-radius: 8px;
  overflow: hidden;
}

.afy2-stat {
  padding: 14px 18px;
}

.afy2-stat:first-child {
  border-bottom: 1px solid var(--afy-border);
  text-align: center;
}

.afy2-stat-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--afy-muted-foreground);
  margin-bottom: 4px;
}

.afy2-stat-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
  height: 1.3em;
}

#afy2-current-bid {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
  border-radius: 6px;
  padding: 2px 12px 7px;
  display: inline-block;
  transition: color 0.6s ease, background 0.6s ease;
}

.afy2-stat-value--bid {
  font-size: 40px;
  font-family: 'Cash Sans', 'Helvetica Neue', helvetica, sans-serif;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  height: auto;
  line-height: 1;
  overflow: visible;
}

.afy2-stat-value--timer {
  font-variant-numeric: tabular-nums;
}

/* --- Countdown Boxes (DaisyUI "In Boxes" style) --- */
.afy2-countdown {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.afy2-countdown-box {
  background: transparent;
  color: var(--afy-foreground, #18181b);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 10px 6px;
  min-width: 42px;
}

.afy2-countdown-value {
  font-family: 'Cash Sans', 'Helvetica Neue', helvetica, sans-serif;
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.afy2-countdown-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.7;
  margin-top: 2px;
}

.afy2-countdown--ended {
  font-family: var(--afy-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--afy-muted-foreground);
  padding: 8px 0;
}

.afy2-stat--countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Slot machine bid animation — handled by JS Web Animations API */

.afy2-stat-sub {
  font-size: 12px;
  color: var(--afy-muted-foreground);
  margin-top: 2px;
}

/* --- Value Price Tag (product image overlay) --- */
.afy2-value-badge {
  position: absolute !important;
  top: 12px !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 10 !important;
  display: inline-flex !important;
  align-items: center !important;
  flex: none !important;
  height: auto !important;
  max-height: fit-content !important;
  gap: 5px;
  padding: 6px 12px 6px 10px !important;
  width: fit-content !important;
  max-width: fit-content !important;
  background: #02a9f0;
  border: 1px solid #006b99;
  border-left: none;
  border-radius: 0 7px 7px 0;
  font-family: 'SF Pro Display', var(--afy-font);
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: default;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  transform-origin: center center;
  opacity: 0;
}

.afy2-value-badge-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.afy2-value-badge-icon svg {
  width: 17px;
  height: 17px;
  fill: #d4a017;
  filter: drop-shadow(-1.5px 2.5px 0 rgba(0, 0, 0, 0.3));
  transition: filter 0.3s ease;
}

.afy2-value-badge-price {
  color: #ffffff;
  font-family: 'SF Pro Display', var(--afy-font);
  font-size: 18px;
  font-weight: 600;
  text-shadow: -1.5px 2.5px 0 rgba(0, 0, 0, 0.3);
  transition: text-shadow 0.3s ease;
}

/* --- Bid Section --- */
.afy2-bid-section {
  margin-bottom: 16px;
}

.afy2-bid-status {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--afy-muted-foreground);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.afy2-bid-status::before,
.afy2-bid-status::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--afy-border);
}

.afy2-bid-status--winning {
  color: #16a34a;
}

.afy2-bid-status--outbid {
  color: #dc2626;
}

.afy2-bid-status--won {
  color: #16a34a;
}

.afy2-bid-status--lost {
  color: var(--afy-muted-foreground);
}

/* --- Buttons --- */
.afy2-btn-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.afy2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  line-height: 1.25;
  font-family: var(--afy-font);
}

.afy2-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.afy2-btn--primary {
  background: var(--afy-primary);
  color: var(--afy-primary-foreground);
  border-color: var(--afy-primary);
}

.afy2-btn--primary:hover:not(:disabled) {
  opacity: 0.9;
}

.afy2-btn--outline {
  background: var(--afy-background);
  color: var(--afy-foreground);
  border-color: var(--afy-border);
}

.afy2-btn--outline:hover:not(:disabled) {
  background: var(--afy-accent);
}

.afy2-btn--ghost {
  background: transparent;
  color: var(--afy-muted-foreground);
  border: none;
  padding: 8px 12px;
}

.afy2-btn--ghost:hover:not(:disabled) {
  background: var(--afy-accent);
  color: var(--afy-foreground);
}

.afy2-btn--destructive {
  background: var(--afy-destructive);
  color: var(--afy-destructive-foreground);
}

.afy2-btn--full {
  width: 100%;
}

.afy2-btn-chevron {
  font-size: 12px;
}

/* --- Secondary Actions Row --- */
.afy2-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.afy2-actions--single {
  grid-template-columns: 1fr;
}

.afy2-actions--pair {
  grid-template-columns: 1fr 1fr;
}

.afy2-actions--pair .afy2-btn {
  font-size: 13px;
  padding: 10px 8px;
}

/* --- Input --- */
.afy2-input-group {
  margin-bottom: 12px;
}

.afy2-input-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.afy2-input-wrap {
  display: flex;
  border: 1px solid var(--afy-input);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.afy2-input-wrap:focus-within {
  border-color: var(--afy-ring);
  box-shadow: 0 0 0 2px rgba(10, 10, 10, 0.05);
}

.afy2-input-prefix {
  padding: 8px 12px;
  background: var(--afy-muted);
  color: var(--afy-muted-foreground);
  font-size: 15px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--afy-input);
}

.afy2-input {
  flex: 1;
  padding: 8px 12px;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: var(--afy-font);
  background: transparent;
  color: var(--afy-foreground);
  -moz-appearance: textfield;
}

.afy2-input::-webkit-inner-spin-button,
.afy2-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- ATM input gray/green states --- */
.afy2-atm-input {
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: right;
}
.afy2-atm-input--empty {
  color: #d1d5db;
}
.afy2-atm-input--filled {
  color: #16a34a;
}

/* --- Separator --- */
.afy2-sep {
  height: 1px;
  background: var(--afy-border);
  margin: 14px 0;
}

/* --- Bid History --- */
.afy2-history-count {
  font-weight: 400;
  color: var(--afy-muted-foreground);
  font-size: 12px;
}

.afy2-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--afy-muted);
}

.afy2-history-row:last-child {
  border-bottom: none;
}

.afy2-history-bidder {
  color: var(--afy-muted-foreground);
  flex: 1;
}

.afy2-history-amount {
  font-weight: 600;
  margin: 0 12px;
}

.afy2-history-time {
  color: var(--afy-muted-foreground);
  font-size: 12px;
}

/* --- Toast --- */
.afy2-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--afy-border);
  background: var(--afy-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 10000;
  animation: afy2-slide-in 0.3s ease-out;
  max-width: 360px;
}

.afy2-toast--success {
  border-left: 3px solid var(--afy-success);
}

.afy2-toast--error {
  border-left: 3px solid var(--afy-destructive);
}

.afy2-toast--warning {
  border-left: 3px solid var(--afy-warning);
}

.afy2-toast--info {
  border-left: 3px solid #2563eb;
}

.afy2-toast-icon {
  flex-shrink: 0;
  font-size: 16px;
}

@keyframes afy2-slide-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Modal --- */
.afy2-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: afy2-fade-in 0.2s;
}

.afy2-modal {
  background: var(--afy-card);
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.afy2-modal-header {
  padding: 20px 20px 0;
}

.afy2-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.afy2-modal-header p {
  font-size: 14px;
  color: var(--afy-muted-foreground);
  margin-top: 4px;
}

.afy2-modal-body {
  padding: 20px;
}

.afy2-modal-footer {
  padding: 0 20px 20px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.afy2-modal-close {
  font-size: 18px;
  padding: 4px 8px;
}

.afy2-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--afy-muted-foreground);
  cursor: pointer;
}

.afy2-checkbox-label input[type="checkbox"] {
  accent-color: var(--afy-primary);
}

@keyframes afy2-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========================================
   COLLECTION CARD INJECTION
   ======================================== */
.afy2-card-inject {
  padding: 0;
  margin-top: -4px;
  font-family: var(--afy-font);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.afy2-card-stats {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  padding: 0;
}

.afy2-card-stat {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--afy-muted-foreground);
  padding: 0;
  border: none;
  background: none;
  gap: 6px;
}

.afy2-card-stat--bid {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.afy2-card-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--afy-muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: -1px;
}

.afy2-card-stat-divider {
  display: none;
}

.afy2-card-stat--timer {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--afy-border);
  border-radius: 8px;
  padding: 8px 24px;
  background: #ffffff;
}

.afy2-card-stat--timer .afy2-card-stat-label {
  color: #6b7280;
  font-size: 10px;
}

.afy2-card-stat--timer .afy2-card-stat-value {
  color: #4b5563;
}

.afy2-card-stat-timer-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.afy2-clock-icon {
  width: 13px;
  height: 13px;
  color: #6b7280;
  opacity: 0.7;
  flex-shrink: 0;
}

.afy2-card-stat-value {
  font-weight: 600;
  color: var(--afy-foreground);
  font-size: 14px;
}

.afy2-card-status {
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 16px;
}

.afy2-bid-amount {
  color: #16a34a;
  font-size: 19px;
  animation: afy2-pulse-bid 2s ease-in-out infinite;
}

@keyframes afy2-pulse-bid {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.afy2-card-status--neutral {
  color: var(--afy-muted-foreground);
}

.afy2-card-status--winning {
  color: #16a34a;
}

.afy2-card-status--outbid {
  color: #dc2626;
}

/* --- Collection card mobile --- */
@media (max-width: 749px) {
  .afy2-card-inject {
    gap: 6px;
    overflow: hidden;
  }

  .afy2-card-stats {
    flex-direction: column;
    gap: 6px;
  }

  .afy2-card-stat--bid {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }

  .afy2-bid-amount {
    font-size: 16px;
  }

  .afy2-card-stat--timer {
    padding: 6px 10px;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
  }

  .afy2-card-stat--timer .afy2-card-stat-value {
    font-size: 13px;
  }

  .afy2-card-stat--timer .afy2-card-stat-label {
    font-size: 9px;
  }

  .afy2-card-stat-timer-row {
    gap: 4px;
  }

  .afy2-clock-icon {
    width: 11px;
    height: 11px;
  }

  .afy2-card-stat-label {
    font-size: 10px;
  }

  .afy2-card-btns {
    gap: 6px;
  }

  .afy2-card-btn {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 46px;
    --afy-btn-shadow-height: 3px;
  }

  .afy2-card-btn--outline {
    border-radius: 8px;
  }
}

/* --- Hesitation Tooltip --- */
.afy2-hint-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #18181b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 10001;
  max-width: 300px;
  white-space: normal;
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: translate(14px, -50%);
  font-family: var(--afy-font);
}

.afy2-hint-tooltip--visible {
  opacity: 1;
}

.afy2-proxy-row {
  display: flex;
  gap: 0;
  width: 100%;
  align-items: stretch;
  position: relative;
}

/* Proxy bid confirm button — expanding overlay */
.afy2-proxy-bid-btn {
  position: relative;
  overflow: hidden;
}

.afy2-proxy-bid-btn.afy2-proxy-expand {
  clip-path: inset(0 0 0 100%);
  animation: afy2-slide-expand 0.35s ease-out forwards;
}

.afy2-proxy-bid-btn.afy2-proxy-expand .afy2-bid-label,
.afy2-proxy-bid-btn.afy2-proxy-expand .afy2-bid-confirm {
  opacity: 0;
  animation: afy2-text-fadein 0.2s ease-out 0.25s forwards;
}

@keyframes afy2-slide-expand {
  from { clip-path: inset(0 0 0 100%); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes afy2-text-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

.afy2-proxy-dollar {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: var(--afy-muted);
  border: 1px solid var(--afy-border);
  border-right: none;
  font-size: 18px;
  font-weight: 700;
  color: #16a34a;
}

.afy2-proxy-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.afy2-proxy-input-wrap .afy2-proxy-input {
  flex: none;
  width: 100%;
  color: transparent !important;
  caret-color: transparent !important;
}

.afy2-proxy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--afy-font);
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* Cursor bar blink — clean on/off at 1s rate */
@keyframes afy2-cursor-blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
}

/* Green cursor bar between gray/green digits */
.afy2-proxy-cursor {
  display: none;
  flex-shrink: 0;
}

.afy2-proxy-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--afy-border);
  border-right: none;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--afy-font);
  outline: none;
  background: var(--afy-background);
  min-width: 0;
  text-align: right;
  letter-spacing: 0.02em;
  caret-color: #18181b;
}

.afy2-proxy-input:focus {
  border-color: var(--afy-border);
  outline: none;
  box-shadow: none;
}

.afy2-proxy-input-wrap .afy2-proxy-input:focus {
  caret-color: transparent !important;
}

.afy2-proxy-confirm {
  padding: 10px 16px;
  background: var(--afy-btn-gradient-end);
  color: var(--afy-btn-text);
  border: 1px solid var(--afy-btn-gradient-end);
  font-size: 16px;
  cursor: pointer;
  font-family: var(--afy-font);
  font-weight: 700;
  transition: background 0.15s, filter 0.15s;
}

.afy2-proxy-confirm:hover:not(:disabled) {
  background: var(--afy-btn-gradient-start);
  border-color: var(--afy-btn-gradient-start);
  filter: brightness(1.05);
}

.afy2-proxy-confirm--disabled {
  background: #d1d5db;
  border-color: #d1d5db;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Collection card buttons: slightly smaller 3D shadow */
.afy2-card-inject .afy2-card-btn {
  --afy-btn-shadow-height: 3px;
  font-size: 18px;
}

.afy2-card-inject .afy2-card-btn--outline {
  transform: none;
  box-shadow: none;
}

.afy2-card-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.afy2-card-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 46px;
  padding: 12px 16px;
  width: 100%;
  overflow: hidden;
  font-weight: 700;
  font-size: 22px;
  font-family: var(--afy-font);
  text-transform: none;
  text-align: center;
  color: var(--afy-btn-text);
  text-shadow: 1px 1px 1px var(--afy-btn-text-shadow);
  background: linear-gradient(180deg, var(--afy-btn-gradient-start) 0%, var(--afy-btn-gradient-end) 100%);
  transform: translateY(calc(var(--afy-btn-shadow-height) * -1));
  box-shadow:
    0 var(--afy-btn-shadow-height) 0 0 var(--afy-btn-shadow),
    0 1px 2px var(--afy-btn-inset) inset;
  transition:
    filter var(--afy-btn-timing),
    transform var(--afy-btn-timing),
    box-shadow var(--afy-btn-timing);
}

.afy2-card-btn--outline {
  background: var(--afy-background);
  color: var(--afy-foreground);
  border: 1px solid var(--afy-border);
  border-radius: 8px;
  opacity: 0.7;
  text-transform: none;
  text-shadow: none;
  font-weight: 600;
  transform: none;
  box-shadow: none;
}

.afy2-card-btn--outline::before {
  display: none;
}

.afy2-card-btn--outline:hover {
  background: var(--afy-muted);
  opacity: 1;
}

/* --- Bid button animated flow (3D push style) --- */
.afy2-card-btn--primary {
  background: linear-gradient(180deg, var(--afy-btn-gradient-start) 0%, var(--afy-btn-gradient-end) 100%);
  color: var(--afy-btn-text);
  border: none;
  filter: drop-shadow(0 0 0 var(--afy-btn-shadow));
}

.afy2-card-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
  pointer-events: none;
  z-index: 3;
}

.afy2-card-btn:hover::before {
  left: 100%;
}

.afy2-card-btn--primary:hover {
  filter: none;
}

/* ACTIVE STATE — button "presses down" */
.afy2-card-btn--primary:not(:disabled):active {
  box-shadow:
    0 0 0 0 var(--afy-btn-shadow),
    0 1px 2px var(--afy-btn-inset) inset;
  transform: translateY(0px);
}

.afy2-card-btn--primary:disabled {
  cursor: default;
  background: linear-gradient(0deg, var(--afy-btn-disabled-gradient-start) 0%, var(--afy-btn-disabled-gradient-end) 100%);
  box-shadow: 0 var(--afy-btn-shadow-height) 0 0 var(--afy-btn-disabled-shadow);
  filter: none;
}

/* --- Press-down via JS class (replaces :active for bid button) --- */
.afy2-card-btn--primary.afy2-pressing {
  box-shadow:
    0 0 0 0 var(--afy-btn-shadow),
    0 1px 2px var(--afy-btn-inset) inset;
  transform: translateY(0px);
}

/* Pop keyframe for confirm text entrance */
@keyframes afy2-pop-in {
  0%   { transform: scale(0);    opacity: 0; }
  20%  { transform: scale(0.5);  opacity: 1; }
  40%  { transform: scale(0.92); opacity: 1; }
  60%  { transform: scale(1.1);  opacity: 1; }
  85%  { transform: scale(0.94); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}

/* Inner text layers — blur/scale/opacity transition */
.afy2-bid-label,
.afy2-bid-confirm {
  display: block;
  position: absolute;
  z-index: 2;
  transition: opacity var(--afy-btn-timing) ease-out,
              filter var(--afy-btn-timing) ease-out,
              transform var(--afy-btn-timing) ease-out;
  will-change: opacity, filter, transform;
}

/* Default: label visible, confirm hidden */
.afy2-bid-label {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}
.afy2-bid-confirm {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  filter: blur(2px);
  transform: scale(0.5) translateY(-1px);
  z-index: 2;
}

/* Peeking state: label shrinks under press, confirm stays hidden */
.afy2-card-btn--peeking .afy2-bid-label {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.25);
}

/* Winning/confirm state: full swap */
.afy2-card-btn--confirm .afy2-bid-label {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.25);
}
.afy2-card-btn--confirm .afy2-bid-confirm {
  opacity: 1;
  filter: blur(0);
  transform: scale(1) translateY(-1px);
}

.afy2-card-btn--confirm {
  color: var(--afy-btn-text);
  border: none;
}

/* Progress fill bar (auto-bid countdown) */
.afy2-bid-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(120, 0, 70, 0.5) 0%, rgba(80, 0, 50, 0.65) 100%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

.afy2-card-btn--filling .afy2-bid-fill {
  transition: width 2s linear;
}

/* Button stays pressed during fill (no extra glow) */
.afy2-card-btn--filling {
}

/* Reverse-drain smoothly when not filling */
.afy2-card-btn:not(.afy2-card-btn--filling) .afy2-bid-fill {
  transition: width 3s ease-out;
}

/* --- BIN / Offer (within widget) --- */
.afy2-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: var(--afy-muted-foreground);
  font-size: 12px;
}

.afy2-divider::before,
.afy2-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--afy-border);
}

.afy2-btn--bin {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.afy2-btn--bin:hover:not(:disabled) {
  background: #1d4ed8;
}

.afy2-btn--offer {
  background: transparent;
  color: #2563eb;
  border-color: #2563eb;
}

.afy2-btn--offer:hover:not(:disabled) {
  background: #eff6ff;
}

/* ========================================
   QUICK-ADD BUTTONS + SPLIT BID ROW
   ======================================== */

/* --- Quick-add row --- */
.afy2-bid-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.afy2-quickadd-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.afy2-quickadd-buttons {
  display: flex;
  gap: 8px;
  flex: 1;
  align-items: center;
  justify-content: center;
}

/* Crown Coins green 3D pill buttons */
.afy2-quickadd-btn {
  flex: 1;
  aspect-ratio: 1;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 50%;
  padding: 0;
  font-weight: 700;
  font-size: 13px;
  font-family: "Cash Sans", "SF Pro Display", -apple-system, system-ui, var(--afy-font);
  color: #15803d;
  text-shadow: none;
  background: rgba(22, 163, 74, 0.1);
  transform: none;
  box-shadow: none;
  transition:
    background 0.2s ease,
    transform 0.25s ease;
  overflow: hidden;
  white-space: nowrap;
}

.afy2:not([data-afy-theme="dark"]) .afy2-quickadd-btn:hover {
  background: rgba(22, 163, 74, 0.17);
  animation: afy2-blob-jiggle 0.6s ease-in-out;
}

.afy2:not([data-afy-theme="dark"]) .afy2-quickadd-btn:not(:disabled):active {
  background: rgba(22, 163, 74, 0.25);
  transform: scale(0.93);
}

.afy2:not([data-afy-theme="dark"]) .afy2-quickadd-btn--active {
  background: rgba(22, 163, 74, 0.22);
}

@keyframes afy2-blob-jiggle {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2px, 1px); }
  40%  { transform: translate(2px, -1px); }
  60%  { transform: translate(-1px, 2px); }
  80%  { transform: translate(1px, -1px); }
  100% { transform: translate(0, 0); }
}

/* --- Cash App style amount input --- */
.afy2-cashapp-input {
  flex: none;
  width: 35%;
  padding: 10px 12px;
  border: 2px solid #f4f4f4;
  border-radius: 16px;
  outline: none;
  background: #f4f4f4;
  font-family: "Cash Sans", "Helvetica Neue", helvetica, sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: #333333;
  text-align: center;
  caret-color: #00d64b;
  box-shadow: none !important;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  -moz-appearance: textfield;
}

.afy2-cashapp-input::-webkit-inner-spin-button,
.afy2-cashapp-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.afy2-cashapp-input::placeholder {
  color: #c0c0c0;
  font-weight: 500;
}

.afy2-cashapp-input:focus {
  outline: none !important;
  border-color: #00d64b !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.afy2-cashapp-input:not(:placeholder-shown) {
  background: #f4f4f4;
  border-color: #f4f4f4;
}

.afy2-cashapp-input:focus:not(:placeholder-shown) {
  border-color: #f4f4f4;
  background: #ffffff;
}

/* --- Bid buttons row (single or split) --- */
.afy2-bid-btns-row {
  display: flex;
  gap: 8px;
}

.afy2-bid-btns-row .afy2-card-btn {
  flex: 1;
}

/* --- Reveal animation: casino-style pop split/merge --- */
/* Include translateY so the 3D shadow offset is maintained throughout animation */
@keyframes afy2-pop-out {
  0%   { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(1); opacity: 1; }
  40%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(1.06); opacity: 1; }
  100% { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(0); opacity: 0; }
}
@keyframes afy2-pop-in {
  0%   { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(0); opacity: 0; }
  30%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(1.08); opacity: 1; }
  42%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(0.96); opacity: 1; }
  52%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(1.04); opacity: 1; }
  60%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(0.98); opacity: 1; }
  67%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(1.025); opacity: 1; }
  74%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(0.99); opacity: 1; }
  80%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(1.012); opacity: 1; }
  86%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(0.996); opacity: 1; }
  91%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(1.005); opacity: 1; }
  96%  { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(0.998); opacity: 1; }
  100% { transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(1); opacity: 1; }
}

.afy2-card-btn--pop-out {
  animation: afy2-pop-out 0.25s ease-in forwards;
  transform-origin: center center;
  pointer-events: none;
}
.afy2-card-btn--pop-in {
  animation: afy2-pop-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform-origin: center center;
}
/* Start hidden — JS adds pop-in class with delay */
.afy2-card-btn--pop-hidden {
  transform: translateY(calc(var(--afy-btn-shadow-height) * -1)) scale(0);
  opacity: 0;
}

/* Green variant for proxy bid button */
.afy2-card-btn--green {
  background: linear-gradient(180deg, #01db80 0%, #00bb6d 100%) !important;
  box-shadow:
    0 var(--afy-btn-shadow-height) 0 0 #006c3f,
    0 1px 2px #dceae5 inset !important;
}

.afy2-card-btn--green:not(:disabled):active {
  box-shadow:
    0 0 0 0 #006c3f,
    0 1px 2px #dceae5 inset !important;
  transform: translateY(0px);
}

.afy2-card-btn--green::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
  pointer-events: none;
  z-index: 3;
}

.afy2-card-btn--green:hover::before {
  left: 100%;
}

/* Green fill bar variant */
.afy2-card-btn--green .afy2-bid-fill {
  background: linear-gradient(90deg, rgba(0, 60, 30, 0.5) 0%, rgba(0, 40, 20, 0.65) 100%);
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .afy2-stat-value {
    font-size: 16px;
  }

  .afy2-countdown {
    gap: 4px;
  }

  .afy2-countdown-box {
    padding: 6px 8px 4px;
    min-width: 36px;
    border-radius: 6px;
  }

  .afy2-countdown-value {
    font-size: 18px;
  }

  .afy2-modal {
    width: 95%;
    margin: 0 8px;
  }

  .afy2-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .afy2-actions {
    grid-template-columns: 1fr;
  }

  .afy2-quickadd-row {
    flex-direction: column;
    gap: 6px;
  }

  .afy2-quickadd-btn {
    font-size: 12px;
  }

  .afy2-cashapp-input {
    font-size: 22px;
    width: 40%;
    padding: 8px 10px;
  }
}

/* ========================================
   LIVE CHAT WIDGET
   ======================================== */
.afy2-chat {
  font-family: var(--afy-font);
  color: var(--afy-foreground);
  max-width: 100%;
  margin: 16px 0;
  border: 1px solid var(--afy-border);
  border-radius: 8px;
  background: var(--afy-card);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.afy2-chat[data-chat-ready] {
  opacity: 1;
}

/* Input bar slide-up reveal wrapper */
.afy2-chat-input-reveal {
  overflow: hidden;
  border-top: 1px solid var(--afy-border);
}
.afy2-chat-input-bar {
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.afy2-chat[data-chat-ready] .afy2-chat-input-bar {
  transform: translateY(0);
}

/* --- Chat Header --- */
.afy2-chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--afy-border);
  background: var(--afy-muted);
}

.afy2-chat-header-title {
  font-size: 14px;
  font-weight: 600;
}

.afy2-chat-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #fef2f2;
  color: #dc2626;
}

.afy2-chat-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2626;
  animation: afy2-chat-pulse 1.5s ease-in-out infinite;
}

@keyframes afy2-chat-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.afy2-chat-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--afy-muted-foreground);
}

/* --- Message Feed --- */
.afy2-chat-feed {
  height: 280px;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.afy2-chat-feed::-webkit-scrollbar {
  width: 4px;
}

.afy2-chat-feed::-webkit-scrollbar-track {
  background: transparent;
}

.afy2-chat-feed::-webkit-scrollbar-thumb {
  background: var(--afy-border);
  border-radius: 4px;
}

.afy2-chat-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--afy-muted-foreground);
  font-size: 13px;
}

/* --- Individual Message --- */
.afy2-chat-msg {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.afy2-chat-msg--bidder {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.03));
  border: 1px solid rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.1);
  transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

/* Initial burst glow when becoming a bidder */
.afy2-chat-msg--bidder-glow-in {
  animation: afy2-bidder-glow-pulse 1.2s ease-out;
}

@keyframes afy2-bidder-glow-pulse {
  0% {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0), rgba(245, 158, 11, 0));
    border-color: transparent;
    box-shadow: 0 0 0 rgba(245, 158, 11, 0);
  }
  30% {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  }
  100% {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.03));
    border-color: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.1);
  }
}

/* Bid amount update flash */
.afy2-chat-bid-tag--updating {
  animation: afy2-bid-tag-flash 0.8s ease-out;
}

@keyframes afy2-bid-tag-flash {
  0% { background: rgba(245, 158, 11, 0.12); }
  30% { background: rgba(245, 158, 11, 0.4); color: #fff; transform: scale(1.15); }
  100% { background: rgba(245, 158, 11, 0.12); color: #b45309; transform: scale(1); }
}

.afy2-chat-msg--self {
  background: var(--afy-muted);
}

.afy2-chat-msg-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.afy2-chat-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--afy-foreground);
}

.afy2-chat-name--bidder {
  color: #d97706;
  transition: color 0.6s ease;
}

.afy2-chat-bid-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  position: relative;
}

.afy2-chat-time {
  font-size: 10px;
  color: var(--afy-muted-foreground);
  margin-left: auto;
}

.afy2-chat-text {
  font-size: 13px;
  color: var(--afy-foreground);
}

/* --- Chat Sign-In Overlay --- */
.afy2-chat-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 200ms ease;
}

.afy2-chat-overlay.afy2-chat-overlay--hiding {
  opacity: 0;
  pointer-events: none;
}

.afy2-chat-overlay-signin,
.afy2-chat-overlay-username {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
}

.afy2-chat-overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #1a1f2e;
  color: #e8e8e8;
  border: 1px solid #232736;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--afy-font);
  transition: background 0.15s ease, transform 0.15s ease;
}

.afy2-chat-overlay-btn:hover {
  background: #232736;
  transform: scale(1.03);
}

.afy2-chat-overlay-label {
  font-size: 14px;
  font-weight: 600;
  color: #e8e8e8;
  text-align: center;
}

.afy2-chat-overlay-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 260px;
}

.afy2-chat-overlay-input {
  flex: 1;
  padding: 8px 12px;
  background: #1a1f2e;
  border: 1px solid #232736;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--afy-font);
  color: #e8e8e8;
  outline: none;
}

.afy2-chat-overlay-input:focus {
  border-color: #414564;
}

.afy2-chat-overlay-input::placeholder {
  color: rgba(160, 160, 160, 0.35);
}

.afy2-chat-overlay-set-btn {
  padding: 8px 16px;
  background: rgba(65, 69, 100, 0.2);
  color: #e8e8e8;
  border: 1px solid rgba(65, 69, 100, 0.3);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--afy-font);
  transition: background 0.15s ease;
}

.afy2-chat-overlay-set-btn:hover {
  background: rgba(65, 69, 100, 0.3);
}

.afy2-chat-overlay-set-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.afy2-chat-overlay-subtext {
  font-size: 11px;
  color: rgba(160, 160, 160, 0.6);
  text-align: center;
  max-width: 260px;
}

.afy2-chat-overlay-error {
  font-size: 11px;
  color: #f87171;
  text-align: center;
  min-height: 14px;
}

/* --- Message Input Bar --- */
.afy2-chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--afy-background);
}

.afy2-chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--afy-border);
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--afy-font);
  background: var(--afy-background);
  outline: none;
  min-width: 0;
}

.afy2-chat-input:focus {
  border-color: var(--afy-ring);
}

.afy2-chat-input::placeholder {
  color: var(--afy-muted-foreground);
}

.afy2-chat-send-btn {
  padding: 8px 14px;
  background: var(--afy-primary);
  color: var(--afy-primary-foreground);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--afy-font);
  white-space: nowrap;
}

.afy2-chat-send-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.afy2-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}



/* --- Chat disabled/offline state --- */
.afy2-chat-disabled {
  padding: 20px 16px;
  text-align: center;
  color: var(--afy-muted-foreground);
  font-size: 13px;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .afy2-chat-feed {
    height: 220px;
  }
}

/* ========================================
   STRUCTURAL: Squircle Background Layer
   Used by dark theme for SVG-based containers
   ======================================== */
.afy2-squircle-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.afy2-squircle-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Stat panels: squircle layout --- */
.afy2-stat--bid-panel,
.afy2-stat--countdown-panel {
  position: relative;
  overflow: visible;
}

.afy2-stat--bid-panel > *:not(.afy2-squircle-bg):not(.afy2-glow-effect),
.afy2-stat--countdown-panel > *:not(.afy2-squircle-bg):not(.afy2-glow-effect) {
  position: relative;
  z-index: 1;
}

/* --- Max Bid button (structural) --- */
.afy2-maxbid-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  font-family: var(--afy-font);
}

.afy2-maxbid-btn.afy2-shake {
  animation: afy2-shake 0.5s ease-in-out;
}

@keyframes afy2-shake {
  0%   { transform: translateX(0); }
  15%  { transform: translateX(6px); }
  30%  { transform: translateX(-6px); }
  45%  { transform: translateX(4px); }
  60%  { transform: translateX(-4px); }
  75%  { transform: translateX(2px); }
  90%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* --- Chat divider (structural) --- */
.afy2-chat-divider {
  height: 1px;
  background: var(--afy-border);
  margin: 0;
}

/* --- Emoji picker (structural) --- */
.afy2-emoji-picker {
  display: none; /* Shown by dark theme CSS */
}

/* --- Watching line (structural) --- */
.afy2-watching-line {
  display: none; /* Shown when data available */
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--afy-muted-foreground);
  margin-top: 8px;
}

/* --- Chat bid column (Twitch-style layout) --- */
.afy2-chat-bid-col {
  display: none; /* Shown by dark theme */
}

/* --- Chat message content wrapper --- */
.afy2-chat-msg-content {
  flex: 1;
  min-width: 0;
}

/* --- Chat gold badge --- */
.afy2-chat-gold-badge {
  display: none; /* Shown by dark theme */
}

/* --- Chat emote inline --- */
.afy2-chat-emote {
  width: 28px;
  height: 28px;
  display: inline-block;
  vertical-align: middle;
  margin: 0 1px;
}

/* --- Buy It Now section: hidden across all pages --- */
#afy2-bin-section {
  display: none;
}

/* ==========================
   STAGGERED REVEAL ANIMATION
   (in base CSS so children start at opacity:0 before dark.css loads)
   ========================== */
@keyframes afy2-fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.afy2[data-afy-ready] .afy2-title-line           { animation: afy2-fadeSlideIn 0.4s ease both; animation-delay: 0s; }
.afy2[data-afy-ready] .afy2-product-caption      { animation: afy2-fadeSlideIn 0.4s ease both; animation-delay: 0.05s; }
.afy2[data-afy-ready] .afy2-stats                { animation: afy2-fadeSlideIn 0.4s ease both; animation-delay: 0.1s; }
.afy2[data-afy-ready] .afy2-bid-section          { animation: afy2-fadeSlideIn 0.4s ease both; animation-delay: 0.15s; }
.afy2[data-afy-ready] .afy2-chat-outer           { animation: afy2-fadeSlideIn 0.4s ease both; animation-delay: 0.2s; }
.afy2[data-afy-ready] .afy2-actions              { animation: afy2-fadeSlideIn 0.4s ease both; animation-delay: 0.25s; }
.afy2[data-afy-ready] #afy2-history-btn          { animation: afy2-fadeSlideIn 0.4s ease both; animation-delay: 0.3s; }
.afy2[data-afy-ready] .afy2-product-info-outer   { animation: afy2-fadeSlideIn 0.4s ease both; animation-delay: 0.35s; }
