/* =========================================================
   EPHARO AI 2060 - CANONICAL INTERACTION SYSTEM V6

   Global interaction grammar only.
   Component geometry belongs to component stylesheets.
   Floating-surface motion belongs here.
   ========================================================= */

:root{
  --eph-ui-accent:#176b3d;
  --eph-ui-accent-strong:#0f5731;
  --eph-ui-text:#173b2a;
  --eph-ui-muted:#667a6e;
  --eph-ui-surface:#fff;
  --eph-ui-surface-soft:#f5f9f6;
  --eph-ui-line:rgba(23,75,48,.14);
  --eph-ui-line-strong:rgba(23,107,61,.28);
  --eph-ui-hover-halo:rgba(22,92,52,.035);
  --eph-ui-hover-shadow:rgba(15,57,36,.075);
  --eph-ui-focus-halo:rgba(23,107,61,.105);
  --eph-ui-field-focus:rgba(23,107,61,.34);
  --eph-ui-motion-fast:140ms;
  --eph-ui-motion-ease:cubic-bezier(.2,.7,.2,1);
  --eph-reveal-enter:360ms cubic-bezier(.22,1,.36,1);
  --eph-reveal-exit:240ms cubic-bezier(.4,0,.2,1);
  --eph-reveal-backdrop:rgba(10,23,15,.28);
  --eph-reveal-shadow-open:0 26px 78px rgba(7,38,19,.22),0 8px 24px rgba(7,38,19,.09);
  color-scheme:light;
}

[data-eph-theme="dark"],
[data-theme="dark"]{
  --eph-ui-accent:#78d49d;
  --eph-ui-accent-strong:#96e1b4;
  --eph-ui-text:#edf6f0;
  --eph-ui-muted:#a8b9ae;
  --eph-ui-surface:#14261c;
  --eph-ui-surface-soft:#192e22;
  --eph-ui-line:rgba(180,213,192,.16);
  --eph-ui-line-strong:rgba(132,213,163,.30);
  --eph-ui-hover-halo:rgba(126,213,160,.045);
  --eph-ui-hover-shadow:rgba(0,0,0,.13);
  --eph-ui-focus-halo:rgba(126,213,160,.12);
  --eph-ui-field-focus:rgba(126,213,160,.38);
  color-scheme:dark;
}

:where(
  button,a[href],[role="button"],[role="tab"],[role="menuitem"],
  [role="option"],summary,.eph-btn,.eph-tab,.eph-password-toggle
){
  transition:
    transform var(--eph-ui-motion-fast) var(--eph-ui-motion-ease),
    color var(--eph-ui-motion-fast) ease,
    background-color var(--eph-ui-motion-fast) ease,
    border-color var(--eph-ui-motion-fast) ease,
    box-shadow var(--eph-ui-motion-fast) ease,
    opacity var(--eph-ui-motion-fast) ease;
}

:where(
  button,a[href],[role="button"],[role="tab"],[role="menuitem"],
  [role="option"],summary,.eph-btn,.eph-tab,.eph-password-toggle
):focus{outline:none}

:where(
  button,a[href],[role="button"],[role="tab"],[role="menuitem"],
  [role="option"],summary,.eph-btn,.eph-tab,.eph-password-toggle
):focus-visible{
  outline:none;
  box-shadow:0 0 0 4px var(--eph-ui-focus-halo);
}

:where(
  button,a[href],[role="button"],[role="tab"],[role="menuitem"],
  [role="option"],.eph-btn,.eph-tab,.eph-password-toggle
):is(
  [aria-pressed="true"],[aria-selected="true"],[aria-expanded="true"],
  [aria-current="page"],[aria-current="true"],.is-active,.is-selected,.is-current
){
  outline:none;
}

:where(input,select,textarea):focus,
:where(input,select,textarea):focus-visible{
  outline:none;
  border-color:var(--eph-ui-field-focus);
  box-shadow:0 0 0 2px var(--eph-ui-focus-halo);
}

/* Composite controls own focus at their outer shell. */
#eph-header .search-input-wrap input[type="search"]:focus,
#eph-header .search-input-wrap input[type="search"]:focus-visible{
  border:0;
  outline:0;
  box-shadow:none;
}

/* Product Assistant selected state stays single-layered after click. */
#eph-product-assistant .eph-product-assistant-option.is-selected,
#eph-product-assistant .eph-product-assistant-option.is-selected:focus,
#eph-product-assistant .eph-product-assistant-option.is-selected:focus-visible{
  outline:none;
  box-shadow:none;
}

/* Shared modal close controls outside the header. */
.eph-ui-modal-close,
.epharo-ui-close,
.eph-product-assistant-close,
.eph-solution-viewer-close,
.eph-cmp__header > button,
.eph-inquiry-close,
.epharo-consent-close{
  box-sizing:border-box;
  min-width:48px;
  min-height:48px;
  width:48px;
  height:48px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  box-shadow:none;
  outline:none;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}

.eph-ui-modal-close > *,
.epharo-ui-close > *,
.eph-product-assistant-close > *,
.eph-solution-viewer-close > *,
.eph-inquiry-close > *,
.epharo-consent-close > *{pointer-events:none}

@media(hover:hover) and (pointer:fine){
  .eph-ui-modal-close:not(:disabled):hover,
  .epharo-ui-close:not(:disabled):hover,
  .eph-product-assistant-close:not(:disabled):hover,
  .eph-solution-viewer-close:not(:disabled):hover,
  .eph-inquiry-close:not(:disabled):hover,
  .epharo-consent-close:not(:disabled):hover{
    background:transparent;
    box-shadow:0 0 0 11px var(--eph-ui-hover-halo),0 7px 18px var(--eph-ui-hover-shadow);
    transform:translateY(-1px) scale(1.022);
  }
}

#epharo-consent-root .epharo-consent-button:focus-visible,
#epharo-consent-root .epharo-consent-close:focus-visible,
#epharo-consent-root button.epharo-consent-switch:focus-visible,
#epharo-consent-experience-root .eph-consent-btn:focus-visible,
#epharo-consent-experience-root .eph-consent-lang:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px var(--eph-ui-focus-halo);
}

:where(button,[role="button"],.eph-btn,.eph-tab):disabled,
:where(button,[role="button"],.eph-btn,.eph-tab)[aria-disabled="true"]{
  transform:none;
  outline:none;
  box-shadow:none;
  cursor:not-allowed;
}

/* =========================================================
   Shared reveal contract
   Surfaces emerge from the page depth; no horizontal shooting.
   ========================================================= */
.eph-reveal-backdrop{
  -webkit-backdrop-filter:blur(8px) saturate(112%);
  backdrop-filter:blur(8px) saturate(112%);
  transition:opacity var(--eph-reveal-exit),-webkit-backdrop-filter var(--eph-reveal-exit),backdrop-filter var(--eph-reveal-exit);
}

.eph-reveal-surface{
  opacity:0;
  filter:blur(2.5px);
  transform:scale(.955);
  transform-origin:50% 50%;
  box-shadow:0 8px 24px rgba(7,38,19,.08);
  will-change:transform,opacity,filter,box-shadow;
  transition:
    transform var(--eph-reveal-enter),
    opacity var(--eph-reveal-exit),
    filter var(--eph-reveal-exit),
    box-shadow var(--eph-reveal-enter);
}

.eph-reveal-surface--modal{transform-origin:50% 28%}
.eph-reveal-surface--side{transform-origin:90% 18%}

#eph-search-toggle:checked + #eph-header .eph-search-overlay.eph-reveal-backdrop,
.eph-news-open .eph-news-overlay.eph-reveal-backdrop,
.eph-help-open .eph-help-overlay.eph-reveal-backdrop{
  background:var(--eph-reveal-backdrop);
}

#eph-search-toggle:checked + #eph-header .search-panel.eph-reveal-surface,
.eph-news-open .eph-news-panel.eph-reveal-surface,
.eph-help-open .eph-help-panel.eph-reveal-surface,
.eph-reveal-surface.is-open,
[data-eph-reveal-open="true"] > .eph-reveal-surface{
  opacity:1;
  filter:blur(0);
  transform:scale(1);
  box-shadow:var(--eph-reveal-shadow-open);
}

@media(pointer:coarse){
  .eph-ui-modal-close,
  .epharo-ui-close,
  .eph-product-assistant-close,
  .eph-solution-viewer-close,
  .eph-inquiry-close,
  .epharo-consent-close{
    min-width:50px;
    min-height:50px;
  }
}

@media(prefers-reduced-motion:reduce){
  :where(
    button,a[href],[role="button"],[role="tab"],[role="menuitem"],
    [role="option"],summary,.eph-btn,.eph-tab,.eph-password-toggle,
    .eph-reveal-backdrop,.eph-reveal-surface
  ){
    transition:none;
  }
  .eph-reveal-surface{
    filter:none;
    transform:none;
  }
}
