/* =========================================================
   EPHARO PANELS
   Search overlay, news panel, help panel and shared close UI
   AWS-ready staging file
   ========================================================= */


/* =========================================================
   1. FULLSCREEN SEARCH OVERLAY
   ========================================================= */

.eph-search-overlay{
  position:fixed;
  inset:0;

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

  padding-top:96px;

  background:rgba(10,23,15,.78);

  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);

  opacity:0;
  pointer-events:none;

  transition:opacity .2s ease;

  z-index:12000;
}

#eph-search-toggle:checked + #eph-header .eph-search-overlay{
  opacity:1;
  pointer-events:auto;
}

.search-panel{
  width:min(720px,90vw);

  padding:20px 22px 16px;
  border-radius:22px;
  border:1px solid #d7eadf;

  background:rgba(246,251,247,.98);

  box-shadow:0 30px 90px rgba(0,0,0,.45);
}

.search-panel-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  margin-bottom:14px;
}

.search-panel-header h2{
  margin:0;

  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;

  font-size:16px;
}

.search-panel-header h2 span.badge{
  padding:3px 7px;
  border-radius:999px;

  background:#0f4826;
  color:#bbf7d0;

  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
}


/* =========================================================
   2. SEARCH INPUT ROW
   ========================================================= */

#eph-header .eph-search-overlay .search-input-wrap{
  display:flex;
  align-items:center;
  gap:10px;

  margin-bottom:10px;
  padding:10px 14px;
  border-radius:18px;
  border:1px solid #d7eadf;

  background:#ffffff;

  box-shadow:none !important;
}

#eph-header .eph-search-overlay .search-input-wrap:focus-within{
  border-color:#cde5d6 !important;
  box-shadow:0 0 0 1px #cde5d6 !important;
}

#eph-header .eph-search-overlay .search-input-wrap > svg{
  width:18px;
  height:18px;

  stroke:var(--muted);
  fill:none;

  cursor:text;

  transform:none !important;
  filter:none !important;
  box-shadow:none !important;
}

#eph-header .eph-search-overlay .search-input-wrap input[type="search"]{
  flex:1;

  border:0;
  outline:0;
  background:transparent;

  color:var(--ink);

  font-size:15px;
  font-weight:600;
}

#eph-header .eph-search-overlay .search-input-wrap input[type="search"]::-webkit-search-cancel-button{
  -webkit-appearance:none;
  appearance:none;
}


/* =========================================================
   3. SEARCH CLEAR X
   ========================================================= */

#eph-header .eph-search-overlay .search-clear{
  -webkit-appearance:none;
  appearance:none;

  width:18px;
  height:18px;

  margin-right:2px;
  padding:0;

  display:none;
  align-items:center;
  justify-content:center;

  border:0 !important;
  border-radius:999px;
  background:transparent !important;
  box-shadow:none !important;

  cursor:pointer;
}

#eph-header .eph-search-overlay .search-input-wrap.has-value .search-clear{
  display:flex;
}

#eph-header .eph-search-overlay .search-clear span{
  position:relative;

  width:11px;
  height:11px;

  display:block;
}

#eph-header .eph-search-overlay .search-clear span::before,
#eph-header .eph-search-overlay .search-clear span::after{
  content:"";

  position:absolute;
  top:50%;
  left:50%;

  width:11px;
  height:2px;

  background:#4a5f52;

  transform-origin:center;
}

#eph-header .eph-search-overlay .search-clear span::before{
  transform:translate(-50%,-50%) rotate(45deg);
}

#eph-header .eph-search-overlay .search-clear span::after{
  transform:translate(-50%,-50%) rotate(-45deg);
}


/* =========================================================
   4. SEARCH ACTIONS / MIC / SEND
   ========================================================= */

#eph-header .eph-search-overlay .search-input-wrap .search-actions{
  display:flex;
  align-items:center;
  gap:8px;

  margin:0;
  padding:0;

  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

#eph-header .eph-search-overlay .search-input-wrap .search-actions::before,
#eph-header .eph-search-overlay .search-input-wrap .search-actions::after{
  content:none !important;
}

#eph-header .eph-search-overlay button{
  -webkit-appearance:none !important;
  appearance:none !important;

  padding:0 !important;

  border:0 !important;
  outline:none !important;
  background:transparent !important;
  box-shadow:none !important;
  text-shadow:none !important;
}

#eph-header .eph-search-overlay .search-voice,
#eph-header .eph-search-overlay .search-send{
  position:relative;

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

  width:34px !important;
  height:34px !important;
  min-width:34px !important;
  max-width:34px;

  margin:0;
  padding:0;

  border-radius:999px !important;
  border:1px solid transparent !important;
  background:transparent !important;
  box-shadow:none !important;

  opacity:1 !important;
  visibility:visible !important;

  cursor:pointer;

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

#eph-header .eph-search-overlay .search-voice svg,
#eph-header .eph-search-overlay .search-send svg{
  display:block !important;

  width:18px !important;
  height:18px !important;

  opacity:1 !important;
  visibility:visible !important;

  fill:none !important;
  stroke:#165c34 !important;
  stroke-width:1.9 !important;
}

#eph-header .eph-search-overlay .search-voice svg *,
#eph-header .eph-search-overlay .search-send svg *{
  opacity:1 !important;
  visibility:visible !important;
  fill:none !important;
  stroke:#165c34 !important;
}

#eph-header .eph-search-overlay .search-voice:hover,
#eph-header .eph-search-overlay .search-send:hover{
  background:rgba(22,92,52,.03) !important;
  border-color:#d3e4da !important;

  box-shadow:
    0 0 0 14px rgba(22,92,52,.03),
    0 10px 22px rgba(0,0,0,.10) !important;

  transform:translateY(-1px);
}

#eph-header .eph-search-overlay .search-voice:focus,
#eph-header .eph-search-overlay .search-voice:focus-visible,
#eph-header .eph-search-overlay .search-send:focus,
#eph-header .eph-search-overlay .search-send:focus-visible{
  outline:none !important;
  box-shadow:none !important;
  border-color:transparent !important;
  background:transparent !important;
}

#eph-header .eph-search-overlay .search-voice.is-recording{
  background:#ffffff !important;
  border-color:#cde5d6 !important;
  box-shadow:0 10px 22px rgba(0,0,0,.14) !important;

  animation:search-breathe 1.4s ease-in-out infinite alternate;
}

#eph-header .eph-search-overlay .search-voice::after{
  content:attr(data-tooltip);

  position:absolute;
  left:50%;
  bottom:-40px;

  padding:4px 10px;
  border-radius:999px;

  background:#173b2a;
  color:#ffffff;

  font-size:12px;
  line-height:1.4;
  white-space:nowrap;

  opacity:0;
  pointer-events:none;

  box-shadow:0 8px 18px rgba(0,0,0,.25);

  transform:translateX(-50%) translateY(4px);
  transition:opacity .18s ease, transform .18s ease;
}

#eph-header .eph-search-overlay .search-voice.is-recording::after{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

#eph-header .eph-search-overlay .search-send .send-loader{
  display:none;

  width:14px;
  height:14px;

  border-radius:999px;
  border:2px solid rgba(22,92,52,.18);
  border-top-color:#165c34;

  animation:search-spin .7s linear infinite;
}

#eph-header .eph-search-overlay .search-send.is-loading{
  background:#ffffff;
  border-color:#cde5d6;
  box-shadow:0 10px 22px rgba(0,0,0,.14);

  animation:search-breathe 1.4s ease-in-out infinite alternate;
}

#eph-header .eph-search-overlay .search-send.is-loading .send-icon{
  display:none;
}

#eph-header .eph-search-overlay .search-send.is-loading .send-loader{
  display:block;
}


/* =========================================================
   5. SEARCH HINT CHIPS
   ========================================================= */

#eph-header .eph-search-overlay .search-hints{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;

  margin-top:4px;

  color:var(--muted);

  font-size:12px;
}

#eph-header .eph-search-overlay .search-hints > span{
  font-weight:600;
}

#eph-header .eph-search-overlay .search-hints .chip{
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(215,234,223,.8);

  background:rgba(229,242,233,.7);
  color:var(--muted);

  font-size:11px;
  font-weight:500;
  line-height:1.2;
  text-decoration:none;

  cursor:pointer;

  box-shadow:none;
  animation:none;
  transform:none;

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

#eph-header .eph-search-overlay .search-hints .chip:hover{
  background:#f3fbf6;
  color:#0b2d1f;
  border-color:#cde5d6;

  transform:translateY(-2px) scale(1.04);

  box-shadow:0 10px 26px rgba(22,92,52,.26);
}


/* =========================================================
   6. NEWS PANEL
   ========================================================= */

.eph-news-overlay{
  position:fixed;
  inset:0;

  display:flex;
  justify-content:flex-end;
  align-items:stretch;

  background:rgba(15,24,20,.32);

  opacity:0;
  pointer-events:none;

  transition:opacity .18s ease;

  z-index:11900;
}

.eph-news-panel{
  width:min(380px,90vw);
  height:100vh;
  max-height:100vh;

  margin:0 !important;
  padding:20px 22px 18px;
  border-radius:24px 0 0 24px;

  display:flex;
  flex-direction:column;
  gap:14px;

  background:#ffffff;

  box-shadow:0 26px 80px rgba(0,0,0,.35);

  transform:translateX(18px);
  transition:transform .22s cubic-bezier(.19,1,.22,1);
}

.eph-news-open .eph-news-overlay{
  opacity:1;
  pointer-events:auto;
}

.eph-news-open .eph-news-panel{
  transform:translateX(0);
}

.eph-news-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;

  margin-bottom:4px;
}

.eph-news-title{
  display:flex;
  align-items:center;
  gap:8px;

  margin-bottom:4px;

  color:var(--muted);

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

.eph-news-logo{
  height:1.6em !important;
  width:auto !important;
  max-height:none !important;

  display:block;
  flex-shrink:0;
}

.eph-news-body{
  max-height:calc(100vh - 90px);
  overflow-y:auto;

  padding-right:4px;

  color:var(--ink);

  font-size:14px;
  line-height:1.45;
}

.eph-news-item{
  padding:8px 0 10px;
  border-bottom:1px solid var(--line);
}

.eph-news-item:last-child{
  border-bottom:0;
}

.eph-news-item .label{
  margin-bottom:2px;

  color:var(--muted);

  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.eph-news-item .title{
  font-weight:700;
}

.eph-news-item .meta{
  margin-top:2px;

  color:var(--muted);

  font-size:12px;
}

.eph-news-item a{
  color:var(--brand);
  text-decoration:none;
}

.eph-news-item a:hover{
  text-decoration:underline;
}


/* =========================================================
   7. HELP PANEL
   ========================================================= */

.eph-help-overlay{
  position:fixed;
  inset:0;

  display:flex;
  justify-content:flex-end;
  align-items:stretch;

  background:rgba(15,24,20,.32);

  opacity:0;
  pointer-events:none;

  transition:opacity .18s ease;

  z-index:11890;
}

.eph-help-panel{
  width:min(420px,92vw);
  height:100vh;
  max-height:100vh;

  margin:0 !important;
  padding:22px 22px 20px;
  border-radius:24px 0 0 24px;

  display:flex;
  flex-direction:column;
  gap:16px;

  background:#ffffff;

  box-shadow:0 26px 80px rgba(0,0,0,.38);

  transform:translateX(22px);
  transition:transform .22s cubic-bezier(.19,1,.22,1);
}

.eph-help-open .eph-help-overlay{
  opacity:1;
  pointer-events:auto;
}

.eph-help-open .eph-help-panel{
  transform:translateX(0);
}

.eph-help-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  margin-bottom:6px;
}

.eph-help-title{
  display:flex;
  align-items:center;
  gap:10px;

  color:var(--muted);

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

.eph-help-logo{
  height:1.3em;
  width:auto;

  display:block;
  flex-shrink:0;
}

.eph-help-badge{
  padding:3px 9px;
  border-radius:999px;

  background:#0f4826;
  color:#d9f5e4;

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

.eph-help-body{
  max-height:calc(100vh - 110px);
  overflow-y:auto;

  padding-right:4px;

  color:var(--ink);

  font-size:14px;
  line-height:1.45;
}

.eph-help-block{
  margin-bottom:10px;
  padding:12px 13px;

  border-radius:16px;
  border:1px solid var(--line);

  background:#f6fbf7;

  box-shadow:0 10px 30px rgba(7,38,19,.06);
}

.eph-help-block:last-child{
  margin-bottom:0;
}

.eph-help-label{
  margin-bottom:4px;

  color:var(--muted);

  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.eph-help-heading{
  margin-bottom:4px;

  font-weight:700;
}

.eph-help-text{
  margin-bottom:6px;

  color:var(--muted);

  font-size:13px;
}

.eph-help-link{
  color:var(--brand);

  font-size:13px;
  font-weight:600;
  text-decoration:none;
}

.eph-help-link:hover{
  text-decoration:underline;
}

.eph-help-links-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;

  margin-top:4px;
}

.eph-help-chip{
  padding:4px 9px;
  border-radius:999px;
  border:1px solid var(--line);

  background:#ffffff;
  color:var(--muted);

  font-size:12px;
  text-decoration:none;

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

.eph-help-chip:hover{
  background:#ffffff;
  border-color:#cde5d6;

  transform:translateY(-1px);

  box-shadow:0 10px 24px rgba(0,0,0,.08);
}

.eph-help-xenyra-cta{
  display:flex;
  align-items:center;
  gap:12px;

  margin-top:12px;
}


/* =========================================================
   8. SHARED CLOSE BUTTON
   Search / news / help / Xenyra shell compatible
   ========================================================= */

.eph-help-close,
.eph-help-close:hover,
.eph-help-close:focus,
.eph-news-close,
.eph-news-close:hover,
.eph-news-close:focus,
.search-close,
.search-close:hover,
.search-close:focus,
#xenyra-chat-shell .xenyra-chat-close,
#xenyra-chat-shell .xenyra-chat-close:hover,
#xenyra-chat-shell .xenyra-chat-close:focus{
  width:36px !important;
  height:36px !important;

  padding:0 !important;
  border-radius:999px !important;
  border:1px solid var(--line) !important;

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

  background:#ffffff !important;

  outline:none !important;
  box-shadow:0 8px 16px rgba(0,0,0,.14) !important;

  cursor:pointer;

  transition:
    transform .15s ease,
    box-shadow .15s ease,
    border-color .15s ease !important;
}

.eph-help-close span,
.eph-news-close span,
.search-close span,
#xenyra-chat-shell .xenyra-chat-close span{
  position:relative;

  width:15px !important;
  height:15px !important;

  display:block !important;
}

.eph-help-close span::before,
.eph-help-close span::after,
.eph-news-close span::before,
.eph-news-close span::after,
.search-close span::before,
.search-close span::after,
#xenyra-chat-shell .xenyra-chat-close span::before,
#xenyra-chat-shell .xenyra-chat-close span::after{
  content:"" !important;

  position:absolute !important;
  left:0 !important;
  right:0 !important;
  top:50% !important;

  height:2px !important;

  background:var(--ink) !important;

  transform-origin:50% 50%;
}

.eph-help-close span::before,
.eph-news-close span::before,
.search-close span::before,
#xenyra-chat-shell .xenyra-chat-close span::before{
  transform:translateY(-50%) rotate(45deg) !important;
}

.eph-help-close span::after,
.eph-news-close span::after,
.search-close span::after,
#xenyra-chat-shell .xenyra-chat-close span::after{
  transform:translateY(-50%) rotate(-45deg) !important;
}

.eph-help-close:hover,
.eph-news-close:hover,
.search-close:hover,
#xenyra-chat-shell .xenyra-chat-close:hover{
  border-color:#cde5d6 !important;
  transform:translateY(-1px) !important;
  box-shadow:0 10px 22px rgba(0,0,0,.22) !important;
}


/* =========================================================
   9. RESPONSIVE PANEL RULES
   ========================================================= */

@media (max-width:640px){
  .eph-news-panel,
  .eph-help-panel{
    width:100%;
    border-radius:0;
    box-shadow:0 26px 80px rgba(0,0,0,.45);
  }
}


/* =========================================================
   10. ANIMATIONS
   ========================================================= */

@keyframes search-breathe{
  from{
    transform:translateY(-1px) scale(1);
    box-shadow:0 10px 22px rgba(0,0,0,.10);
  }

  to{
    transform:translateY(-2px) scale(1.03);
    box-shadow:0 14px 30px rgba(0,0,0,.16);
  }
}

@keyframes search-spin{
  to{
    transform:rotate(360deg);
  }
}