/* Bruflor Custom Styles */

:root {
  --bruflor-primary: #ed2f6b;
  --bruflor-primary-hover: #c02757;
  --bruflor-secondary: #0fa877;
  --bruflor-secondary-hover: #0c846b;
}

.bruflor-announcements {
  background-color: var(--bruflor-secondary-hover);
  background-image:
    /* linear-gradient(rgba(12, 132, 107, 0.5), rgba(12, 132, 107, 0.5)), */ url("../img/notice.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.bruflor-announcements__item {
  padding: 0.75rem 1rem;
}

.bruflor-announcements__item + .bruflor-announcements__item {
  border-top: 1px solid rgba(255, 255, 255, 0.65);
}

.bruflor-announcements__message {
  margin: 0;
  text-align: center;
  color: #f7fffc;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.js-customer-form .bruflor-select {
  position: relative;
}

.js-customer-form .bruflor-select::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-30%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #4a4a4a;
  pointer-events: none;
}

.js-customer-form .bruflor-select select.form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2rem;
}

.bruflor-delivery {
  display: inline-flex;
  align-items: center;
}

.bruflor-delivery__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.bruflor-delivery__trigger-icon {
  color: #2b2824;
  line-height: 0;
}

.bruflor-delivery__trigger-icon svg {
  display: block;
  width: 28px;
  height: 15px;
}

.bruflor-delivery-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  overflow-y: auto;
  padding: 2rem 1rem;
}

.bruflor-delivery-modal.is-open {
  display: block;
}

.bruflor-delivery-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.bruflor-delivery-modal__dialog {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
  padding: 1.25rem;
  z-index: 1;
}

.bruflor-delivery-modal__close {
  position: absolute;
  right: 0.8rem;
  top: 0.55rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
}

.bruflor-delivery-modal__step {
  display: none;
}

.bruflor-delivery-modal__step.is-active {
  display: block;
}

.bruflor-delivery-modal__header {
  margin-bottom: 1rem;
  padding-right: 0;
  text-align: center;
}

.bruflor-delivery-modal h3.bruflor-delivery-modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #2b2824;
}

.bruflor-delivery-modal__subtitle {
  margin: 0.45rem 0 0;
  color: #555;
  font-size: 0.95rem;
}

.bruflor-delivery-modal__subtitle-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.35rem;
  color: currentColor;
}

.bruflor-delivery-methods {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bruflor-delivery-methods__column {
  padding: 0;
}

.bruflor-delivery-methods__title {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  text-align: center;
}

.bruflor-delivery-methods__list {
  display: grid;
  gap: 0.65rem;
}

.bruflor-delivery-methods__empty {
  margin: 0;
  color: #6f7680;
  font-size: 0.92rem;
}

.bruflor-delivery-method {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  cursor: pointer;
  border: 1px solid hsl(212, 20%, 96%);
  box-shadow: 0 0 10px 0 rgba(215, 221, 228, 0.3);
  border-radius: 10px;
  background: #fff;
  padding: 0.8rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.bruflor-delivery-method:hover {
  /* border-color: var(--bruflor-secondary); */
  box-shadow: 0 0 10px 5px rgba(215, 221, 228, 0.5);
  border-color: 1px solid hsl(212, 20%, 87%);
}

.bruflor-delivery-method:last-child {
  margin-bottom: 0;
}

.bruflor-delivery-method.is-active {
  border-color: var(--bruflor-secondary);
  background: rgba(15, 168, 119, 0.05);
  box-shadow: 0 0 0 2px rgba(15, 168, 119, 0.2);
}

.bruflor-delivery-method input[type="radio"] {
  margin-top: 0.22rem;
  accent-color: var(--bruflor-secondary);
}

.bruflor-delivery-method__content {
  display: block;
}

.bruflor-delivery-method__name {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.bruflor-delivery-method__description {
  display: block;
  margin-top: 0.2rem;
  color: #4d5661;
  font-size: 0.9rem;
}

.bruflor-delivery-method__notice {
  display: block;
  margin-top: 0.35rem;
  color: #4d5661;
  background: rgba(var(--bs-primary-rgb), 0.1);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
  font-size: 0.84rem;
  font-style: italic;
}

.bruflor-delivery-calendar {
  text-align: center;
  margin: 0 auto;
}

#bruflor-delivery-datepicker {
  width: 100%;
  max-width: 500px;
  margin: 3rem auto;
}

#bruflor-delivery-datepicker .ui-datepicker {
  width: 100%;
  max-width: 500px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

#bruflor-delivery-datepicker .ui-datepicker-header {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0.35rem 0;
  margin-bottom: 0.4rem;
  color: #101010;
}

#bruflor-delivery-datepicker .ui-datepicker-title {
  font-weight: 700;
  color: #111;
}

#bruflor-delivery-datepicker .ui-datepicker-prev,
#bruflor-delivery-datepicker .ui-datepicker-next {
  top: 0.35rem;
  border-radius: 999px;
  width: 1.8rem;
  height: 1.8rem;
}

#bruflor-delivery-datepicker .ui-datepicker-prev:hover,
#bruflor-delivery-datepicker .ui-datepicker-next:hover {
  background: rgba(15, 168, 119, 0.12);
}

#bruflor-delivery-datepicker th {
  color: var(--bruflor-secondary);
  font-weight: 400;
}

#bruflor-delivery-datepicker td {
  padding: 0.2rem;
}

#bruflor-delivery-datepicker .ui-state-default {
  border: 1px solid transparent;
  background: transparent;
  text-align: center;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #1f2429;
  font-weight: 400;
  margin: 0 auto;
}

#bruflor-delivery-datepicker .ui-datepicker-today .ui-state-default {
  border-color: var(--bruflor-secondary);
  color: var(--bruflor-secondary);
  font-weight: bold;
}

#bruflor-delivery-datepicker .ui-state-active,
#bruflor-delivery-datepicker .ui-state-hover {
  border-color: var(--bruflor-primary);
  background: var(--bruflor-primary);
  color: #fff;
}

#bruflor-delivery-datepicker .ui-datepicker-calendar td a.ui-state-hover {
  border-color: var(--bruflor-secondary);
  background: var(--bruflor-secondary);
  color: #fff;
}

#bruflor-delivery-datepicker .ui-state-disabled .ui-state-default {
  opacity: 0.65;
  color: #798594;
}

#bruflor-delivery-datepicker .ui-datepicker-today .ui-state-active,
#bruflor-delivery-datepicker
  .ui-datepicker-calendar
  td
  a.ui-state-hover.ui-state-active {
  border-color: var(--bruflor-primary);
  background: var(--bruflor-primary);
  color: #fff;
}

.bruflor-delivery-calendar__selected {
  margin: 1.5rem 0 0;
  font-weight: 600;
}

.bruflor-delivery-modal__footer {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #e6eaf0;
}

.bruflor-delivery-placeholder {
  margin: 1rem 0 1.5rem;
  padding: 1.25rem;
  border: 1px dashed #c8d2de;
  border-radius: 10px;
  background: transparent;
  text-align: center;
}

.bruflor-delivery-placeholder__image {
  margin: 0 0 1rem;
}

.bruflor-delivery-placeholder__image img {
  max-width: 460px;
  width: 100%;
  height: auto;
}

.bruflor-delivery-placeholder__title {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.bruflor-delivery-placeholder__text {
  margin: 0;
  color: #4f5964;
}

.bruflor-delivery-placeholder__actions {
  margin-top: 0.85rem;
}

.product-miniature .card {
  position: relative;
}

.bruflor-expired-badge {
  z-index: 5;
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 2px var(--bruflor-secondary-hover));
  pointer-events: none;
}

.bruflor-expired-badge--listing {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.bruflor-expired-badge--product {
  position: fixed;
  top: 6rem;
  right: 1rem;
}

.bruflor-expired-badge-piece {
  position: absolute;
  width: 80%;
  aspect-ratio: 1;
  background-color: var(--bruflor-secondary);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  animation: bruflor-expired-badge-rotation 6s infinite;
}
.bruflor-expired-badge-piece-2 {
  width: 85%;
  animation-delay: 1s;
}
.bruflor-expired-badge-piece-3 {
  width: 90%;
  animation-delay: 1.5s;
}
.bruflor-expired-badge-piece-4 {
  width: 95%;
  animation-delay: 2s;
}
.bruflor-expired-badge-piece-5 {
  width: 100%;
  animation-delay: 2.5s;
}
@keyframes bruflor-expired-badge-rotation {
  to {
    rotate: 360deg;
  }
}

.products article.bruflor-expired .wishlist-button-add {
  right: 4rem;
  display: none;
}

body.bruflor-delivery-modal-open {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .bruflor-delivery--mobile {
    order: 2;
  }

  .bruflor-delivery__trigger-text {
    display: none;
  }

  .bruflor-delivery-modal {
    padding: 1rem 0.7rem;
  }

  .bruflor-delivery-methods {
    grid-template-columns: 1fr;
    row-gap: 0.8rem;
  }

  .bruflor-delivery-modal__footer {
    flex-direction: row;
  }
}

/* Anonymous restrictions */

.bruflor-anonymous-register-promo {
  position: fixed;
  top: min(520px, 50vh);
  right: 0;
  z-index: 1020;
  display: flex;
  gap: 0;
  align-items: stretch;
  width: min(360px, calc(100vw - 0.75rem));
  min-height: 200px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding-left: 0;
  padding-right: 0;
  transition:
    width 0.3s ease,
    min-height 0.3s ease,
    height 0.3s ease,
    background-color 0.3s ease;
}
@media (min-width: 992px) {
  .bruflor-anonymous-register-promo:not(.is-collapsed) {
    width: auto;
    padding-right: calc((90vw - 1296px) / 2) !important;
  }
}

.row > .bruflor-anonymous-register-promo {
  padding-left: 0;
  padding-right: 0;
}

.bruflor-anonymous-register-promo__toggle {
  width: 40px;
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: #d1d1d3;
  color: #747474;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.bruflor-anonymous-register-promo__toggle:hover,
.bruflor-anonymous-register-promo__toggle:focus-visible {
  background: var(--bruflor-primary);
  color: #fff;
}

.bruflor-anonymous-register-promo__chevron {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
}

.bruflor-anonymous-register-promo__content {
  width: 300px;
  padding: 1.1rem 1.2rem 1.05rem;
  margin: 0;
  background: #fff;
  opacity: 1;
  overflow: hidden;
  transition:
    opacity 0.2s ease,
    width 0.3s ease,
    padding 0.3s ease;
}

.bruflor-anonymous-register-promo__title {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.12;
  text-align: center;
  color: #2b2824;
}

.bruflor-anonymous-register-promo h2.bruflor-anonymous-register-promo__title {
  color: #2b2824;
}

.footer .h2.bruflor-anonymous-register-promo__title,
.footer h2.bruflor-anonymous-register-promo__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.bruflor-anonymous-register-promo__description {
  margin: 0 0 0.9rem;
  color: #4f5964;
  font-size: 0.87rem;
  line-height: 1.35;
  text-align: center;
}

.bruflor-anonymous-register-promo__button {
  width: 100%;
  min-height: 42px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.bruflor-anonymous-register-promo.is-collapsed {
  width: 60px;
  min-height: 60px;
  height: 60px;
  background: #d6d6d6;
}

.bruflor-anonymous-register-promo.is-collapsed
  .bruflor-anonymous-register-promo__content {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  pointer-events: none;
}

.bruflor-anonymous-register-promo.is-collapsed
  .bruflor-anonymous-register-promo__toggle {
  width: 100%;
  height: 100%;
}

@media (max-width: 991.98px) {
  .bruflor-anonymous-register-promo {
    top: min(520px, 85vh);
    width: min(280px, calc(100vw - 0.5rem));
    min-height: 170px;
  }

  .bruflor-anonymous-register-promo__toggle {
    width: 40px;
  }

  .bruflor-anonymous-register-promo__content {
    width: calc(100% - 40px);
    padding: 0.9rem 0.85rem 0.8rem;
  }

  .bruflor-anonymous-register-promo__title {
    font-size: 1.05rem;
    margin-bottom: 0.45rem;
  }

  .bruflor-anonymous-register-promo__description {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .bruflor-anonymous-register-promo__button {
    min-height: 38px;
    font-size: 0.82rem;
  }

  .bruflor-anonymous-register-promo.is-collapsed {
    width: 40px;
    min-height: 40px;
    height: 40px;
  }
}

.bruflor-anonymous-cta {
  text-align: center;
}

.bruflor-anonymous-cta--product {
  padding: 1.25rem;
  border: 1px dashed #c8d2de;
  border-radius: 10px;
  background: #f7fafc;
  margin-bottom: 1.5rem;
}

.bruflor-anonymous-cta__icon {
  margin-bottom: 0.5rem;
  color: #6f7680;
}

.bruflor-anonymous-cta__icon .material-icons {
  font-size: 2rem;
}

.bruflor-anonymous-cta__text {
  margin: 0 0 0.75rem;
  color: #4f5964;
  font-size: 0.95rem;
}

body.bruflor-anonymous .blockcart {
  display: none;
}
