/* =======================================================================
   EP Unterseiten: Aa-Komfortschrift (Desktop)
   Gilt nur in den gekennzeichneten Seiteninhalten, niemals im Header.
   Die Schriftstufen werden bereits zentral in base_head.html gespeichert.
   Die Selektoren mit !important übersteuern feste px-Werte in den
   bisherigen seitenlokalen Styles und in dynamisch erzeugten Elementen.
   Smartphone-/Tablet-Layout bleibt absichtlich unverändert.
   ======================================================================= */
@media (min-width: 1024px) {
  html[data-comfort="large"] body:is(.ep-page-orders, .ep-page-account, .ep-page-partners, .ep-page-zertifikate, .ep-page-contact) {
    --ep-sub-body: 16px;
    --ep-sub-small: 14px;
    --ep-sub-tiny: 12.5px;
    --ep-sub-input: 17px;
    --ep-sub-button: 17px;
    --ep-sub-section: 21px;
    --ep-sub-title: 32px;
  }
  html[data-comfort="xlarge"] body:is(.ep-page-orders, .ep-page-account, .ep-page-partners, .ep-page-zertifikate, .ep-page-contact) {
    --ep-sub-body: 18px;
    --ep-sub-small: 16px;
    --ep-sub-tiny: 14px;
    --ep-sub-input: 19px;
    --ep-sub-button: 19px;
    --ep-sub-section: 24px;
    --ep-sub-title: 36px;
  }

  /* Gemeinsame Text- und Bedienelemente der Unterseiten */
  html[data-comfort="large"] body:is(.ep-page-orders, .ep-page-account, .ep-page-partners, .ep-page-zertifikate, .ep-page-contact) :is(.layout, .wrap),
  html[data-comfort="xlarge"] body:is(.ep-page-orders, .ep-page-account, .ep-page-partners, .ep-page-zertifikate, .ep-page-contact) :is(.layout, .wrap) {
    font-size: var(--ep-sub-body) !important;
  }
  html[data-comfort="large"] body:is(.ep-page-orders, .ep-page-account, .ep-page-partners, .ep-page-zertifikate, .ep-page-contact) :is(.layout, .wrap) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
  html[data-comfort="xlarge"] body:is(.ep-page-orders, .ep-page-account, .ep-page-partners, .ep-page-zertifikate, .ep-page-contact) :is(.layout, .wrap) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: var(--ep-sub-input) !important;
    min-height: 44px;
  }
  html[data-comfort="large"] body:is(.ep-page-orders, .ep-page-account, .ep-page-partners, .ep-page-zertifikate, .ep-page-contact) :is(.layout, .wrap) :is(button, .btn-primary, .btn-secondary, .action-btn, .btn-submit),
  html[data-comfort="xlarge"] body:is(.ep-page-orders, .ep-page-account, .ep-page-partners, .ep-page-zertifikate, .ep-page-contact) :is(.layout, .wrap) :is(button, .btn-primary, .btn-secondary, .action-btn, .btn-submit) {
    font-size: var(--ep-sub-button) !important;
    line-height: 1.3;
  }

  /* Online-Bestellungen: Zusammenfassung, Detailtabellen und Bedienelemente */
  html[data-comfort="large"] body.ep-page-orders .wrap > .panel > h1,
  html[data-comfort="xlarge"] body.ep-page-orders .wrap > .panel > h1 {
    font-size: var(--ep-sub-title) !important;
    line-height: 1.2;
  }
  html[data-comfort="large"] body.ep-page-orders .wrap > .panel > p,
  html[data-comfort="xlarge"] body.ep-page-orders .wrap > .panel > p {
    font-size: var(--ep-sub-body) !important;
    line-height: 1.5;
  }
  html[data-comfort="large"] body.ep-page-orders .wrap > .panel > table > thead > tr > th,
  html[data-comfort="xlarge"] body.ep-page-orders .wrap > .panel > table > thead > tr > th {
    font-size: var(--ep-sub-small) !important;
    line-height: 1.35;
  }
  html[data-comfort="large"] body.ep-page-orders #ordersTable > tbody > tr:not(.detail-row) > td,
  html[data-comfort="xlarge"] body.ep-page-orders #ordersTable > tbody > tr:not(.detail-row) > td {
    font-size: var(--ep-sub-body) !important;
    line-height: 1.5;
  }
  html[data-comfort="large"] body.ep-page-orders #ordersTable > tbody > tr:not(.detail-row) > td :is(div, span),
  html[data-comfort="xlarge"] body.ep-page-orders #ordersTable > tbody > tr:not(.detail-row) > td :is(div, span) {
    font-size: var(--ep-sub-body) !important;
  }
  html[data-comfort="large"] body.ep-page-orders #ordersTable .detail-row :is(th, .detail-table th),
  html[data-comfort="xlarge"] body.ep-page-orders #ordersTable .detail-row :is(th, .detail-table th) {
    font-size: var(--ep-sub-tiny) !important;
  }
  html[data-comfort="large"] body.ep-page-orders #ordersTable .detail-row :is(td, .detail-table td),
  html[data-comfort="xlarge"] body.ep-page-orders #ordersTable .detail-row :is(td, .detail-table td) {
    font-size: var(--ep-sub-small) !important;
    line-height: 1.45;
  }
  html[data-comfort="large"] body.ep-page-orders #ordersTable .detail-row :is(.dyn-reorder-btn, .pbtn),
  html[data-comfort="xlarge"] body.ep-page-orders #ordersTable .detail-row :is(.dyn-reorder-btn, .pbtn) {
    font-size: var(--ep-sub-small) !important;
    min-height: 36px;
  }
  html[data-comfort="large"] body.ep-page-orders .pagination :is(.pbtn, .pinfo),
  html[data-comfort="xlarge"] body.ep-page-orders .pagination :is(.pbtn, .pinfo),
  html[data-comfort="large"] body.ep-page-orders .wrap > div > a[href="/"],
  html[data-comfort="xlarge"] body.ep-page-orders .wrap > div > a[href="/"] {
    font-size: var(--ep-sub-body) !important;
  }
  html[data-comfort="large"] body.ep-page-orders #reorderPreviewList,
  html[data-comfort="xlarge"] body.ep-page-orders #reorderPreviewList,
  html[data-comfort="large"] body.ep-page-orders #reorderErrorBox,
  html[data-comfort="xlarge"] body.ep-page-orders #reorderErrorBox {
    font-size: var(--ep-sub-body) !important;
  }

  /* Mein Konto: größere Formularfläche, gut lesbare Labels und Hinweise */
  html[data-comfort="large"] body.ep-page-account .layout,
  html[data-comfort="large"] body.ep-page-zertifikate .layout { max-width: 900px !important; }
  html[data-comfort="xlarge"] body.ep-page-account .layout,
  html[data-comfort="xlarge"] body.ep-page-zertifikate .layout { max-width: 1000px !important; }
  html[data-comfort="large"] body.ep-page-account .layout > .card,
  html[data-comfort="large"] body.ep-page-zertifikate .layout > .card { max-width: 720px !important; }
  html[data-comfort="xlarge"] body.ep-page-account .layout > .card,
  html[data-comfort="xlarge"] body.ep-page-zertifikate .layout > .card { max-width: 820px !important; }
  html[data-comfort="large"] body.ep-page-account .layout h2,
  html[data-comfort="xlarge"] body.ep-page-account .layout h2,
  html[data-comfort="large"] body.ep-page-zertifikate .layout h2,
  html[data-comfort="xlarge"] body.ep-page-zertifikate .layout h2 {
    font-size: var(--ep-sub-title) !important;
    line-height: 1.2;
  }
  html[data-comfort="large"] body.ep-page-account .layout :is(label, .muted, .mode-option-desc, .mode-saved, .action-link, .user-item),
  html[data-comfort="xlarge"] body.ep-page-account .layout :is(label, .muted, .mode-option-desc, .mode-saved, .action-link, .user-item) {
    font-size: var(--ep-sub-small) !important;
    line-height: 1.45;
  }
  html[data-comfort="large"] body.ep-page-account .layout :is(.mode-option-label, .modal-header, .mode-option),
  html[data-comfort="xlarge"] body.ep-page-account .layout :is(.mode-option-label, .modal-header, .mode-option) {
    font-size: var(--ep-sub-body) !important;
  }
  html[data-comfort="large"] body.ep-page-account .layout .card > div[style*="font-size:18px"],
  html[data-comfort="xlarge"] body.ep-page-account .layout .card > div[style*="font-size:18px"] {
    font-size: var(--ep-sub-section) !important;
  }
  html[data-comfort="large"] body.ep-page-account .layout .card [style*="font-size:14px"],
  html[data-comfort="xlarge"] body.ep-page-account .layout .card [style*="font-size:14px"],
  html[data-comfort="large"] body.ep-page-account .layout .card [style*="font-size: 14px"],
  html[data-comfort="xlarge"] body.ep-page-account .layout .card [style*="font-size: 14px"] {
    font-size: var(--ep-sub-small) !important;
  }
  html[data-comfort="large"] body.ep-page-account .layout .card [style*="font-size:18px"],
  html[data-comfort="xlarge"] body.ep-page-account .layout .card [style*="font-size:18px"],
  html[data-comfort="large"] body.ep-page-account .layout .card [style*="font-size: 18px"],
  html[data-comfort="xlarge"] body.ep-page-account .layout .card [style*="font-size: 18px"] {
    font-size: var(--ep-sub-section) !important;
  }
  html[data-comfort="large"] body.ep-page-account .layout :is(.user-badge, .badge-main, .badge-sub),
  html[data-comfort="xlarge"] body.ep-page-account .layout :is(.user-badge, .badge-main, .badge-sub) {
    font-size: var(--ep-sub-tiny) !important;
  }
  html[data-comfort="large"] body.ep-page-account .layout > div > a[href="/"],
  html[data-comfort="xlarge"] body.ep-page-account .layout > div > a[href="/"],
  html[data-comfort="large"] body.ep-page-zertifikate .layout > div > a[href="/"],
  html[data-comfort="xlarge"] body.ep-page-zertifikate .layout > div > a[href="/"] {
    font-size: var(--ep-sub-body) !important;
  }
  /* Konto-Dialoge liegen außerhalb von .layout */
  html[data-comfort="large"] body.ep-page-account .modal-card :is(label, p, .muted, .modal-header, .btn-primary, .btn-secondary, input),
  html[data-comfort="xlarge"] body.ep-page-account .modal-card :is(label, p, .muted, .modal-header, .btn-primary, .btn-secondary, input) {
    font-size: var(--ep-sub-body) !important;
  }

  /* Partner & Lieferanten: Text, Karten und Auswahlknöpfe */
  html[data-comfort="large"] body.ep-page-partners .intro h1,
  html[data-comfort="xlarge"] body.ep-page-partners .intro h1 {
    font-size: calc(var(--ep-sub-title) + 16px) !important;
    line-height: 1.18;
  }
  html[data-comfort="large"] body.ep-page-partners .intro p,
  html[data-comfort="xlarge"] body.ep-page-partners .intro p {
    font-size: var(--ep-sub-section) !important;
  }
  html[data-comfort="large"] body.ep-page-partners .partner-name,
  html[data-comfort="xlarge"] body.ep-page-partners .partner-name {
    font-size: var(--ep-sub-section) !important;
    line-height: 1.3;
  }
  html[data-comfort="large"] body.ep-page-partners .delivery-info,
  html[data-comfort="xlarge"] body.ep-page-partners .delivery-info,
  html[data-comfort="large"] body.ep-page-partners .delivery-info b,
  html[data-comfort="xlarge"] body.ep-page-partners .delivery-info b {
    font-size: var(--ep-sub-small) !important;
  }
  html[data-comfort="large"] body.ep-page-partners .partner-actions .action-btn,
  html[data-comfort="xlarge"] body.ep-page-partners .partner-actions .action-btn {
    font-size: var(--ep-sub-button) !important;
    min-height: 46px;
    text-align: center;
  }
  html[data-comfort="large"] body.ep-page-partners .partners-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
  html[data-comfort="xlarge"] body.ep-page-partners .partners-grid { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }

  /* Zertifikate: Name, Art des Dokuments und Karten */
  html[data-comfort="large"] body.ep-page-zertifikate .cert-name,
  html[data-comfort="xlarge"] body.ep-page-zertifikate .cert-name {
    font-size: var(--ep-sub-section) !important;
    overflow-wrap: anywhere;
  }
  html[data-comfort="large"] body.ep-page-zertifikate :is(.cert-meta, .empty-state),
  html[data-comfort="xlarge"] body.ep-page-zertifikate :is(.cert-meta, .empty-state) {
    font-size: var(--ep-sub-body) !important;
  }
  html[data-comfort="large"] body.ep-page-zertifikate .cert-card,
  html[data-comfort="xlarge"] body.ep-page-zertifikate .cert-card {
    padding: 24px !important;
    gap: 20px !important;
  }
  html[data-comfort="xlarge"] body.ep-page-zertifikate .cert-icon { width: 72px; height: 72px; font-size: 36px; }

  /* Kontakt: auch im Menü erreichbar und daher dieselbe Aa-Stufe */
  html[data-comfort="large"] body.ep-page-contact .contact-hero h1,
  html[data-comfort="xlarge"] body.ep-page-contact .contact-hero h1 {
    font-size: calc(var(--ep-sub-title) + 20px) !important;
  }
  html[data-comfort="large"] body.ep-page-contact .contact-hero p,
  html[data-comfort="xlarge"] body.ep-page-contact .contact-hero p,
  html[data-comfort="large"] body.ep-page-contact .layout :is(p, label, .info-item),
  html[data-comfort="xlarge"] body.ep-page-contact .layout :is(p, label, .info-item) {
    font-size: var(--ep-sub-body) !important;
  }
  html[data-comfort="large"] body.ep-page-contact .layout :is(h3, h4),
  html[data-comfort="xlarge"] body.ep-page-contact .layout :is(h3, h4) {
    font-size: var(--ep-sub-section) !important;
  }
  html[data-comfort="large"] body.ep-page-contact .layout .btn-submit,
  html[data-comfort="xlarge"] body.ep-page-contact .layout .btn-submit {
    font-size: var(--ep-sub-button) !important;
    min-height: 48px;
  }
}
