/**
 * Bikeley · Marketplace · Checkout CSS (Phase 6a)
 */

.checkout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.checkout__back {
  margin-bottom: 16px;
}

.checkout__back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5E5F61;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.checkout__back-link:hover {
  color: #040C21;
}

.checkout__title {
  font-size: 28px;
  font-weight: 700;
  color: #040C21;
  margin: 0 0 6px;
}

.checkout__subtitle {
  color: #5E5F61;
  font-size: 14px;
  margin: 0 0 32px;
}

.checkout__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 880px) {
  .checkout__grid {
    grid-template-columns: 1fr;
  }
  .checkout__summary {
    order: -1;
  }
}

/* ─── MAIN FORM ─── */

.checkout__main {
  min-width: 0;
}

.checkout__section {
  background: #F8FAE5;
  border: 1px solid rgba(11, 11, 15, 0.08);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.checkout__section--info {
  background: rgba(239, 65, 53, 0.04);
  border-color: rgba(239, 65, 53, 0.15);
}

.checkout__section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 18px;
  color: #040C21;
}

.checkout__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #040C21;
  color: #FAF9E5;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
}

.checkout__field {
  margin-bottom: 14px;
}

.checkout__field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #5E5F61;
  margin-bottom: 6px;
}

.checkout__optional {
  font-weight: 400;
  color: #5E5F61;
  font-size: 12px;
}

.checkout__field input,
.checkout__field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(11, 11, 15, 0.16);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #F8FAE5;
  color: #040C21;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.checkout__field input:focus,
.checkout__field select:focus {
  outline: 0;
  border-color: #E73101;
  box-shadow: 0 0 0 3px rgba(239, 65, 53, 0.15);
}

.checkout__field input:invalid:not(:placeholder-shown) {
  border-color: #E73101;
}

.checkout__row {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}

.checkout__row--2 {
  grid-template-columns: 1fr 1fr;
}

.checkout__row--2-thin {
  grid-template-columns: 140px 1fr;
}

@media (max-width: 480px) {
  .checkout__row--2,
  .checkout__row--2-thin {
    grid-template-columns: 1fr;
  }
}

.checkout__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.06);
  color: #065f46;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin: 0 0 14px;
}

.checkout__payment-element {
  margin-top: 4px;
  min-height: 40px;
}

.checkout__error {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 10px;
  color: #E73101;
  font-size: 14px;
}

.checkout__info-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #040C21;
  margin: 0 0 10px;
}

.checkout__info-list {
  margin: 0;
  padding-left: 20px;
  color: #5E5F61;
  font-size: 13px;
  line-height: 1.6;
}

.checkout__info-list li {
  margin-bottom: 4px;
}

/* ─── SUBMIT-BUTTON ─── */

.checkout__submit {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #E73101 0%, #E73101 100%);
  color: #FAF9E5;
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  margin-top: 8px;
}

.checkout__submit:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(239, 65, 53, 0.3);
}

.checkout__submit:active:not(:disabled) {
  transform: translateY(1px);
}

.checkout__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.checkout__submit-amount {
  font-weight: 600;
}

.checkout__submit-spinner svg {
  animation: ck-spin 1s linear infinite;
}

@keyframes ck-spin {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}

.checkout__terms {
  text-align: center;
  font-size: 12px;
  color: #5E5F61;
  margin-top: 14px;
}

.checkout__terms a {
  color: inherit;
  text-decoration: underline;
}

/* ─── ORDER SUMMARY (right) ─── */

.checkout__summary {
  position: sticky;
  top: 20px;
}

.checkout__summary-card {
  background: #F8FAE5;
  border: 1px solid rgba(11, 11, 15, 0.08);
  border-radius: 16px;
  padding: 22px;
}

.checkout__summary-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5E5F61;
  margin: 0 0 18px;
}

.checkout__item {
  display: flex;
  gap: 12px;
}

.checkout__item-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(4,12,33, 0.04);
}

.checkout__item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.checkout__item-info {
  flex: 1;
  min-width: 0;
}

.checkout__item-cat {
  font-size: 10px;
  font-weight: 700;
  color: #E73101;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.checkout__item-title {
  font-size: 15px;
  font-weight: 600;
  color: #040C21;
  line-height: 1.3;
  margin-bottom: 4px;
}

.checkout__item-variant {
  font-size: 13px;
  color: #5E5F61;
  margin-bottom: 4px;
}

.checkout__item-provider {
  font-size: 12px;
  color: #5E5F61;
}

.checkout__item-qty {
  font-size: 13px;
  color: #5E5F61;
  margin-top: 6px;
}

.checkout__hr {
  border: 0;
  border-top: 1px solid rgba(11, 11, 15, 0.08);
  margin: 16px 0;
}

.checkout__totals {
  font-size: 14px;
}

.checkout__total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #5E5F61;
}

.checkout__total-row--final {
  font-size: 17px;
  color: #040C21;
  margin-bottom: 0;
}

.checkout__total-row--final strong {
  font-weight: 700;
}

.checkout__tax-note {
  font-size: 11px;
  color: #5E5F61;
  text-align: right;
  margin-top: 4px;
}

.checkout__trust {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  background: #F8FAE5;
  border: 1px solid rgba(11, 11, 15, 0.08);
  border-radius: 12px;
}

.checkout__trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #5E5F61;
}

.checkout__trust-item svg {
  color: #10B981;
  flex-shrink: 0;
}


/* ═══ Fix (2026-08-21): marketplace-neuerstil.css zieht .checkout__field
   fälschlich in seine Chip-Kanten-Liste (body.is-marketplace-page) —
   der FELD-CONTAINER bekam dadurch einen Ink-Rahmen um Label+Input.
   Höhere Spezifität (div.) schlägt die :is()-Regel unabhängig von der
   Ladereihenfolge. ═══ */
body.is-marketplace-page div.checkout__field{
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:0 !important;
}


/* ═══ MOBIL-FIX (2026-08-22): Einspaltig stapeln — Zusammenfassung
   kompakt OBEN, Formular darunter. Sticky aus, keine Überlappungen. ═══ */
@media (max-width: 860px){
  .checkout__grid{
    display:flex !important;
    flex-direction:column !important;
    gap:16px !important;
  }
  .checkout__summary{
    position:static !important;
    top:auto !important;
    order:-1;
    width:100% !important;
    max-width:none !important;
  }
  .checkout__summary-card{margin-bottom:0}
  .checkout__main{width:100% !important;max-width:none !important}
}


/* ═══ v43 (2026-08-22): Consent-Checkboxen (AGB Pflicht + Newsletter) ═══ */
.checkout__consents{display:flex;flex-direction:column;gap:12px;margin:16px 0 6px;}
.checkout__consent{display:flex;align-items:flex-start;gap:11px;font-size:13.5px;line-height:1.55;color:#040C21;cursor:pointer;}
.checkout__consent input[type="checkbox"]{appearance:none;-webkit-appearance:none;width:20px;height:20px;flex-shrink:0;margin-top:1px;border:2px solid #B9B8A6;border-radius:6px;background:#FFFDF2;cursor:pointer;position:relative;transition:border-color .15s,background .15s;}
.checkout__consent input[type="checkbox"]:checked{background:#E73101;border-color:#E73101;}
.checkout__consent input[type="checkbox"]:checked::after{content:'';position:absolute;left:5px;top:1.5px;width:5px;height:10px;border:solid #FAF9E5;border-width:0 2.5px 2.5px 0;transform:rotate(45deg);}
.checkout__consent input[type="checkbox"]:focus-visible{outline:2px solid #E73101;outline-offset:2px;}
.checkout__consent a{color:#040C21;font-weight:600;text-decoration:underline;}
.checkout__consent em{color:#E73101;font-style:normal;font-weight:800;}
