/* DCS WooCommerce Cart Frontend Styles - Version 1.1.1 KORRIGIERT */

:root {
  --dwc-primary: #6366f1;
  --dwc-primary-rgb: 99, 102, 241;
  --dwc-radius: 8px;
  --dwc-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --dwc-shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
  --dwc-transition: all 0.2s ease;
  --dwc-coupon-color: #e09000;
}

/* === ELEMENT VISIBILITY CONTROL === */
body:not(.dwc-accordion-enabled) .dwc-section-header {
  display: none !important;
}

body:not(.dwc-payment-icons-enabled) .dwc-payment-icons {
  display: none !important;
}

/* === H3 ÜBERSCHRIFTEN - 30px für Hauptüberschriften === */
.woocommerce-checkout h3,
#order_review h3,
#order_payment_heading,
.dwc-coupon-title,
.dwc-order-review-title,
.woocommerce-checkout .woocommerce-billing-fields > h3 {
  font-size: 30px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

/* === Kontaktinformation und Lieferadresse = 24px === */
.dwc-section-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

/* === E-MAIL FELD MIT HINTERGRUND === */
#billing_email_field {
  background: #f0f4f8 !important;
  padding: 1rem !important;
  border-radius: var(--dwc-radius) !important;
  margin-bottom: 1.5rem !important;
  border: 1px solid #e5e7eb !important;
}

/* === SECTION HEADERS === */
.dwc-section-header {
  padding-bottom: 1rem;
}

.dwc-section-description {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
}

/* === GUTSCHEIN SECTION MIT HINTERGRUND === */
.dwc-coupon-section {
  background: #f0f4f8 !important;
  padding: 1rem !important;
  border-radius: var(--dwc-radius) !important;
  margin-top: 2rem;
  border: 1px solid #e5e7eb !important;
}

.dwc-coupon-form {
  margin: 0;
}

.dwc-coupon-input-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Gutschein Input - 80% Desktop/Tablet */
#coupon_code,
.dwc-coupon-input {
  width: 80% !important;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: var(--dwc-radius);
  font-size: 1rem;
  background: white;
}

#coupon_code:focus,
.dwc-coupon-input:focus {
  outline: none;
  border-color: var(--dwc-coupon-color);
  box-shadow: 0 0 0 3px rgba(224, 144, 0, 0.1);
}

/* === GUTSCHEIN BUTTON - ORANGE UND KLEIN === */
.dwc-coupon-button {
  background: #e09000 !important;
  color: white !important;
  padding: 14px !important;
  border: none !important;
  border-radius: var(--dwc-radius) !important;
  font-size: 14px !important;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.dwc-coupon-button:hover {
  background: #cc8000 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(224, 144, 0, 0.2);
}

/* Standard WooCommerce Coupon verstecken */
.woocommerce-form-coupon-toggle,
.woocommerce-form-coupon {
  display: none !important;
}

/* === "DEINE BESTELLUNG" TITEL === */
.dwc-order-review-title {
  font-size: 30px !important;
  font-weight: 600;
  color: #1f2937;
  margin: 1rem 0 !important;
}

/* Standard WooCommerce Order Review Heading verstecken */
#order_review_heading {
  display: none !important;
}

/* === CHECKOUT BADGES - 3 SPALTEN GRID LAYOUT === */
.dwc-checkout-badges-wrapper {
  margin-bottom: 2rem;
}

/* WICHTIG: Grid-Layout für die Badge-Container */
.dwc-guarantee-badges,
.dwc-guarantee-badges.modern.horizontal,
.dwc-checkout-badges-wrapper .dwc-guarantee-badges {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1rem !important;
  margin-bottom: 0 !important;
}

/* Einzelne Badge-Boxen */
.dwc-guarantee-badge,
.dwc-checkout-badges-wrapper .dwc-guarantee-badge {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 1rem !important;
  background: #f0f4f8 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: var(--dwc-radius) !important;
  min-width: auto !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.dwc-guarantee-badge:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  border-color: #6366f1 !important;
}

.dwc-badge-icon,
.dwc-checkout-badges-wrapper .dwc-badge-icon {
  font-size: 1.5rem !important;
  flex-shrink: 0 !important;
  filter: none !important;
}

.dwc-badge-content,
.dwc-checkout-badges-wrapper .dwc-badge-content {
  flex: 1 !important;
}

.dwc-badge-title,
.dwc-checkout-badges-wrapper .dwc-badge-title {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
}

/* Mobile-Text ausblenden */
.dwc-badge-title .dwc-mobile-text {
  display: none !important;
}

/* Verhindere doppelte Badge-Anzeige in rechter Spalte */
.dwc-checkout-guarantees {
  display: none !important;
}

/* === AKKORDION STYLES === */
.dwc-checkout-accordion-wrapper {
  margin-bottom: 2rem;
}

.dwc-order-accordion {
  border: 1px solid #e5e7eb;
  border-radius: var(--dwc-radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--dwc-shadow);
  margin-bottom: 1.5rem;
}

.dwc-accordion-header {
  padding: 1rem 1.5rem;
  background: #f9fafb;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
  transition: var(--dwc-transition);
  user-select: none;
}

.dwc-accordion-header:hover {
  background: #f3f4f6;
}

.dwc-accordion-header:focus {
  outline: 2px solid var(--dwc-primary);
  outline-offset: -2px;
}

.dwc-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dwc-order-summary {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dwc-toggle-text {
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
}

.dwc-price-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dwc-original-price {
  text-decoration: line-through;
  color: #6b7280;
  font-size: 0.9rem;
}

.dwc-total-price {
  font-weight: 700;
  color: #1f2937;
  font-size: 1.1rem;
}

.dwc-toggle-icon {
  transition: transform 0.3s ease;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dwc-expanded .dwc-toggle-icon {
  transform: rotate(180deg);
}

/* Akkordion Content Animation */
.dwc-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dwc-expanded .dwc-accordion-content {
  max-height: 1000px;
}

.dwc-order-details {
  padding: 1.5rem;
  background: white;
}

/* === WARENKORB ITEMS === */
.dwc-cart-items {
  margin-bottom: 1.5rem;
}

.dwc-cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.dwc-cart-item:last-child {
  border-bottom: none;
}

.dwc-item-image {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: var(--dwc-radius);
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}

.dwc-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dwc-no-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 1.5rem;
}

.dwc-quantity-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--dwc-primary);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(var(--dwc-primary-rgb), 0.3);
}

.dwc-item-details {
  flex: 1;
  min-width: 0;
}

.dwc-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dwc-item-variation {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.3;
}

.dwc-item-price {
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
  white-space: nowrap;
}

/* === PREISAUFSCHLÜSSELUNG === */
.dwc-price-breakdown {
  border-top: 2px solid #f3f4f6;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.dwc-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.dwc-price-row.dwc-discount {
  color: #059669;
  font-weight: 600;
}

.dwc-price-row.dwc-total {
  font-size: 1.1rem;
  font-weight: 700;
  border-top: 2px solid #e5e7eb;
  margin-top: 0.5rem;
  padding-top: 1rem;
  color: #1f2937;
}

.dwc-savings-badge {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #059669;
  padding: 0.75rem 1rem;
  border-radius: var(--dwc-radius);
  text-align: center;
  margin-top: 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid #a7f3d0;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.1);
}

/* === PAYMENT ICONS === */
.dwc-payment-icons {
  margin: 2rem 0 0 0;
  text-align: center;
}

.dwc-payment-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #1f2937;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dwc-security-icon {
  font-size: 1.2rem;
}

.dwc-wc-payment-methods {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dwc-wc-payment-method {
  display: inline-block;
  transition: var(--dwc-transition);
}

.dwc-wc-payment-method:hover {
  transform: translateY(-2px);
}

.dwc-wc-payment-method img {
  max-height: 32px;
  width: auto;
  object-fit: contain;
}

/* Custom Icons Grid */
.dwc-icons-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dwc-payment-icon {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--dwc-radius);
  background: white;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--dwc-transition);
  box-shadow: var(--dwc-shadow);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
}

.dwc-payment-icon:hover {
  transform: translateY(-2px);
  box-shadow: var(--dwc-shadow-lg);
  border-color: var(--dwc-primary);
}

/* === PRODUKT SECTIONS === */
.dwc-product-payment-section {
  margin: 1.5rem 0;
}

.dwc-product-payment-section fieldset,
.single-product-payments {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  background: #f9fafb;
  margin: 1rem 0;
}

.dwc-product-payment-section legend,
.single-product-payments legend {
  font-weight: 600;
  padding: 0 0.5rem;
  color: #1f2937;
  font-size: 0.95rem;
}

.single-product-payments ul {
  list-style: none !important;
  margin: 0.5rem 0 0 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
}

.single-product-payments li {
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  height: 32px !important;
}

.dwc-product-guarantees {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.dwc-product-guarantees p {
  margin: 0 0 0.75rem 0;
  font-weight: 600;
  color: #1f2937;
}

.dwc-product-guarantees ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.dwc-product-guarantees li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #374151;
}

.dwc-product-guarantees .kadence-svg-iconset {
  color: #10b981;
  flex-shrink: 0;
}

/* === Standard Order Review Table - NICHT verstecken === */
/* Die Standard-Tabelle wird nur versteckt, wenn direkt danach ein Akkordion kommt */
.dwc-order-accordion + .woocommerce-checkout-review-order-table {
  display: none !important;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  /* Kontaktinformation und Lieferadresse bleiben 24px */
  .dwc-section-title {
    font-size: 24px !important;
  }

  /* Andere H3 kleiner auf Mobile */
  .woocommerce-checkout h3,
  #order_review h3,
  #order_payment_heading,
  .dwc-coupon-title,
  .dwc-order-review-title {
    font-size: 26px !important;
  }

  .dwc-section-description {
    font-size: 0.85rem;
  }
  
  .dwc-accordion-header {
    padding: 0.75rem 1rem;
  }
  
  .dwc-order-details {
    padding: 1rem;
  }
  
  .dwc-cart-item {
    gap: 0.75rem;
  }
  
  .dwc-item-image {
    width: 50px;
    height: 50px;
  }
  
  .dwc-quantity-badge {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }
  
  .dwc-item-title {
    font-size: 0.9rem;
  }
  
  .dwc-item-variation {
    font-size: 0.8rem;
  }
  
  /* Badges auf Tablet: IMMER 3 Spalten nebeneinander */
  .dwc-guarantee-badges,
  .dwc-guarantee-badges.modern.horizontal,
  .dwc-checkout-badges-wrapper .dwc-guarantee-badges {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
  }
  
  /* Badge-Boxen kleiner machen */
  .dwc-guarantee-badge {
    padding: 0.75rem 0.5rem !important;
  }
  
  .dwc-badge-icon {
    font-size: 1.2rem !important;
  }
  
  .dwc-badge-title {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
  }
  
  .dwc-icons-grid {
    gap: 0.5rem;
  }
  
  .dwc-payment-icon {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    min-height: 36px;
  }
  
  .dwc-toggle-text {
    font-size: 0.9rem;
  }
  
  .dwc-total-price {
    font-size: 1rem;
  }
  
  /* GUTSCHEIN AUF MOBILE */
  .dwc-coupon-input-wrapper {
    flex-direction: column;
  }
  
  /* Gutschein Input auf Mobile 100% */
  #coupon_code,
  .dwc-coupon-input {
    width: 100% !important;
  }
  
  .dwc-coupon-button {
    width: 100%;
  }
  
  .single-product-payments ul {
    gap: 0.3rem !important;
  }
  
  .single-product-payments li {
    height: 28px !important;
  }
}

@media (max-width: 480px) {
  .dwc-header-content {
    align-items: flex-start;
  }
  
  .dwc-price-summary {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
  }
  
  /* Badges auf Mobile: IMMER 3 Spalten nebeneinander, noch kleiner */
  .dwc-guarantee-badges,
  .dwc-guarantee-badges.modern.horizontal,
  .dwc-checkout-badges-wrapper .dwc-guarantee-badges {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.25rem !important;
  }
  
  /* Badge-Boxen noch kleiner für kleine Smartphones */
  .dwc-guarantee-badge {
    padding: 0.4rem 0.25rem !important;
    gap: 0.4rem !important;
  }
  
  .dwc-badge-icon {
    font-size: 0.9rem !important;
  }
  
  .dwc-badge-title {
    font-size: 0.55rem !important;
    line-height: 1.1 !important;
    font-weight: 500 !important;
  }
  
  .single-product-payments ul {
    justify-content: center !important;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .dwc-accordion-content,
  .dwc-toggle-icon,
  .dwc-payment-icon,
  .dwc-guarantee-badge,
  .dwc-cart-item {
    transition: none !important;
  }
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
  .dwc-order-accordion {
    border: 2px solid #000;
  }
  
  .dwc-accordion-header {
    background: #fff;
    border-bottom: 2px solid #000;
  }
  
  .dwc-payment-icon,
  .dwc-guarantee-badge {
    border: 2px solid #000;
  }
  
  .dwc-coupon-section,
  #billing_email_field {
    border: 2px solid #000 !important;
  }
}

/* === PRINT STYLES === */
@media print {
  .dwc-toggle-icon,
  .dwc-accordion-header,
  .dwc-payment-icons,
  .dwc-guarantee-badges,
  .dwc-coupon-section {
    display: none !important;
  }
  
  .dwc-accordion-content {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* === E-MAIL NOTICE STYLING === */
.custom-email-notice {
  margin-top: 10px;
  padding: 20px;
  background: #e09000;
  color: #fff;
  font-weight: bolder;
  border-radius: 5px;
}

.custom-email-notice a {
  color: #fff !important;
  text-decoration: underline;
}

/* === AGB CHECKBOX STYLING === */
/* AGB-Text initial dunkelrot und fett */
.woocommerce-gzd-legal-checkbox-text {
  color: #800000 !important;
  font-weight: bold !important;
  transition: all 0.3s ease;
}

/* Links im AGB-Text auch dunkelrot */
.woocommerce-gzd-legal-checkbox-text a {
  color: #800000 !important;
  font-weight: bold !important;
  text-decoration: underline !important;
}

/* Wenn Checkbox aktiviert - alles normal */
#legal:checked ~ .woocommerce-gzd-legal-checkbox-text {
  color: inherit !important;
  font-weight: normal !important;
}

#legal:checked ~ .woocommerce-gzd-legal-checkbox-text a {
  color: #0073aa !important;  /* Standard Link-Farbe */
  font-weight: normal !important;
}

/* Info Block ausblenden */
.woocommerce-additional-fields, #gh_marketing_consent_field, .woocommerce-info, .woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout {
  display: none;
}

.woocommerce form .form-row .button {
    width: 100%;
}

/* AGB */
.wc-gzd-checkbox-placeholder.wc-gzd-checkbox-placeholder-legal {
  background: #f0f4f8;
  padding: 1rem 1rem 0.5rem 1rem;
  border-radius: var(--dwc-radius) !important;
  margin: 1rem 0;
  border: 1px solid #e5e7eb !important;
}