/* Panel zakupu Stripe – mobile: od dołu, desktop: z prawej */

.checkout-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.checkout-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.checkout-drawer {
  position: fixed;
  z-index: 9999;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

/* Mobile: arkusz od dołu */
@media (max-width: 767px) {
  .checkout-drawer {
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 92vh;
    border-radius: 1.25rem 1.25rem 0 0;
    transform: translateY(100%);
  }

  .checkout-drawer.is-open {
    transform: translateY(0);
  }
}

/* Desktop: panel z prawej */
@media (min-width: 768px) {
  .checkout-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100vw);
    max-width: 100vw;
    border-radius: 0;
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
  }

  .checkout-drawer.is-open {
    transform: translateX(0);
  }
}

.checkout-drawer-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.checkout-drawer-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #004d40;
}

.checkout-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 0.75rem;
  background: #f3f4f6;
  color: #374151;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.checkout-drawer-close:hover {
  background: #e5e7eb;
}

.checkout-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 320px;
}

#checkout-embed {
  min-height: 400px;
}

.checkout-loading,
.checkout-error-msg {
  padding: 2rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
}

.checkout-error-msg {
  color: #b91c1c;
}

body.checkout-panel-open {
  overflow: hidden;
}
