.tamzera-checkout-modal[hidden] {
  display: none !important;
}

.tamzera-checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 28px);
}

.tamzera-checkout-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 29, 24, 0.64);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tamzera-checkout-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(980px, 100%);
  height: min(760px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid rgba(36, 63, 53, 0.18);
  border-radius: 24px;
  background: #fef7ee;
  box-shadow: 0 28px 90px rgba(10, 24, 19, 0.34);
  transform: translateY(10px) scale(0.992);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.tamzera-checkout-modal.is-open .tamzera-checkout-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.tamzera-checkout-modal__bar {
  flex: 0 0 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 0 22px;
  border-bottom: 1px solid rgba(36, 63, 53, 0.12);
  background: #fffdf8;
  color: #243f35;
}

.tamzera-checkout-modal__heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tamzera-checkout-modal__title {
  margin: 0;
  font: 700 16px/1.15 var(--font-family, sans-serif);
  letter-spacing: -0.01em;
}

.tamzera-checkout-modal__subtitle {
  margin: 0;
  overflow: hidden;
  color: rgba(36, 63, 53, 0.68);
  font: 500 11px/1.25 var(--font-family, sans-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tamzera-checkout-modal__close {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(36, 63, 53, 0.16);
  border-radius: 999px;
  background: #fef7ee;
  color: #243f35;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.tamzera-checkout-modal__close:hover {
  background: #243f35;
  color: #fef7ee;
}

.tamzera-checkout-modal__close:focus-visible {
  outline: 2px solid #243f35;
  outline-offset: 2px;
}

.tamzera-checkout-modal__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #fef7ee;
}

.tamzera-checkout-modal__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fef7ee;
}

.tamzera-checkout-modal__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
  background: #fef7ee;
  color: #243f35;
  font: 600 12px/1.4 var(--font-family, sans-serif);
}

.tamzera-checkout-modal__loading[hidden] {
  display: none !important;
}

.tamzera-checkout-skeleton{
  display:grid;
  gap:10px;
}

.tamzera-checkout-skeleton > span{
  display:block;
  border-radius:11px;
  background:linear-gradient(90deg, rgba(36,63,53,.06), rgba(36,63,53,.12), rgba(36,63,53,.06));
  background-size:220% 100%;
  animation:tamzera-checkout-shimmer 1.2s ease-in-out infinite;
}

.tamzera-checkout-skeleton__title{
  width:46%;
  height:22px;
  margin-block-end:2px;
}

.tamzera-checkout-skeleton__field{
  width:100%;
  height:44px;
}

.tamzera-checkout-skeleton__field--large{
  height:64px;
}

.tamzera-checkout-skeleton__order{
  height:112px;
  margin-block-start:2px;
  border-radius:14px !important;
}

.tamzera-checkout-skeleton__button{
  height:50px;
  margin-block-start:2px;
}

.tamzera-checkout-modal__loading-label{
  opacity:.64;
  text-align:center;
}

.tamzera-checkout-modal__fallback {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #243f35;
  font-size: 13px;
}

.tamzera-checkout-modal__fallback[hidden] {
  display: none !important;
}

html:has(body.tamzera-checkout-open) {
  overflow: hidden !important;
  overflow-x: clip !important;
}

body.tamzera-checkout-open {
  position: fixed !important;
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  overflow: hidden !important;
  overflow-x: clip !important;
}

@keyframes tamzera-checkout-shimmer {
  0% { background-position:100% 0; }
  100% { background-position:-120% 0; }
}

@media (max-width: 768px) {
  body.tamzera-checkout-open #menu,
  body.tamzera-checkout-open #cart,
  body.tamzera-checkout-open #search {
    display: none !important;
  }

  .tamzera-checkout-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: clip !important;
    place-items: center;
    padding: 12px;
  }

  .tamzera-checkout-modal__backdrop {
    display: block;
    background: rgba(15, 29, 24, 0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .tamzera-checkout-modal__panel {
    width: min(390px, calc(100vw - 24px));
    height: min(660px, calc(100dvh - 80px));
    max-height: calc(100dvh - 24px);
    border: 1px solid rgba(36, 63, 53, 0.18);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(10, 24, 19, 0.38);
  }

  .tamzera-checkout-modal__bar {
    flex-basis: 48px;
    padding-inline: 14px 10px;
  }

  .tamzera-checkout-modal__title {
    font-size: 14px;
  }

  .tamzera-checkout-modal__subtitle {
    max-width: 255px;
    font-size: 9.5px;
  }

  .tamzera-checkout-modal__close {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .tamzera-checkout-modal__body {
    overflow: hidden;
  }
  .tamzera-checkout-modal__loading{
    padding:14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tamzera-checkout-modal__panel {
    transition: none;
  }

  .tamzera-checkout-skeleton > span {
    animation:none;
  }
}
