/* ============================================================
   EPHARO AI 2060
   CONSENT EXPERIENCE V3
   Harmonia-grade flow / Epharo visual language
   ============================================================ */

:root{
  --eph-consent-green:#0d4c2d;
  --eph-consent-green-2:#176b40;
  --eph-consent-dark:#0b3623;
  --eph-consent-soft:#f4faf6;
  --eph-consent-line:#d9e7dd;
  --eph-consent-muted:#64736a;
  --eph-consent-white:#ffffff;
  --eph-consent-danger:#b42318;
}

body.eph-consent-gate-lock{
  overflow:hidden !important;
}

.eph-consent-experience{
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;

  background:
    linear-gradient(
      135deg,
      rgba(4,48,28,.94),
      rgba(10,67,41,.88)
    );

  backdrop-filter:blur(13px);
  -webkit-backdrop-filter:blur(13px);
}

.eph-consent-experience[hidden]{
  display:none !important;
}

.eph-consent-experience::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(
      circle at 18% 18%,
      rgba(148,224,184,.16),
      transparent 34%
    ),
    radial-gradient(
      circle at 82% 76%,
      rgba(255,255,255,.09),
      transparent 35%
    );
}

.eph-consent-card{
  position:relative;
  z-index:1;

  width:min(790px,100%);
  max-height:calc(100vh - 40px);
  overflow:auto;

  padding:44px 46px 34px;

  border:1px solid rgba(22,92,52,.25);
  border-radius:30px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.995),
      rgba(248,252,249,.995)
    );

  color:var(--eph-consent-dark);

  box-shadow:
    0 36px 90px rgba(1,31,17,.34),
    0 10px 28px rgba(1,31,17,.14),
    inset 0 1px 0 rgba(255,255,255,1);
}

.eph-consent-kicker{
  display:block;
  margin-bottom:14px;

  color:var(--eph-consent-green-2);
  font-size:11px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.22em;
  text-transform:uppercase;
}

.eph-consent-card h1{
  max-width:680px;
  margin:0;

  color:var(--eph-consent-dark);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size:clamp(38px,6vw,66px);
  line-height:.98;
  font-weight:850;
  letter-spacing:-.055em;
}

.eph-consent-lead{
  max-width:680px;
  margin:22px 0 0;

  color:var(--eph-consent-muted);
  font-size:15px;
  line-height:1.65;
}

.eph-consent-note{
  margin:13px 0 0;
  color:#738178;
  font-size:12px;
  line-height:1.55;
}

.eph-consent-actions{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:10px;
  margin-top:27px;
}

.eph-consent-btn{
  min-height:52px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:0 19px;

  border:1px solid var(--eph-consent-line);
  border-radius:999px;

  background:#fff;
  color:var(--eph-consent-green);

  font-family:inherit;
  font-size:13px;
  font-weight:900;

  cursor:pointer;

  transition:
    transform .17s ease,
    background .17s ease,
    border-color .17s ease,
    color .17s ease,
    box-shadow .17s ease;
}

.eph-consent-btn:hover{
  transform:translateY(-1px);
}

.eph-consent-btn--primary{
  border-color:var(--eph-consent-green-2);
  background:var(--eph-consent-green-2);
  color:#fff;

  box-shadow:
    0 10px 22px rgba(22,107,64,.16);
}

.eph-consent-btn--primary:hover{
  background:var(--eph-consent-green);
}

.eph-consent-btn--secondary{
  border-color:rgba(22,92,52,.23);
  background:#eef7f1;
}

.eph-consent-btn--ghost{
  background:#fff;
}

.eph-consent-links{
  display:flex;
  flex-wrap:wrap;
  gap:18px;

  margin-top:17px;

  font-size:12px;
  font-weight:800;
}

.eph-consent-links a{
  color:var(--eph-consent-green);
  text-decoration:underline;
  text-underline-offset:3px;
}

.eph-consent-language{
  margin-top:25px;
  padding-top:20px;
  border-top:1px solid var(--eph-consent-line);

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.eph-consent-language-title{
  color:#748278;
  font-size:10px;
  font-weight:900;
  letter-spacing:.20em;
  text-transform:uppercase;
}

.eph-consent-language-list{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:7px;
}

.eph-consent-lang{
  width:36px;
  height:36px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  border:1px solid var(--eph-consent-line);
  border-radius:50%;

  background:#fff;
  color:#56655c;

  font-family:inherit;
  font-size:10px;
  font-weight:900;

  cursor:pointer;
}

.eph-consent-lang.is-active{
  border-color:var(--eph-consent-green-2);
  background:var(--eph-consent-green-2);
  color:#fff;
}

.eph-consent-summary{
  margin-top:24px;

  border:1px solid var(--eph-consent-line);
  border-radius:18px;

  overflow:hidden;

  background:#fbfdfb;
}

.eph-consent-summary-head{
  padding:14px 17px;

  border-bottom:1px solid var(--eph-consent-line);

  color:#718078;

  font-size:10px;
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.eph-consent-summary-row{
  min-height:52px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;

  padding:11px 17px;

  border-bottom:1px solid var(--eph-consent-line);

  color:#55645b;
  font-size:12px;
}

.eph-consent-summary-row:last-child{
  border-bottom:0;
}

.eph-consent-state{
  display:inline-flex;
  align-items:center;

  min-height:27px;
  padding:0 11px;

  border:1px solid var(--eph-consent-line);
  border-radius:999px;

  background:#fff;

  color:#718078;

  font-size:10px;
  font-weight:900;
}

.eph-consent-state.is-on{
  border-color:rgba(22,107,64,.20);
  background:#eaf5ee;
  color:var(--eph-consent-green);
}

.eph-consent-confirm-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:11px;
  margin-top:24px;
}


/* ============================================================
   RESTYLE EXISTING EPHARO SETTINGS MANAGER
   ============================================================ */

.epharo-consent-settings{
  z-index:2147483100 !important;

  background:
    rgba(4,47,28,.86) !important;

  backdrop-filter:
    blur(14px) !important;

  -webkit-backdrop-filter:
    blur(14px) !important;
}

.epharo-consent-dialog{
  width:min(780px,calc(100% - 36px)) !important;

  border:
    1px solid rgba(22,92,52,.22) !important;

  border-radius:
    28px !important;

  background:
    #fff !important;

  box-shadow:
    0 32px 80px rgba(2,36,20,.30) !important;

  overflow:hidden !important;
}

.epharo-consent-dialog-title{
  color:
    var(--eph-consent-dark) !important;

  font-size:
    clamp(28px,4vw,45px) !important;

  line-height:
    1 !important;

  letter-spacing:
    -.035em !important;
}

.epharo-consent-dialog-description{
  color:
    var(--eph-consent-muted) !important;
}

.epharo-consent-close{
  border:
    1px solid var(--eph-consent-line) !important;

  background:
    #fff !important;

  color:
    var(--eph-consent-dark) !important;
}

.epharo-consent-category{
  border-bottom:
    1px solid var(--eph-consent-line) !important;
}

.epharo-consent-category-title{
  color:
    var(--eph-consent-dark) !important;
}

.epharo-consent-category-description{
  color:
    var(--eph-consent-muted) !important;
}

.epharo-consent-button{
  border-radius:
    999px !important;

  font-weight:
    900 !important;
}

.epharo-consent-button--primary{
  background:
    var(--eph-consent-green-2) !important;

  border-color:
    var(--eph-consent-green-2) !important;
}

.epharo-consent-slider{
  transition:
    .18s ease !important;
}


/* language row injected into existing settings */

.eph-consent-settings-language{
  padding:15px 24px 20px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;

  border-top:
    1px solid var(--eph-consent-line);
}

.eph-consent-settings-language .eph-consent-language-list{
  justify-content:flex-end;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media(max-width:760px){

  .eph-consent-experience{
    padding:12px;
    align-items:flex-end;
  }

  .eph-consent-card{
    width:100%;
    max-height:calc(100vh - 24px);
    padding:29px 22px 24px;
    border-radius:25px;
  }

  .eph-consent-card h1{
    font-size:42px;
  }

  .eph-consent-actions{
    grid-template-columns:1fr;
  }

  .eph-consent-confirm-actions{
    grid-template-columns:1fr;
  }

  .eph-consent-language{
    align-items:flex-start;
    flex-direction:column;
  }

  .eph-consent-language-list{
    justify-content:flex-start;
  }

  .eph-consent-settings-language{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* =========================================================
   EPHARO CONSENT EXPERIENCE - RUNTIME INTERACTION GUARANTEE
   Keep current visual design. Fix interaction only.
   ========================================================= */

#epharo-consent-experience-root,
.eph-consent-experience,
.eph-consent-overlay,
.eph-consent-gate,
.eph-consent-card{
  pointer-events:auto !important;
}

#epharo-consent-experience-root{
  position:relative;
  z-index:2147483050;
}

#epharo-consent-experience-root button,
#epharo-consent-experience-root a,
#epharo-consent-experience-root input,
#epharo-consent-experience-root label,
#epharo-consent-experience-root [role="button"],
#epharo-consent-experience-root [data-action],
#epharo-consent-experience-root [data-consent-action],
#epharo-consent-experience-root [data-language]{
  pointer-events:auto !important;
  touch-action:manipulation;
}

#epharo-consent-experience-root button:not(:disabled),
#epharo-consent-experience-root a,
#epharo-consent-experience-root [role="button"]{
  cursor:pointer;
}

/*
 * Native detailed settings must stay above the first-visit experience.
 */
.epharo-consent-settings.is-visible{
  z-index:2147483200 !important;
  pointer-events:auto !important;
}

.epharo-consent-settings.is-visible .epharo-consent-dialog,
.epharo-consent-settings.is-visible .epharo-consent-dialog *{
  pointer-events:auto !important;
}


/* =========================================================
   EPHARO PRIVACY - GLOBAL MODAL SIZE / CENTER FIX
   Same privacy dialog geometry on homepage and account pages.
   Logic and visual language remain unchanged.
   ========================================================= */

.epharo-consent-settings{
  position:fixed !important;
  inset:0 !important;

  width:100vw !important;
  height:100vh !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  padding:24px !important;
  box-sizing:border-box !important;

  overflow:auto !important;
}

.epharo-consent-settings:not(.is-visible){
  display:none !important;
}

.epharo-consent-settings.is-visible{
  display:flex !important;
}

.epharo-consent-dialog{
  position:relative !important;

  width:min(790px, calc(100vw - 48px)) !important;
  max-width:790px !important;

  height:auto !important;
  max-height:calc(100vh - 48px) !important;

  margin:auto !important;

  overflow:auto !important;
  box-sizing:border-box !important;

  flex:none !important;
}

.epharo-consent-dialog-header,
.epharo-consent-dialog-body,
.epharo-consent-dialog-footer{
  width:100% !important;
  max-width:none !important;
  box-sizing:border-box !important;
}

.epharo-consent-dialog-body{
  overflow:visible !important;
}

.epharo-consent-dialog-footer{
  flex-shrink:0 !important;
}

.eph-consent-settings-language{
  width:100% !important;
  box-sizing:border-box !important;
}

@media (max-width:600px){

  .epharo-consent-settings{
    padding:12px !important;
    align-items:flex-start !important;
  }

  .epharo-consent-dialog{
    width:100% !important;
    max-width:100% !important;
    max-height:calc(100vh - 24px) !important;
    margin:auto !important;
  }

}



/* =========================================================
   EPHARO CONSENT EXPERIENCE V4 - PLATFORM DENSITY
   ========================================================= */

.eph-consent-experience{
  padding:18px !important;
}

.eph-consent-card{
  width:min(680px,100%) !important;
  max-height:calc(100dvh - 36px) !important;
  padding:34px 36px 28px !important;
  border-radius:24px !important;
}

.eph-consent-card h1{
  max-width:610px !important;
  font-size:clamp(34px,4.6vw,52px) !important;
  line-height:1 !important;
  letter-spacing:-.045em !important;
}

.eph-consent-lead{
  margin-top:18px !important;
  font-size:14px !important;
  line-height:1.55 !important;
}

.eph-consent-note{
  margin-top:10px !important;
}

.eph-consent-actions{
  margin-top:22px !important;
}

.eph-consent-language{
  margin-top:20px !important;
  padding-top:17px !important;
}

.eph-consent-summary{
  margin-top:20px !important;
}

.eph-consent-summary-row{
  min-height:46px !important;
  padding:9px 15px !important;
}

.eph-consent-confirm-actions{
  margin-top:20px !important;
}

@media(max-width:760px){
  .eph-consent-experience{
    align-items:flex-end !important;
    padding:
      max(10px,env(safe-area-inset-top))
      10px
      max(10px,env(safe-area-inset-bottom)) !important;
  }

  .eph-consent-card{
    width:100% !important;
    max-height:calc(100dvh - 20px) !important;
    padding:26px 20px 20px !important;
    border-radius:22px !important;
  }

  .eph-consent-card h1{
    font-size:clamp(34px,10vw,44px) !important;
  }

  .eph-consent-actions,
  .eph-consent-confirm-actions{
    grid-template-columns:1fr !important;
  }
}
