/**
 * ECS_Frontend - styles du sélecteur de cours [ee_course_selector]
 * Portage du front éprouvé du sandbox summer-dance-selector.php (préfixe .sds- -> .ecs-).
 * Scopé .ecs- ; mobile-first ; zones tactiles >=44px ; casse phrase (français).
 */
.ecs-root {
    --ecs-primary: #1e7a6f;
    --ecs-primary-dark: #145349;
    --ecs-accent: #e8734a;
    --ecs-bg: #f7f8f7;
    --ecs-card-bg: #ffffff;
    --ecs-border: #e1e4e2;
    --ecs-text: #23302c;
    --ecs-text-muted: #6b756f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 400;
    color: var(--ecs-text);
    box-sizing: border-box;
    max-width: 100%;
    padding-bottom: 90px; /* place pour le panier sticky */
}
.ecs-root *, .ecs-root *::before, .ecs-root *::after { box-sizing: inherit; }
.ecs-root button { font-family: inherit; }

.ecs-notice {
    padding: 24px 16px;
    text-align: center;
    color: var(--ecs-text-muted);
    background: var(--ecs-bg);
    border-radius: 12px;
}

/* ---------------------------------------------------------------------------
 * En-tête : recherche + barre de facettes (pastilles)
 * ------------------------------------------------------------------------- */
.ecs-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px;
    background: var(--ecs-bg);
    border-radius: 12px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 20;
}
.ecs-search {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 0.5px solid var(--ecs-border);
    border-radius: 22px;
    font-size: 16px;
    background: #fff;
}
.ecs-search:focus { outline: 2px solid var(--ecs-primary); }

.ecs-facetbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    position: relative;
}
.ecs-facet { position: relative; }
.ecs-facet-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 22px;
    border: 0.5px solid var(--ecs-border);
    background: #fff;
    color: var(--ecs-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ecs-facet-pill:active { transform: scale(0.98); }
.ecs-facet-pill[aria-expanded="true"] {
    background: var(--ecs-primary);
    border-color: var(--ecs-primary);
    color: #fff;
}
.ecs-facet-pill.ecs-facet-pill-active {
    background: #e6f0ee;
    border-color: var(--ecs-primary);
    color: var(--ecs-primary-dark);
    font-weight: 500;
}
.ecs-facet-pill[aria-expanded="true"].ecs-facet-pill-active {
    background: var(--ecs-primary);
    color: #fff;
}
.ecs-chevron {
    display: inline-block;
    font-size: 13px;
    line-height: 1;
    transition: transform .15s ease;
}
.ecs-facet-pill[aria-expanded="true"] .ecs-chevron { transform: rotate(180deg); }

.ecs-facet-reset {
    border: none;
    background: none;
    color: var(--ecs-primary-dark);
    text-decoration: underline;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 4px;
    min-height: 44px;
    cursor: pointer;
    white-space: nowrap;
}
.ecs-facet-reset[hidden] { display: none; }

/* Overlay : couvre la page pour permettre la fermeture au clic extérieur ; le panneau a
   son propre fond opaque. */
.ecs-facet-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: transparent;
}
.ecs-facet-overlay[hidden] { display: none; }

/* Panneau d'options d'une facette : opaque (fond plein), grille responsive 2-3 col. */
.ecs-facet-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 2147483001;
    width: min(420px, 90vw);
    max-height: 60vh;
    overflow-y: auto;
    background-color: #ffffff;
    background-image: none;
    border: 0.5px solid var(--ecs-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    padding: 12px;
}
.ecs-facet-panel[hidden] { display: none; }

.ecs-facet-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 600px) {
    .ecs-facet-options { grid-template-columns: repeat(3, 1fr); }
}

.ecs-facet-option {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 0.5px solid var(--ecs-border);
    background: #fff;
    color: var(--ecs-text);
    font-size: 13px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ecs-facet-option:active { transform: scale(0.98); }
.ecs-facet-option.ecs-facet-option-active {
    background: var(--ecs-primary);
    border-color: var(--ecs-primary);
    color: #fff;
    font-weight: 500;
}
.ecs-facet-option-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.ecs-facet-option-count { opacity: 0.7; font-weight: 400; margin-left: auto; padding-left: 4px; }

/* ---------------------------------------------------------------------------
 * Mini-calendrier mensuel de la facette "Jour"
 * ------------------------------------------------------------------------- */
.ecs-cal-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ecs-cal-month-title {
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    color: var(--ecs-text);
    margin-bottom: 8px;
}
.ecs-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.ecs-cal-grid-header { margin-bottom: 4px; }
.ecs-cal-dow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--ecs-text-muted);
    padding: 2px 0;
}
.ecs-cal-cell-empty { visibility: hidden; }
.ecs-cal-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    aspect-ratio: 1 / 1;
    min-height: 36px;
    border-radius: 10px;
    border: 0.5px solid transparent;
    background: #fff;
    color: var(--ecs-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ecs-cal-day:active:not(:disabled) { transform: scale(0.96); }
.ecs-cal-day-num { line-height: 1; }
.ecs-cal-dot {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ecs-primary);
}
.ecs-cal-day-empty {
    color: #c7cbc9;
    background: transparent;
    cursor: default;
}
.ecs-cal-day-past {
    color: #b7bab8;
    background: #f2f3f2;
}
.ecs-cal-day-past .ecs-cal-dot { background: #b7bab8; }
.ecs-cal-day-disabled { cursor: not-allowed; }
.ecs-cal-day-today {
    border-color: var(--ecs-primary);
    font-weight: 600;
}
.ecs-cal-day-selected:not(.ecs-cal-day-disabled) {
    background: var(--ecs-primary);
    color: #fff;
    border-color: var(--ecs-primary);
}
.ecs-cal-day-selected:not(.ecs-cal-day-disabled) .ecs-cal-dot { background: #fff; }

@media (max-width: 480px) {
    .ecs-facet-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: auto;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.25);
    }
}

/* ---------------------------------------------------------------------------
 * Barre outils : compteur + bascule agenda/grille/calendrier
 * ------------------------------------------------------------------------- */
.ecs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 4px 10px;
}
.ecs-count {
    font-size: 13px;
    color: var(--ecs-text-muted);
}
.ecs-view-toggle {
    display: inline-flex;
    border: 0.5px solid var(--ecs-border);
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 auto;
}
.ecs-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 36px;
    padding: 6px 10px;
    border: none;
    background: #fff;
    color: var(--ecs-text-muted);
    font-size: 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.ecs-view-btn + .ecs-view-btn { border-left: 0.5px solid var(--ecs-border); }
.ecs-view-btn[aria-pressed="true"] {
    background: var(--ecs-primary);
    color: #fff;
}
.ecs-view-btn-svg { display: block; }

/* ---------------------------------------------------------------------------
 * Vue AGENDA : sections par jour
 * ------------------------------------------------------------------------- */
.ecs-list { display: flex; flex-direction: column; gap: 4px; }

.ecs-day-section { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }

.ecs-day-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px;
}
.ecs-day-datebox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--ecs-card-bg);
    border: 0.5px solid var(--ecs-border);
    line-height: 1.05;
}
.ecs-day-datebox-dow {
    font-size: 10px;
    font-weight: 500;
    text-transform: lowercase;
    color: var(--ecs-text-muted);
}
.ecs-day-datebox-num {
    font-size: 19px;
    font-weight: 500;
    color: var(--ecs-text);
}
.ecs-day-datebox-month {
    font-size: 10px;
    font-weight: 400;
    text-transform: lowercase;
    color: var(--ecs-text-muted);
}
.ecs-day-title {
    flex: 1 1 auto;
    font-size: 15px;
    font-weight: 500;
    color: var(--ecs-text);
}
.ecs-day-count {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--ecs-text-muted);
}

.ecs-row-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--ecs-cat-soft, var(--ecs-card-bg));
    background: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 12%, #fff);
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 72%, #000);
    border: 1px solid var(--ecs-cat-color, var(--ecs-border));
    border-color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-border)) 35%, #fff);
    border-radius: 12px;
    padding: 12px 14px;
    width: 100%;
}
.ecs-row-card.ecs-card-selected {
    border-color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 60%, #000);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 30%, transparent);
}
.ecs-row-time {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 58px;
}
.ecs-row-time-start {
    font-size: 15px;
    font-weight: 600;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 78%, #000);
}
.ecs-row-time-end {
    font-size: 12px;
    font-weight: 400;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 55%, #000);
}
.ecs-row-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ecs-row-title {
    font-size: 15px;
    font-weight: 600;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-text)) 80%, #000);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.ecs-row-prof {
    font-size: 13px;
    font-weight: 400;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-text-muted)) 58%, #000);
}
.ecs-row-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ecs-row-end {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

/* Tag de catégorie discret : le fond de la carte porte déjà l'identité couleur. */
.ecs-tag-category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
    border-radius: 12px;
    background: transparent;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary-dark)) 62%, #000);
    font-size: 11px;
    font-weight: 500;
    opacity: 0.85;
}
.ecs-tag-category-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ecs-cat-color, var(--ecs-primary-dark));
    flex: 0 0 auto;
}

.ecs-price {
    font-size: 15px;
    font-weight: 600;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-text)) 80%, #000);
    white-space: nowrap;
}

/* Bouton lisible sur fond de carte teinté : fond blanc opaque au repos + texte foncé ton
   sur ton. État sélectionné (ecs-added) = fond foncé ton sur ton + texte blanc. */
.ecs-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    min-width: 44px;
    padding: 6px 14px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 45%, #fff);
    background: #fff;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary-dark)) 75%, #000);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.ecs-add-btn.ecs-added {
    background: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 68%, #000);
    color: #fff;
    border-color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 68%, #000);
}

/* ---------------------------------------------------------------------------
 * État "cours passé" (TERMINÉ) - carte visible mais désactivée, dans les 3 vues.
 * ------------------------------------------------------------------------- */
.ecs-card-past {
    opacity: 0.55;
    filter: grayscale(0.5);
}
.ecs-badge-past {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 10px;
    background: #6b756f;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    vertical-align: middle;
}
.ecs-badge-past-sq {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}
.ecs-add-btn.ecs-add-btn-disabled,
.ecs-add-btn.ecs-add-btn-disabled:active {
    background: #eceeed;
    color: #9aa19d;
    border-color: #dcdfdd;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * Vue GRILLE : cartes carrées
 * ------------------------------------------------------------------------- */
.ecs-grid-view {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 640px) {
    .ecs-grid-view { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
    .ecs-grid-view { grid-template-columns: repeat(4, 1fr); }
}

.ecs-sq-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--ecs-cat-soft, var(--ecs-card-bg));
    background: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 12%, #fff);
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 72%, #000);
    border: 1px solid color-mix(in srgb, var(--ecs-cat-color, var(--ecs-border)) 35%, #fff);
    border-radius: 12px;
    padding: 12px;
    padding-top: 16px;
    overflow: hidden;
}
.ecs-sq-card.ecs-card-selected {
    border-color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 60%, #000);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 30%, transparent);
}
.ecs-sq-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 70%, #000);
}
.ecs-sq-date {
    font-size: 12px;
    font-weight: 500;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-text-muted)) 55%, #000);
}
.ecs-sq-time {
    font-size: 14px;
    font-weight: 600;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 78%, #000);
}
.ecs-sq-title {
    font-size: 14px;
    font-weight: 600;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-text)) 80%, #000);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.ecs-sq-prof {
    font-size: 12px;
    font-weight: 400;
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-text-muted)) 58%, #000);
}
.ecs-sq-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 6px;
}
.ecs-sq-footer .ecs-price { font-size: 14px; }
.ecs-sq-footer .ecs-add-btn { padding: 6px 10px; font-size: 12px; min-width: 0; }

/* ---------------------------------------------------------------------------
 * Vue CALENDRIER (3e mode d'affichage) - grille mensuelle.
 * ------------------------------------------------------------------------- */
.ecs-cal2-wrap { display: flex; flex-direction: column; gap: 20px; }
.ecs-cal2-month-title {
    font-size: 15px;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--ecs-text);
    margin-bottom: 8px;
}
.ecs-cal2-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.ecs-cal2-grid-header { margin-bottom: 4px; }
.ecs-cal2-dow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--ecs-text-muted);
}
.ecs-cal2-cell-empty { visibility: hidden; }
.ecs-cal2-day {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 44px;
    padding: 4px;
    border-radius: 10px;
    border: 0.5px solid var(--ecs-border);
    background: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.ecs-cal2-day-empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
}
.ecs-cal2-day-past { background: #f2f3f2; opacity: 0.65; filter: grayscale(0.4); }
.ecs-cal2-day-today { border-color: var(--ecs-primary); }
.ecs-cal2-day-open { border-color: var(--ecs-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ecs-primary) 30%, transparent); }
.ecs-cal2-daynum { font-size: 12px; font-weight: 500; color: var(--ecs-text); }

.ecs-cal2-dots { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.ecs-cal2-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.ecs-cal2-more { font-size: 9px; font-weight: 600; color: var(--ecs-text-muted); }

.ecs-cal2-entries { display: none; flex-direction: column; gap: 3px; }
.ecs-cal2-entry {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 6px;
    padding: 3px 5px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    background: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 16%, #fff);
    color: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-text)) 80%, #000);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.ecs-cal2-entry-selected {
    background: color-mix(in srgb, var(--ecs-cat-color, var(--ecs-primary)) 68%, #000);
    color: #fff;
}
.ecs-cal2-entry-past { opacity: 0.55; filter: grayscale(0.5); cursor: not-allowed; }
.ecs-cal2-entry-more { font-size: 10px; color: var(--ecs-text-muted); padding: 2px 5px; }
.ecs-badge-past-mini { font-size: 8px; padding: 0 4px; }

@media (min-width: 601px) {
    .ecs-cal2-day { min-height: 88px; align-items: stretch; }
    .ecs-cal2-dots { display: none; }
    .ecs-cal2-entries { display: flex; }
}

.ecs-cal2-expansion {
    margin-top: 10px;
    padding: 10px;
    border-radius: 12px;
    background: var(--ecs-bg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ecs-cal2-expansion-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ecs-text);
    text-transform: capitalize;
}
.ecs-cal2-expansion-card { width: 100%; }
@media (min-width: 601px) {
    .ecs-cal2-expansion { margin-top: 14px; }
}

.ecs-empty-state {
    padding: 30px 10px;
    text-align: center;
    color: var(--ecs-text-muted);
}

/* ---------------------------------------------------------------------------
 * Mini-panier collant compact
 * ------------------------------------------------------------------------- */
.ecs-cart-spacer { height: 10px; }

.ecs-cart {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background-color: #ffffff;
    background-image: none;
    border-top: 0.5px solid var(--ecs-border);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ecs-cart-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    min-height: 60px;
}
.ecs-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 0.5px solid var(--ecs-border);
    background: #fff;
    color: var(--ecs-primary-dark);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.ecs-cart-icon:active { transform: scale(0.97); }
.ecs-cart-icon-svg { display: block; }
.ecs-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--ecs-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.ecs-cart-badge[hidden] { display: none; }
.ecs-cart-total {
    flex: 1 1 auto;
    font-size: 20px;
    font-weight: 600;
    color: var(--ecs-primary-dark);
    white-space: nowrap;
}

.ecs-cart-detail {
    display: none;
    padding: 12px 16px 8px;
    overflow-y: auto;
    font-size: 13px;
}
.ecs-cart-detail-actions {
    display: none;
    padding: 4px 16px 12px;
}
.ecs-cart.ecs-cart-expanded .ecs-cart-detail,
.ecs-cart.ecs-cart-expanded .ecs-cart-detail-actions { display: block; }
.ecs-cart-detail-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--ecs-border);
}
.ecs-cart-detail-line-savings { color: var(--ecs-accent); font-weight: 500; }
.ecs-cart-detail-remove {
    border: none;
    background: none;
    color: #b23b3b;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    min-height: 32px;
}
.ecs-cart-savings-total {
    padding: 8px 0 2px;
    font-weight: 500;
    color: var(--ecs-accent);
}

.ecs-cart-clear {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 22px;
    border: 0.5px solid var(--ecs-border);
    background: #fff;
    color: #b23b3b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.ecs-cart-clear:disabled {
    color: #b7bab8;
    border-color: var(--ecs-border);
    cursor: not-allowed;
}
.ecs-cart-submit {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 22px;
    border: none;
    background: var(--ecs-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.ecs-cart-submit:disabled {
    background: #cfd3d1;
    cursor: not-allowed;
}
.ecs-cart-message {
    padding: 0 16px 10px;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}
.ecs-cart-message:empty { display: none; }
.ecs-cart-message.ecs-error { color: #b23b3b; }
.ecs-cart-message.ecs-success { color: var(--ecs-primary-dark); }
