/* ============================================
   KAYJAH DESIGN STUDIO — Inquiry List
   Multi-product WhatsApp inquiry system

   Components: badge, drawer, toast, card button
   Follows: 8pt grid, 44px touch targets,
            Apple HIG deference + depth
   ============================================ */


/* ═══════════════════════════════
   FLOATING BADGE — bottom-left
   ═══════════════════════════════ */

.inq-badge {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 56px;
  height: 56px;
  background: var(--gold);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: var(--z-whatsapp);
  transition: transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease),
              opacity 0.3s var(--ease);
  animation: inq-badge-entrance 0.6s var(--ease) 2.4s both;
  opacity: 0;
  pointer-events: none;
}

.inq-badge.has-items {
  opacity: 1;
  pointer-events: auto;
}

.inq-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.inq-badge:active {
  transform: scale(0.95);
}

.inq-badge svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inq-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--ink);
  color: var(--surface-0);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

@keyframes inq-badge-entrance {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* ═══════════════════════════════
   DRAWER — slide-in from right
   ═══════════════════════════════ */

.inq-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 13, 10, 0.55);
  z-index: 3999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.inq-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.inq-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  height: 100%;
  background: var(--surface-0, #FAF8F5);
  z-index: 4000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
}

.inq-drawer.open {
  transform: translateX(0);
}

/* Header */
.inq-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--surface-3, #E8E4DF);
  flex-shrink: 0;
}

.inq-drawer-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.inq-drawer-close {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
  color: var(--ink);
  flex-shrink: 0;
}

.inq-drawer-close:hover {
  background: var(--surface-1, #F0EDE8);
}

.inq-drawer-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Scrollable list */
.inq-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}

/* Individual item */
.inq-drawer-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  transition: background 0.2s ease;
}

.inq-drawer-item:hover {
  background: var(--surface-1, #F0EDE8);
}

.inq-drawer-item-img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-1, #F0EDE8);
}

.inq-drawer-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inq-drawer-item-info {
  flex: 1;
  min-width: 0;
}

.inq-drawer-item-name {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inq-drawer-item-price {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2, #555);
}

.inq-drawer-item-remove {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ink-muted, #999);
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.inq-drawer-item-remove:hover {
  background: rgba(200, 50, 50, 0.08);
  color: #C83232;
}

.inq-drawer-item-remove svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Empty state */
.inq-drawer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 48px 24px;
  text-align: center;
}

.inq-drawer-empty svg {
  width: 48px;
  height: 48px;
  stroke: var(--ink-muted, #999);
  stroke-width: 1.2;
  fill: none;
  margin-bottom: 16px;
  opacity: 0.5;
}

.inq-drawer-empty p {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-muted, #999);
  margin: 0 0 16px;
}

.inq-drawer-empty a {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.inq-drawer-empty a:hover {
  color: var(--ink);
}

/* Footer */
.inq-drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--surface-3, #E8E4DF);
  flex-shrink: 0;
}

.inq-drawer-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.inq-drawer-count {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-muted, #999);
}

.inq-drawer-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted, #999);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px;
  transition: color 0.2s ease;
}

.inq-drawer-clear:hover {
  color: #C83232;
}

.inq-drawer-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 0 2rem;
  background: var(--gold);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 980px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.inq-drawer-send:hover {
  background: transparent;
  color: var(--ink);
}

.inq-drawer-send:active {
  transform: scale(0.98);
}

.inq-drawer-send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}


/* ═══════════════════════════════
   TOAST — bottom-center feedback
   ═══════════════════════════════ */

.inq-toast {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink, #1A1A1E);
  color: var(--surface-0, #FAF8F5);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  z-index: 4001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.inq-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}


/* ═══════════════════════════════
   CARD "ADD TO LIST" BUTTON
   ═══════════════════════════════ */

.cl-card-actions {
  display: flex;
  gap: 8px;
  margin: 0 0.5rem 0.5rem;
}

.cl-card-add-inquiry {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.6rem 0.75rem;
  background: transparent;
  color: var(--ink-muted, #999);
  border: 1px solid var(--surface-3, #E8E4DF);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease),
              color 0.3s var(--ease),
              background 0.3s var(--ease),
              transform 0.2s var(--ease);
}

.cl-card-add-inquiry:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.cl-card-add-inquiry:active {
  transform: scale(0.97);
}

/* Added state */
.cl-card-add-inquiry.is-added {
  border-color: var(--gold);
  color: var(--gold);
  pointer-events: none;
}

.cl-card-add-inquiry.is-added .inq-btn-label::before {
  content: '\2713  ';
}

/* Keep existing Enquire button flex share */
.cl-card-actions .cl-card-wa {
  flex: 1;
  margin: 0;
}


/* ═══════════════════════════════
   SINGLE PRODUCT — secondary CTA
   ═══════════════════════════════ */

.pd-cta-add-inquiry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 0 2rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--surface-3, #E8E4DF);
  border-radius: 980px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.2s ease,
              background 0.2s ease,
              color 0.2s ease,
              transform 0.15s ease;
}

.pd-cta-add-inquiry:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.pd-cta-add-inquiry:active {
  transform: scale(0.98);
  transition-duration: 0.08s;
}

/* Added state */
.pd-cta-add-inquiry.is-added {
  border-color: var(--gold);
  color: var(--gold);
  pointer-events: none;
}


/* ═══════════════════════════════
   FOCUS-VISIBLE
   ═══════════════════════════════ */

.inq-badge:focus-visible,
.inq-drawer-close:focus-visible,
.inq-drawer-send:focus-visible,
.inq-drawer-item-remove:focus-visible,
.inq-drawer-clear:focus-visible,
.cl-card-add-inquiry:focus-visible,
.pd-cta-add-inquiry:focus-visible {
  outline: 2px solid var(--accent, #0071E3);
  outline-offset: 3px;
}

.inq-badge:focus:not(:focus-visible),
.inq-drawer-close:focus:not(:focus-visible),
.inq-drawer-send:focus:not(:focus-visible),
.inq-drawer-item-remove:focus:not(:focus-visible),
.inq-drawer-clear:focus:not(:focus-visible),
.cl-card-add-inquiry:focus:not(:focus-visible),
.pd-cta-add-inquiry:focus:not(:focus-visible) {
  outline: none;
}


/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */

@media (max-width: 600px) {
  .inq-badge {
    bottom: 1.25rem;
    left: 1.25rem;
    width: 50px;
    height: 50px;
  }

  .inq-badge svg {
    width: 22px;
    height: 22px;
  }

  .inq-badge-count {
    min-width: 20px;
    height: 20px;
    font-size: 0.65rem;
  }

  .inq-drawer {
    width: 100%;
  }

  .inq-drawer-header {
    padding: 20px 16px 16px;
  }

  .inq-drawer-item {
    padding: 14px 16px;
    gap: 12px;
  }

  .inq-drawer-item-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }

  .inq-drawer-footer {
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .inq-drawer-send {
    min-height: 48px;
    font-size: 0.82rem;
  }

  .cl-card-actions {
    flex-direction: column;
    gap: 6px;
  }

  .cl-card-add-inquiry,
  .cl-card-actions .cl-card-wa {
    min-height: 44px;
  }

  .pd-cta-add-inquiry {
    min-height: 48px;
    font-size: 0.82rem;
  }

  .inq-toast {
    bottom: 5rem;
    max-width: calc(100% - 32px);
    font-size: 0.78rem;
  }
}


/* ═══════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .inq-badge {
    animation: none;
  }

  .inq-badge.has-items {
    opacity: 1;
  }

  .inq-drawer,
  .inq-drawer-overlay,
  .inq-toast {
    transition: none;
  }
}

/* Body scroll lock when drawer is open */
body.inq-drawer-open {
  overflow: hidden;
}
