/* =============================================
   VENTO — Panel & Sticky Button
   Module vt_vento v1.1.0
   ============================================= */

/* ── FAB (Floating Action Button) ── */

.vt-vento-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1300;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px 0 16px;
  border: 1px solid rgba(214, 232, 75, 0.54);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(48, 68, 40, 0.97), rgba(26, 40, 28, 0.98));
  color: #eaf2a8;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 8px 28px rgba(12, 18, 14, 0.38),
    0 0 30px rgba(214, 232, 75, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 70px rgba(214, 232, 75, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
}

.vt-vento-fab::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 5px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(214, 232, 75, 0.74), transparent);
  pointer-events: none;
}

.vt-vento-fab:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 232, 75, 0.74);
  box-shadow:
    0 12px 36px rgba(12, 18, 14, 0.44),
    0 0 40px rgba(214, 232, 75, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 0 88px rgba(214, 232, 75, 0.16);
}

.vt-vento-fab:active {
  transform: translateY(0);
}

.vt-vento-fab__icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.vt-vento-fab__label {
  line-height: 1;
}

/* ── Panel (slide-over from right) ── */

.vt-vento-panel[hidden] {
  display: none !important;
}

.vt-vento-panel {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  justify-content: flex-end;
}

.vt-vento-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 14, 0.52);
  backdrop-filter: blur(4px);
}

.vt-vento-panel__drawer {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(420px, 92vw);
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fcfbf7;
  border-left: 1px solid rgba(31, 77, 46, 0.1);
  box-shadow: -12px 0 48px rgba(12, 18, 14, 0.22);
  animation: vtVentoPanelSlideIn 0.25s ease-out;
}

@keyframes vtVentoPanelSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

html.vt-vento-panel-open {
  overflow: hidden;
}

/* Header */

.vt-vento-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(31, 77, 46, 0.08);
}

.vt-vento-panel__eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef3ec;
  color: #1f4d2e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.vt-vento-panel__title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  color: #1a1a1a;
}

.vt-vento-panel__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 77, 46, 0.06);
  color: #1f4d2e;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.vt-vento-panel__close:hover {
  background: rgba(31, 77, 46, 0.12);
}

/* Shortcuts */

.vt-vento-panel__shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(31, 77, 46, 0.06);
}

.vt-vento-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(31, 77, 46, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #2d5a3a;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.vt-vento-shortcut:hover {
  background: #eef3ec;
  border-color: rgba(31, 77, 46, 0.28);
}

.vt-vento-shortcut__icon {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Form */

.vt-vento-panel__form {
  padding: 16px 20px;
}

.vt-vento-panel__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1a1a;
}

.vt-vento-panel__input-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.vt-vento-panel__input {
  flex: 1 1 0%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 77, 46, 0.16);
  border-radius: 14px;
  background: #fff;
  color: #1a1a1a;
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  box-shadow: inset 0 1px 2px rgba(16, 24, 18, 0.04);
}

.vt-vento-panel__input:focus {
  outline: 0;
  border-color: rgba(31, 77, 46, 0.38);
  box-shadow: 0 0 0 3px rgba(31, 77, 46, 0.1);
}

.vt-vento-panel__send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: #1f4d2e;
  color: #e8e4d8;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.vt-vento-panel__send:hover {
  background: #2a6b3e;
  transform: translateY(-1px);
}

.vt-vento-panel__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Response zone */

.vt-vento-panel__response[hidden] {
  display: none !important;
}

.vt-vento-panel__response {
  padding: 0 20px 16px;
  flex: 1 1 auto;
}

/* Single response message */
.vt-vento-response-msg {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f3f6ef;
  color: #1f281f;
  font-size: 0.9rem;
  line-height: 1.65;
  border: 1px solid rgba(31, 77, 46, 0.08);
}

.vt-vento-response-msg--loading {
  color: #1f4d2e;
  font-weight: 600;
}

.vt-vento-response-msg--error {
  background: #fff3f0;
  border-color: rgba(143, 44, 31, 0.14);
  color: #8f2c1f;
}

.vt-vento-response-confirmation {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 77, 46, 0.14);
  border-radius: 12px;
  background: #eef3ec;
  color: #1f4d2e;
  font-size: 0.8rem;
  line-height: 1.55;
}

/* Product items grid */
.vt-vento-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.vt-vento-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 77, 46, 0.1);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vt-vento-item:hover {
  border-color: rgba(31, 77, 46, 0.24);
  box-shadow: 0 2px 8px rgba(12, 18, 14, 0.08);
}

.vt-vento-item__img {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0ede6;
}

.vt-vento-item__body {
  flex: 1 1 0%;
  min-width: 0;
}

.vt-vento-item__prices {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.vt-vento-item__name {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.vt-vento-item__meta {
  font-size: 0.78rem;
  color: #667267;
  margin-top: 2px;
}

.vt-vento-item__note {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #4f5d51;
  line-height: 1.45;
}

.vt-vento-item__price {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1f4d2e;
}

.vt-vento-item__price--regular {
  font-size: 0.76rem;
  font-weight: 500;
  color: #8a9488;
  text-decoration: line-through;
}

/* Actions */
.vt-vento-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.vt-vento-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid rgba(31, 77, 46, 0.2);
  border-radius: 999px;
  background: #1f4d2e;
  color: #e8e4d8;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

button.vt-vento-action {
  appearance: none;
  -webkit-appearance: none;
}

.vt-vento-action:hover {
  background: #2a6b3e;
  color: #fff;
}

/* Footer */

.vt-vento-panel__footer {
  margin-top: auto;
  padding: 12px 20px;
  border-top: 1px solid rgba(31, 77, 46, 0.06);
}

.vt-vento-panel__footer-text {
  margin: 0;
  font-size: 0.72rem;
  color: #8a9488;
  text-align: center;
}

/* ── Mobile adjustments ── */

@media (max-width: 767px) {
  .vt-vento-fab {
    bottom: 16px;
    right: 16px;
    height: 44px;
    padding: 0 16px 0 14px;
    font-size: 0.82rem;
  }

  .vt-vento-fab__label {
    display: none;
  }

  .vt-vento-fab {
    padding: 0;
    width: 48px;
    height: 48px;
    justify-content: center;
    border-radius: 50%;
  }

  .vt-vento-panel__drawer {
    width: 100%;
    max-width: 100vw;
    border-left: 0;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  .vt-vento-panel__shortcuts {
    padding: 12px 16px;
  }

  .vt-vento-shortcut {
    font-size: 0.78rem;
    padding: 7px 12px;
  }

  .vt-vento-panel__form {
    padding: 12px 16px;
  }

  .vt-vento-panel__header {
    padding: 20px 16px 12px;
  }

  .vt-vento-panel__response {
    padding: 0 16px 12px;
  }

  .vt-vento-panel__footer {
    padding: 10px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vt-vento-fab,
  .vt-vento-shortcut,
  .vt-vento-panel__send,
  .vt-vento-item,
  .vt-vento-action,
  .vt-vento-panel__drawer {
    animation: none !important;
    transition: none !important;
  }
}
