/**
 * SecretUndies Checkout Design
 * Konvertiert aus Neuer Checkout/code.html
 */

:root {
  --su-checkout-primary: #f0527b;
  --su-checkout-primary-hover: #d9446a;
  --su-checkout-bg: #f8f9fa;
  --su-checkout-card-bg: #ffffff;
  --su-checkout-border: #e2e8f0;
  --su-checkout-text: #1e293b;
  --su-checkout-text-muted: #64748b;
  --su-checkout-input-bg: #f1f5f9;
}

/* Checkout Wrapper */
body.woocommerce-checkout .su-checkout-wrapper,
body.woocommerce-checkout .woocommerce {
  font-family: 'Inter', system-ui, sans-serif !important;
}

/* Step Header */
.su-checkout-steps {
  padding: 3rem 0;
  border-bottom: 1px solid var(--su-checkout-border);
  background: var(--su-checkout-card-bg);
}

.su-checkout-steps-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.su-checkout-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.su-checkout-step.su-step-inactive {
  opacity: 0.6;
}

.su-checkout-step.su-step-active .su-checkout-step-num {
  background: var(--su-checkout-primary);
  color: white;
}

.su-checkout-step.su-step-future {
  opacity: 0.4;
}

.su-checkout-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.su-checkout-step-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
}

.su-checkout-step-divider {
  width: 2rem;
  height: 1px;
  background: #cbd5e1;
}

/* Step Header – responsive */
@media (max-width: 767px) {
  .su-checkout-steps {
    padding: 1.5rem 0 !important;
  }

  .su-checkout-steps-inner {
    padding: 0 0.75rem !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .su-checkout-step {
    gap: 0.5rem !important;
  }

  .su-checkout-step-num {
    width: 1.5rem !important;
    height: 1.5rem !important;
    font-size: 0.75rem !important;
  }

  .su-checkout-step-label {
    font-size: 0.625rem !important;
    letter-spacing: 0.05em !important;
  }

  .su-checkout-step-divider {
    width: 1rem !important;
  }
}

@media (max-width: 479px) {
  .su-checkout-steps-inner {
    gap: 0.5rem !important;
  }

  .su-checkout-step-label {
    font-size: 0.5625rem !important;
  }
}

/* Main Container - Layout via su-cart-layout (su-cart.css) */
.su-checkout-main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Cards – kompakte Abstände */
.su-checkout-card {
  background: var(--su-checkout-card-bg);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--su-checkout-border);
  margin-bottom: 2rem;
}

.su-checkout-summary.su-checkout-card {
  margin-bottom: 0;
}

.su-checkout-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
}

.su-checkout-section-title .material-symbols-outlined {
  margin-right: 0.5rem;
  color: var(--su-checkout-primary);
}

.material-symbols-outlined {
  font-size: 1.25rem;
  vertical-align: middle;
}

/* Order Items */
.su-checkout-order-items .su-checkout-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  transition: opacity 0.3s;
}

.su-checkout-order-items .su-checkout-item:not(:last-child) {
  border-bottom: 1px solid #f1f5f9;
}

.su-checkout-order-items .su-checkout-item:hover {
  opacity: 1;
}

.su-checkout-item-img {
  width: 6rem;
  height: 6rem;
  flex-shrink: 0;
  border-radius: 4px;
  background: #f1f5f9;
  overflow: hidden;
}

.su-checkout-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.su-checkout-item-content {
  flex: 1;
  min-width: 0;
}

.su-checkout-item-header {
  display: flex;
  justify-content: space-between;
}

.su-checkout-item-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.su-checkout-item-price {
  font-size: 0.875rem;
  font-weight: 700;
  margin-left: 1rem;
}

.su-checkout-item-meta {
  font-size: 0.75rem;
  color: var(--su-checkout-text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.su-checkout-item-qty {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.su-checkout-coupon-note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  line-height: 1.6;
  color: var(--su-checkout-text-muted);
  font-style: italic;
}

/* Form Inputs */
.su-checkout-form .form-row {
  margin-bottom: 1rem;
}

.su-checkout-form input[type="text"],
.su-checkout-form input[type="email"],
.su-checkout-form input[type="tel"],
.su-checkout-form select,
.su-checkout-form textarea {
  width: 100% !important;
  background: var(--su-checkout-input-bg) !important;
  border: 1px solid var(--su-checkout-border) !important;
  padding: 1rem !important;
  font-size: 0.875rem !important;
  border-radius: 4px !important;
  transition: all 0.2s !important;
}

.su-checkout-form input:focus,
.su-checkout-form select:focus,
.su-checkout-form textarea:focus {
  box-shadow: 0 0 0 4px rgba(240, 82, 123, 0.15) !important;
  border-color: var(--su-checkout-primary) !important;
  outline: none !important;
}

/* Billing/Shipping form grid (Vor-/Nachname, PLZ/Stadt nebeneinander) */
.su-checkout-form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.su-checkout-form-row-grid .form-row.form-row-wide,
.su-checkout-form-row-grid .form-row-wide {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .su-checkout-form-row-grid {
    grid-template-columns: 1fr;
  }
}

/* Payment Methods – kompakt */
.su-checkout-payment-methods .wc_payment_method {
  margin-bottom: 0.75rem;
}

.su-checkout-payment-methods label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--su-checkout-border);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.su-checkout-payment-methods label:hover {
  background: var(--su-checkout-input-bg);
}

.su-checkout-payment-methods input {
  margin: 0 !important;
  accent-color: var(--su-checkout-primary);
}

.su-checkout-payment-methods .payment_method_label {
  display: flex !important;
  align-items: center;
  margin-left: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Payment method cards (Karten-Styling) */
.su-checkout-payment-methods .wc_payment_method > label,
.su-checkout-payment-methods .su-checkout-payment-label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--su-checkout-border);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.su-checkout-payment-methods .wc_payment_method > label:hover,
.su-checkout-payment-methods .su-checkout-payment-label:hover {
  background: var(--su-checkout-input-bg);
}

.su-checkout-payment-methods .wc_payment_method label:has(input:checked) {
  border-color: var(--su-checkout-primary);
  box-shadow: 0 0 0 2px rgba(240, 82, 123, 0.15);
}

.su-checkout-payment-label-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.su-checkout-payment-label-inner {
  font-size: 0.875rem;
  font-weight: 500;
}

.su-checkout-payment-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.su-checkout-payment-icon img {
  height: 1.25rem;
  width: auto;
  opacity: 0.8;
}

.su-checkout-payment-methods .payment_box {
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--su-checkout-input-bg);
  border-radius: 4px;
  border: 1px solid var(--su-checkout-border);
}

/* Order Summary Sidebar */
.su-checkout-summary-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.su-checkout-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.su-checkout-summary-row .amount {
  font-weight: 500;
}

.su-checkout-summary-total {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.su-checkout-summary-total-label {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.su-checkout-summary-total-note {
  font-size: 10px;
  color: #94a3b8;
}

.su-checkout-summary-total-amount {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--su-checkout-primary);
}

.su-checkout-summary-actions {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.su-checkout-summary-actions .form-row.place-order {
  margin-bottom: 0;
}

.su-checkout-summary-actions .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 0.75rem;
}

.su-checkout-summary-actions .woocommerce-terms-and-conditions-checkbox-text {
  font-size: 0.75rem !important;
  line-height: 1.4 !important;
}

/* Place Order Button */
.su-checkout-place-order {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--su-checkout-primary) !important;
  color: white !important;
  font-weight: 700 !important;
  padding: 1.25rem 1.5rem !important;
  border-radius: 4px !important;
  box-shadow: 0 10px 15px -3px rgba(240, 82, 123, 0.2) !important;
  transition: all 0.2s !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-size: 0.875rem !important;
  border: none !important;
  cursor: pointer !important;
  text-align: center !important;
}

.su-checkout-place-order:hover {
  background: var(--su-checkout-primary-hover) !important;
}

/* Express Checkout Divider */
.su-checkout-express-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
  margin: 1rem 0;
}

.su-checkout-express-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--su-checkout-border);
}

.su-checkout-express-divider span {
  background: var(--su-checkout-card-bg);
  padding: 0 0.75rem;
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
}

/* Trust Badges */
.su-checkout-trust {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #f1f5f9;
}

.su-checkout-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.su-checkout-trust-item .material-symbols-outlined {
  color: #94a3b8;
  font-size: 1.25rem;
}

.su-checkout-trust-item p {
  font-size: 11px;
  color: var(--su-checkout-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Customer Details – kompakte Abstände */
.su-checkout-form-fields {
  margin-bottom: 0;
}

.su-checkout-form-fields .col-1,
.su-checkout-form-fields .col-2 {
  margin-bottom: 0;
}

/* Col2-set override for our layout */
.su-checkout-wrapper .col2-set {
  display: block !important;
}

.su-checkout-wrapper .col2-set .col-1,
.su-checkout-wrapper .col2-set .col-2 {
  width: 100% !important;
  float: none !important;
}

.su-checkout-wrapper .col2-set .col-1 {
  margin-bottom: 0;
}

.su-checkout-wrapper .col2-set .col-2 {
  margin-top: 0.75rem;
}

/* Doppelte Place-Order + AGB in Linker Spalte verstecken (nur rechts) */
.su-cart-main .su-checkout-payment-section .form-row.place-order,
.su-cart-main .su-checkout-payment-section .woocommerce-terms-and-conditions,
.su-cart-main #payment .form-row.place-order,
.su-cart-main #payment .woocommerce-terms-and-conditions-wrapper {
  display: none !important;
}

/* Rechte Spalte: Nur Zusammenfassung + Place Order – kein doppeltes #payment */
.su-cart-sidebar #payment:not(.su-checkout-payment-methods) {
  display: none !important;
}

/* Order Review kompakt */
.su-checkout-order-review {
  padding: 0;
}
