/*
 * Carpatian p17 catalog: functional styles for the blocks added by the cr_p17_* vQmods.
 * Loaded on every page through $this->document->addStyle() (before the Journal and cr_design_* CSS), so the design
 * team can restyle every class below from its own files. Colours use the p15 tokens with fallbacks.
 *   .cr-lei-price (+ __new / __old / __value)  informative price in lei, product page
 *   .cr-vat-note                                "Prețurile includ TVA", product page
 *   .cr-stock (+ __title / __list / __item / __name / __qty / __total)  stock per SmartBill warehouse, product page
 *   .cr-float (+ __btn / __btn--phone / __btn--whatsapp / __icon)       floating phone + WhatsApp buttons, all pages
 */

.cr-lei-price {
  display: inline-block;
  margin: 6px 0 4px;
  padding: 6px 12px;
  border-left: 3px solid var(--cr-success, #2ab858);
  border-radius: var(--cr-radius-sm, 3px);
  background: rgba(42, 184, 88, .08);
  color: var(--cr-text, #333);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.cr-lei-price__new,
.cr-lei-price__value {
  white-space: nowrap;
}

.cr-lei-price__old {
  margin-left: 6px;
  color: var(--cr-text-muted, #737381);
  font-weight: 400;
  text-decoration: line-through;
  white-space: nowrap;
}

.cr-vat-note {
  display: block;
  margin: 2px 0 6px;
  color: var(--cr-text-muted, #737381);
  font-size: 12px;
}

.cr-stock {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 3px solid var(--cr-accent, #f8303d);
  border-radius: var(--cr-radius, 5px);
  background: var(--cr-bg-alt, #f7f8fa);
}

.cr-stock__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.cr-stock__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cr-stock__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.cr-stock__item::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cr-text-muted, #737381);
}

.cr-stock__item--in::before {
  background: var(--cr-success, #2ab858);
}

.cr-stock__qty,
.cr-stock__total strong {
  font-weight: 700;
}

.cr-stock__total {
  margin-top: 6px;
  font-size: 13px;
}

.cr-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: row-reverse;
  gap: 10px;
  pointer-events: none;
}

.cr-float__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: var(--cr-shadow, 0 5px 10px rgba(0, 0, 0, .1));
  color: #fff;
  text-decoration: none;
  pointer-events: auto;
  transition: transform var(--cr-fast, 150ms) ease, box-shadow var(--cr-fast, 150ms) ease;
}

.cr-float__btn:hover,
.cr-float__btn:focus-visible {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--cr-shadow-lg, 0 12px 32px rgba(14, 17, 20, .14));
}

.cr-float__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cr-float__btn--phone {
  background: var(--cr-logo-red, #ed3237);
}

.cr-float__btn--whatsapp {
  background: var(--cr-whatsapp, #25d366);
}

.cr-float__icon {
  display: block;
}

@media (max-width: 600px) {
  .cr-float {
    right: 14px;
    bottom: 14px;
  }

  .cr-float__btn {
    width: 50px;
    height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cr-float__btn {
    transition: none;
  }
}
