/* ==========================================================================
   The online invitation as a choice on the product page (UIE_Invite).
   Pills over the variation dropdown, which stays in the form out of sight.

   px, not rem: Bricks sets html{font-size:62.5%}.
   ========================================================================== */

.uie-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
}

/* Still in the form, still doing its job — WooCommerce reads it. */
select.uie-choice__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0 !important;
}

.uie-choice__pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 46px;
  margin: 0;
  padding: 11px 20px;
  border: 1px solid #e2d9ce;
  border-radius: 999px;
  background: #fff;
  color: #211e1b;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .uie-choice__pill:hover {
    border-color: #cbbfb1;
    background: #faf6f1;
    transform: translateY(-1px);
  }
}

.uie-choice__pill:active { transform: translateY(0); }

.uie-choice__pill:focus-visible {
  outline: 2px solid #35648f;
  outline-offset: 3px;
}

.uie-choice__pill.is-active {
  border-color: #211e1b;
  background: #211e1b;
  color: #fdfbf8;
}

/* WooCommerce says this combination cannot be bought */
.uie-choice__pill.is-gone {
  opacity: .42;
  cursor: not-allowed;
  text-decoration: line-through;
}

.uie-choice__extra {
  color: #7d4a34;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.uie-choice__pill.is-active .uie-choice__extra { color: #e7cdbd; }

@media (max-width: 420px) {
  .uie-choice__pill { flex: 1 1 100%; justify-content: space-between; }
}

/* With pills one option is always chosen; "Clear" would only empty the cart
   button. !important beats the themes that style the link inline-block. */
form.uie-choice-form .reset_variations { display: none !important; }

/* The option's description is read under "Šta znači …?", so it no longer
   appears under the pills on every click and pushes the page down. */
form.uie-choice-describes .woocommerce-variation-description { display: none !important; }

/* "Šta znači „sa potvrdom dolaska“?" — closed until asked */
.uie-choice__about { margin: 6px 0 0; }

.uie-choice__ask {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  padding: 0 4px 0 0;
  border: 0;
  background: none;
  color: #211e1b;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.uie-choice__ask > span:last-child {
  text-decoration: underline;
  text-decoration-color: #cbbfb1;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.uie-choice__ask-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid #8b7e72;
  border-radius: 999px;
  color: #7d4a34;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .uie-choice__ask:hover > span:last-child { text-decoration-color: #7d4a34; }
  .uie-choice__ask:hover .uie-choice__ask-mark { border-color: #7d4a34; }
}

.uie-choice__ask[aria-expanded="true"] .uie-choice__ask-mark {
  border-color: #211e1b;
  background: #211e1b;
  color: #fdfbf8;
}

.uie-choice__ask:focus-visible {
  outline: 2px solid #35648f;
  outline-offset: 3px;
  border-radius: 8px;
}

.uie-choice__panel {
  margin: 2px 0 4px;
  padding: 16px 18px;
  border: 1px solid #e2d9ce;
  border-radius: 14px;
  background: #fff;
  color: #6b6259;
  font-size: 13.5px;
  line-height: 1.55;
}

.uie-choice__panel[hidden] { display: none !important; }

.uie-choice__lead {
  margin: 0 0 12px;
  color: #211e1b;
  font-weight: 500;
}

.uie-choice__steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: uie-step;
}

.uie-choice__steps li {
  position: relative;
  margin: 0;
  padding: 0 0 0 32px;
  counter-increment: uie-step;
}

.uie-choice__steps li::before {
  content: counter(uie-step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  background: #f4e7df;
  color: #7d4a34;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.uie-choice__note {
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #efe9e1;
}

.uie-choice__note strong { color: #211e1b; font-weight: 600; }

/* 1.47: the sample invitation, a plain link at the end of the panel. */
.uie-choice__demo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  font-weight: 600;
  color: #7d4a34;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.uie-choice__demo::after { content: " →"; white-space: pre; }
.uie-choice__demo:focus-visible { outline: 2px solid #9a5f45; outline-offset: 2px; border-radius: 2px; }
@media (hover: hover) and (pointer: fine) {
  .uie-choice__demo:hover { color: #211e1b; }
}

@media (prefers-reduced-motion: no-preference) {
  .uie-choice__panel:not([hidden]) { animation: uie-choice-open 240ms cubic-bezier(0.22, 1, 0.36, 1); }
}

@keyframes uie-choice-open {
  from { opacity: 0; transform: translateY(-4px); }
}
