/**
 * VEO Commercial Module
 *
 * NOTICE OF LICENSE
 *
 * This file is not open source. Each license purchased grants the right to use this module
 * on a single PrestaShop installation (including test stores and multishop instances).
 *
 * You are allowed to modify this module for your own use or your client's use, but you are
 * **not allowed to redistribute, resell, lease, license, sub-license, or share** this module
 * in whole or in part with third parties.
 *
 * Any other use of this module constitutes a violation of the license terms.
 *
 * DISCLAIMER
 *
 * This module is provided "as is", without warranties of any kind.
 * The author is not responsible for any data loss, security breach, or damage
 * resulting from its use. Use at your own risk and ensure compliance with your
 * store's legal, technical and PCI obligations.
 *
 * @author    Veo by Kebes
 * @copyright 2026 Veo by Kebes
 * @license   Commercial license - valid for one installation only
 */
/* The cart button of the results, the window to pick a variant and the products of the welcome.
   Colours, radius, easing and keyframes are those of the layer (front.css of VEO Smart Search) */

.veoss-card__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--veoss-text);
  border-radius: var(--veoss-radius);
  background: var(--veoss-bg);
  color: var(--veoss-text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3em;
  text-align: center;
  text-decoration: none;
}

.veoss-options__add {
  background: var(--veoss-text);
  color: var(--veoss-bg);
}

/* Only where there is a pointer that hovers: on touch the filled state would stay after the tap */
@media (hover: hover) {
  .veoss-card__cart:hover {
    background: var(--veoss-text);
    color: var(--veoss-bg);
  }
}

.veoss-card__cart[aria-disabled="true"],
.veoss-options__add[aria-disabled="true"] {
  opacity: 0.6;
  cursor: default;
}

.veoss-card__note {
  color: var(--veoss-muted);
  font-size: 0.8125rem;
  line-height: 1.4em;
}

.veoss-card__note:not(:empty):not(.veoss__sr) {
  margin-top: 0.25rem;
}

.veoss-options {
  width: min(26rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 0;
  border-radius: calc(var(--veoss-radius) * 2);
  background: var(--veoss-bg);
  color: var(--veoss-text);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}

.veoss-options::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.veoss-options__box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
}

.veoss-options__title {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.35em;
}

.veoss-options__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4em;
}

.veoss-options__field select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--veoss-muted);
  border-radius: var(--veoss-radius);
  background: var(--veoss-bg);
  color: inherit;
  font: inherit;
  font-weight: 400;
}

.veoss-options__price {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4em;
}

.veoss-options__note {
  min-height: 1.4em;
  margin: 0;
  color: var(--veoss-muted);
  font-size: 0.875rem;
  line-height: 1.4em;
}

.veoss-options__buttons {
  display: flex;
  gap: 0.75rem;
}

.veoss-options__add,
.veoss-options__close {
  flex: 1 1 0;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--veoss-text);
  border-radius: var(--veoss-radius);
  font-weight: 600;
}

.veoss-options__close {
  background: var(--veoss-bg);
}

.veoss-card__cart.is-added::before,
.veoss-options__add.is-added::before {
  content: "\2713";
  content: "\2713" / "";
  margin-right: 0.375rem;
}

/* Movement: short, soft and only for whoever has not asked for less of it */
@media (prefers-reduced-motion: no-preference) {
  .veoss-options[open]::backdrop {
    animation: veoss-fade var(--veoss-medium) ease-out;
  }

  .veoss__grid--welcome > .veoss-card {
    animation: veoss-rise 0.3s var(--veoss-ease) both;
    animation-delay: calc(var(--veoss-i, 0) * 28ms);
  }

  .veoss-card__cart,
  .veoss-options__add,
  .veoss-options__close {
    transition: background-color var(--veoss-fast) ease, color var(--veoss-fast) ease, border-color var(--veoss-fast) ease, transform var(--veoss-fast) var(--veoss-ease);
  }

  .veoss-card__cart:active,
  .veoss-options__add:active,
  .veoss-options__close:active {
    transform: scale(0.97);
  }

  .veoss-card__cart.is-added,
  .veoss-options__add.is-added {
    animation: veoss-pop 0.36s var(--veoss-ease);
  }

  .veoss-options[open] {
    animation: veoss-zoom var(--veoss-medium) var(--veoss-ease);
  }

  .veoss-options__price {
    transition: opacity var(--veoss-fast) ease;
  }
}
