/* Berryman B-12 calculator — Motexa / Extendable theme */
.motexa-b12 {
  --b12-primary: var(--wp--preset--color--primary, #2c0453);
  --b12-primary-dark: #1f033d;
  --b12-secondary: var(--wp--preset--color--secondary, #d5dce3);
  --b12-tertiary: var(--wp--preset--color--tertiary, #f0ede4);
  --b12-text: var(--wp--preset--color--foreground, #111111);
  --b12-muted: #5c5c5c;
  --b12-border: var(--wp--preset--color--secondary, #d5dce3);
  --b12-card: #ffffff;
  --b12-width: min(1152px, calc(100vw - 2rem));
  position: relative;
  /* Break out of WordPress constrained content so the card can be wider */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  font-family: inherit;
  color: var(--b12-text);
  background: var(--b12-tertiary);
  border-top: 1px solid var(--b12-border);
  border-bottom: 1px solid var(--b12-border);
  box-sizing: border-box;
}

.entry-content .motexa-b12,
.wp-block-post-content .motexa-b12,
.wp-site-blocks .motexa-b12 {
  max-width: 100vw !important;
}

.motexa-b12__bg {
  display: none;
}

.motexa-b12__inner {
  position: relative;
  z-index: 1;
  width: var(--b12-width);
  max-width: var(--b12-width);
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.motexa-b12__anim {
  opacity: 0;
  transform: translateY(14px);
  animation: motexaB12FadeUp 0.6s ease forwards;
}

.motexa-b12__anim:nth-child(2) { animation-delay: 0.1s; }
.motexa-b12__anim:nth-child(3) { animation-delay: 0.18s; }

@keyframes motexaB12FadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.motexa-b12__head {
  text-align: center;
  margin-bottom: 1.6rem;
}

.motexa-b12__badge {
  display: inline-block;
  background: var(--b12-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.motexa-b12__head h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  color: var(--b12-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.motexa-b12__head p {
  margin: 0 auto;
  max-width: 700px;
  color: var(--b12-muted);
  line-height: 1.65;
  font-size: 0.96rem;
}

.motexa-b12__head em {
  color: var(--b12-primary);
  font-style: normal;
  font-weight: 600;
}

.motexa-b12__videos-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 700;
  color: var(--b12-primary);
  text-decoration: none;
}

.motexa-b12__videos-link:hover {
  text-decoration: underline;
}

.motexa-b12__progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
}

.motexa-b12__pi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
}

.motexa-b12__pi.done { cursor: pointer; }

.motexa-b12__pi-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--b12-card);
  border: 2px solid var(--b12-border);
  color: var(--b12-muted);
  font-size: 0.76rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.28s ease;
}

.motexa-b12__pi.active .motexa-b12__pi-dot {
  background: var(--b12-primary);
  border-color: var(--b12-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(44, 4, 83, 0.14);
  transform: scale(1.06);
}

.motexa-b12__pi.done .motexa-b12__pi-dot {
  background: var(--b12-primary);
  border-color: var(--b12-primary);
  color: #fff;
  opacity: 0.72;
}

.motexa-b12__pi-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--b12-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.motexa-b12__pi.active .motexa-b12__pi-label,
.motexa-b12__pi.done .motexa-b12__pi-label {
  color: var(--b12-text);
}

.motexa-b12__pi-line {
  flex: 1;
  height: 2px;
  background: var(--b12-border);
  margin: 0 0.3rem 1.1rem;
  min-width: 28px;
  transition: background 0.35s ease;
}

.motexa-b12__pi-line.done {
  background: var(--b12-primary);
  opacity: 0.45;
}

.motexa-b12__card {
  background: var(--b12-card);
  border: 1px solid var(--b12-border);
  border-radius: 16px;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  box-shadow: 0 8px 28px rgba(44, 4, 83, 0.06);
}

.motexa-b12__search-wrap {
  position: relative;
  margin-bottom: 1.1rem;
}

.motexa-b12__search-wrap input {
  width: 100%;
  min-height: 46px;
  padding: 0.68rem 0.95rem 0.68rem 2.7rem;
  border: 1px solid var(--b12-border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--b12-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.motexa-b12__search-wrap input::placeholder {
  color: #8a8a8a;
}

.motexa-b12__search-wrap input:focus {
  border-color: var(--b12-primary);
  box-shadow: 0 0 0 3px rgba(44, 4, 83, 0.12);
}

.motexa-b12__search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--b12-muted);
}

.motexa-b12__brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 0.6rem;
}

.motexa-b12__brand-card {
  border: 1px solid var(--b12-border);
  border-radius: 12px;
  padding: 0.7rem 0.45rem 0.55rem;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
  animation: motexaB12BrandIn 0.4s ease backwards;
}

.motexa-b12__brand-card:nth-child(1) { animation-delay: 0.02s; }
.motexa-b12__brand-card:nth-child(2) { animation-delay: 0.04s; }
.motexa-b12__brand-card:nth-child(3) { animation-delay: 0.06s; }
.motexa-b12__brand-card:nth-child(4) { animation-delay: 0.08s; }
.motexa-b12__brand-card:nth-child(n+5) { animation-delay: 0.1s; }

@keyframes motexaB12BrandIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.motexa-b12__brand-card:hover {
  transform: translateY(-3px);
  border-color: var(--b12-primary);
  box-shadow: 0 10px 22px rgba(44, 4, 83, 0.1);
}

.motexa-b12__brand-logo-wrap {
  width: 58px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 0;
  padding: 0;
  flex-shrink: 0;
}

.motexa-b12__brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.motexa-b12__brand-abbr {
  display: none;
}

.motexa-b12__brand-fallback {
  color: var(--b12-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.motexa-b12__brand-name {
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--b12-muted);
  text-align: center;
  max-width: 92px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.motexa-b12__chip-grid,
.motexa-b12__eng-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.motexa-b12__chip {
  background: var(--b12-tertiary);
  border: 1px solid var(--b12-border);
  color: var(--b12-text);
  padding: 0.52rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.18s ease;
}

.motexa-b12__chip:hover {
  border-color: var(--b12-primary);
  color: var(--b12-primary);
  background: #fff;
}

.motexa-b12__eng-chip {
  background: #fff;
  border: 2px solid var(--b12-border);
  color: var(--b12-text);
  padding: 0.62rem 1.05rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
  min-width: 74px;
  text-align: center;
  transition: all 0.18s ease;
}

.motexa-b12__eng-chip:hover {
  border-color: var(--b12-primary);
  color: var(--b12-primary);
}

.motexa-b12__panel-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.motexa-b12__back {
  background: #fff;
  border: 1px solid var(--b12-border);
  color: var(--b12-text);
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
  transition: all 0.18s ease;
}

.motexa-b12__back:hover {
  border-color: var(--b12-primary);
  color: var(--b12-primary);
}

.motexa-b12__back--ghost {
  margin-left: auto;
}

.motexa-b12__breadcrumb {
  color: var(--b12-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.motexa-b12__step-label {
  color: var(--b12-text);
  font-size: 1.02rem;
  font-weight: 800;
}

.motexa-b12__search-models-label {
  color: var(--b12-muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.95rem 0 0.55rem;
}

.motexa-b12__soak-wrap { margin-bottom: 1rem; }

.motexa-b12__soak-label {
  color: var(--b12-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.motexa-b12__soak-toggle {
  display: inline-flex;
  border: 1px solid var(--b12-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--b12-tertiary);
}

.motexa-b12__soak-btn {
  border: 0;
  background: transparent;
  color: var(--b12-muted);
  padding: 0.55rem 1.15rem;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  transition: all 0.2s ease;
}

.motexa-b12__soak-btn.active {
  background: var(--b12-primary);
  color: #fff;
}

.motexa-b12__result {
  background: var(--b12-tertiary);
  border: 1px solid var(--b12-border);
  border-radius: 14px;
  padding: 1.25rem;
  animation: motexaB12Reveal 0.45s ease;
}

@keyframes motexaB12Reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.motexa-b12__result-car {
  color: var(--b12-muted);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.motexa-b12__result-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.motexa-b12__bottles-count {
  font-size: 3rem;
  font-weight: 900;
  color: var(--b12-primary);
  line-height: 1;
  letter-spacing: -0.03em;
  animation: motexaB12Pop 0.5s ease;
}

@keyframes motexaB12Pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.motexa-b12__bottles-unit {
  color: var(--b12-muted);
  font-size: 0.84rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.motexa-b12__bottles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.55rem;
}

.motexa-b12__bottle-icon {
  height: 56px;
  width: auto;
  animation: motexaB12BottleIn 0.35s ease backwards;
}

.motexa-b12__bottle-icon:nth-child(1) { animation-delay: 0.04s; }
.motexa-b12__bottle-icon:nth-child(2) { animation-delay: 0.08s; }
.motexa-b12__bottle-icon:nth-child(3) { animation-delay: 0.12s; }
.motexa-b12__bottle-icon:nth-child(n+4) { animation-delay: 0.16s; }

@keyframes motexaB12BottleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.motexa-b12__result-model-img {
  width: 168px;
  height: 106px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--b12-border);
  background: #fff;
}

.motexa-b12__result-model-img.is-logo {
  object-fit: contain;
  padding: 0.55rem;
  background: transparent;
}

.motexa-b12__result-detail {
  background: #fff;
  border: 1px solid var(--b12-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.95rem;
}

.motexa-b12__result-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  padding: 0.2rem 0;
}

.motexa-b12__result-row span:first-child { color: var(--b12-muted); }
.motexa-b12__result-row span:last-child { color: var(--b12-text); font-weight: 700; text-align: right; }

.motexa-b12__result-pack {
  background: #fff;
  border: 1px solid var(--b12-border);
  border-left: 4px solid var(--b12-primary);
  border-radius: 12px;
  padding: 0.95rem 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.motexa-b12__pack-info {
  font-size: 0.84rem;
  color: var(--b12-muted);
}

.motexa-b12__pack-info strong {
  display: block;
  color: var(--b12-text);
  font-size: 0.94rem;
  margin-bottom: 0.18rem;
}

.motexa-b12__add-btn {
  background: var(--b12-primary);
  color: #fff;
  border: 0;
  padding: 0.68rem 1.25rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.motexa-b12__add-btn:hover {
  background: var(--b12-primary-dark);
  transform: translateY(-1px);
}

.motexa-b12__add-btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.motexa-b12-fly {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 28px rgba(44, 4, 83, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.motexa-b12-fly img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.motexa-b12-cart-bump {
  animation: motexaB12CartBump 0.45s ease;
}

@keyframes motexaB12CartBump {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.28); }
  70% { transform: scale(0.94); }
}

.motexa-b12__note {
  color: var(--b12-muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.motexa-b12__note a {
  color: var(--b12-primary);
  font-weight: 700;
  text-decoration: none;
}

.motexa-b12__note a:hover { text-decoration: underline; }

.motexa-b12__empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--b12-muted);
  font-size: 0.86rem;
}

.motexa-b12__panel {
  animation: motexaB12Panel 0.3s ease;
}

.motexa-b12__panel[hidden] {
  display: none !important;
}

@keyframes motexaB12Panel {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 640px) {
  .motexa-b12 { padding-left: 0; padding-right: 0; }
  .motexa-b12__inner { padding-left: 1rem; padding-right: 1rem; }
  .motexa-b12__brand-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .motexa-b12__bottles-count { font-size: 2.35rem; }
  .motexa-b12__back--ghost { margin-left: 0; width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .motexa-b12__anim,
  .motexa-b12__brand-card,
  .motexa-b12__bottle-icon {
    animation: none !important;
  }
  .motexa-b12__anim { opacity: 1; transform: none; }
}
