/* =====================================================================
   eApply v2.24.12 - modern layer (loads AFTER epw-extras.css / epw-dark.css)
   1) Cards: the date ("Last Date : 19 Dec 2026") is never cut - full year always visible
   2) NEW tag: the letters themselves animate (wave + shine)
   3) Phone bottom menu: floating rounded-rectangle "AI" dock
   Off switches: add_filter('epw_modern_ui','__return_false');
   ===================================================================== */

/* ---------- 1) DATE ROW: never clipped ---------- */
html body .sy-card .sy-meta{ padding-right:0 !important; max-width:100% !important; min-width:0; }
html body .sy-card .sy-date{
  overflow:visible !important; max-width:none !important; white-space:nowrap;
  font-variant-numeric:tabular-nums; letter-spacing:0 !important;
}
html body .sy-card .sy-date-label{ opacity:.82; }
html body .sy-card .sy-date-val{ font-weight:700; }
/* tag row (Active Soon / Closing Soon ...) keeps clear of the round arrow chip */
html body .sy-card .sy-tags{ padding-right:24px; }
/* date row is the last row -> keep clear of the arrow too */
html body .sy-card .sy-meta > .sy-date:last-child{ padding-right:22px; }

/* when even the smallest font cannot hold it on one line, the script adds .sy-date-stack:
   label on top, date underneath - still 100% visible */
html body .sy-card .sy-date.sy-date-stack{
  display:flex !important; flex-direction:column; align-items:flex-start; gap:1px !important;
  white-space:normal; line-height:1.2; padding-right:22px;
}
html body .sy-card .sy-date.sy-date-stack .sy-date-label{ font-size:.86em; text-transform:none; }
html body .sy-card .sy-date.sy-date-stack .sy-date-val{ font-size:1.06em; }

/* ---------- 2) NEW TAG - animated text ---------- */
.epw-nw{ display:inline-flex; align-items:center; gap:.5px; position:relative; z-index:1; padding-top:2px; }
.epw-nw i{
  font-style:normal; display:inline-block; line-height:1;
  animation:epw-nw-wave 1.9s cubic-bezier(.4,0,.2,1) infinite;
  animation-delay:calc(var(--k,0) * .13s);
  text-shadow:0 0 6px rgba(255,255,255,.55);
}
.epw-nw i:nth-child(1){ --k:0; } .epw-nw i:nth-child(2){ --k:1; } .epw-nw i:nth-child(3){ --k:2; }
@keyframes epw-nw-wave{
  0%,55%,100%{ transform:translateY(0) scale(1); color:#fff; }
  25%{ transform:translateY(-1px) scale(1.14); color:#fff3c4; text-shadow:0 0 8px rgba(255,236,170,.95); }
}
/* a soft light sweeps across the badge */
.sy-badge-new.sy-new-corner{ overflow:hidden; isolation:isolate; }   /* stays position:absolute from the card CSS */
.ucl-new{ overflow:hidden; position:relative; isolation:isolate; }
.sy-badge-new.sy-new-corner::after, .ucl-new::after{
  content:""; position:absolute; top:-30%; bottom:-30%; left:-60%; width:45%; z-index:0; pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);
  transform:skewX(-18deg); animation:epw-nw-sweep 2.8s ease-in-out infinite;
}
@keyframes epw-nw-sweep{ 0%,35%{ left:-60%; } 75%,100%{ left:130%; } }
.sy-badge-new.sy-new-corner{ background:linear-gradient(135deg,#ff8a1f,#d55e00 60%,#c2410c) !important; }
.ucl-new .epw-nw{ font-size:inherit; }
@media (prefers-reduced-motion:reduce){
  .epw-nw i, .sy-badge-new.sy-new-corner::after, .ucl-new::after{ animation:none !important; }
}

/* ---------- 3) PHONE BOTTOM MENU - floating AI dock ---------- */
@property --epw-ang{ syntax:"<angle>"; inherits:false; initial-value:0deg; }
@keyframes epw-aura{ to{ --epw-ang:360deg; } }
@keyframes epw-dock-sheen{ 0%,100%{ transform:translateX(-120%); } 50%{ transform:translateX(320%); } }
@keyframes epw-spark{ 0%,100%{ opacity:.25; transform:scale(.6) rotate(0); } 50%{ opacity:1; transform:scale(1) rotate(25deg); } }
@keyframes epw-tile-float{ 0%,100%{ transform:translateY(-3px) scale(1.04); } 50%{ transform:translateY(-5px) scale(1.07); } }

@media (max-width:768px){
  body.eh-has-bbar{ padding-bottom:calc(68px + env(safe-area-inset-bottom,0px)) !important; }

  html body .eh-bbar{
    left:0 !important; right:0 !important; margin:0 auto !important;
    width:calc(100% - 20px) !important; max-width:560px;
    bottom:calc(8px + env(safe-area-inset-bottom,0px)) !important;
    padding-bottom:0 !important; border-radius:20px !important; overflow:hidden;
    border:1.5px solid transparent !important;
    background:
      linear-gradient(rgba(255,255,255,.93),rgba(255,255,255,.93)) padding-box,
      conic-gradient(from var(--epw-ang),#6366f1,#22d3ee,#a78bfa,#f472b6,#6366f1) border-box !important;
    -webkit-backdrop-filter:saturate(180%) blur(20px); backdrop-filter:saturate(180%) blur(20px);
    box-shadow:0 18px 40px -14px rgba(79,70,229,.45),0 4px 14px -4px rgba(15,23,42,.18) !important;
    animation:epw-aura 7s linear infinite, eh-bb-in .6s cubic-bezier(.22,1,.36,1) backwards !important;
  }
  html body .eh-bbar.is-settled{ animation:epw-aura 7s linear infinite !important; }
  html body .eh-bbar.is-anim{
    -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
    background:
      linear-gradient(rgba(255,255,255,.98),rgba(255,255,255,.98)) padding-box,
      conic-gradient(from var(--epw-ang),#6366f1,#22d3ee,#a78bfa,#f472b6,#6366f1) border-box !important;
  }
  html body .eh-bbar.is-min{
    width:64px !important; border-radius:18px !important;
    bottom:calc(10px + env(safe-area-inset-bottom,0px)) !important;
  }
  html body .eh-bbar .eh-bb-track{ padding:4px 5px !important; gap:2px !important; }

  html body .eh-bbar .eh-bb-item{ border-radius:14px !important; padding:3px 1px 3px !important; gap:1px !important; color:#64748b; }
  html body .eh-bbar .eh-bb-ic{
    position:relative; width:38px !important; height:26px !important; border-radius:11px !important; font-size:17px !important;
    background:linear-gradient(145deg,rgba(99,102,241,.08),rgba(34,211,238,.08)) !important;
    border:1px solid rgba(99,102,241,.10);
    box-shadow:none;
  }
  html body .eh-bbar .eh-bb-lb{ letter-spacing:.1px; font-size:10px !important; line-height:1.1 !important; }
  html body .eh-bbar .eh-bb-ic img{ width:18px !important; height:18px !important; }

  /* active = glowing gradient tile + gradient label + twinkling spark */
  html body .eh-bbar .eh-bb-item.is-active{ color:#4338ca !important; }
  html body .eh-bbar .eh-bb-item.is-active .eh-bb-ic{
    background:linear-gradient(135deg,#4f46e5 0%,#7c3aed 55%,#06b6d4 100%) !important;
    border-color:rgba(255,255,255,.35);
    box-shadow:0 10px 20px -8px rgba(79,70,229,.8),0 0 0 3px rgba(99,102,241,.12),inset 0 1px 0 rgba(255,255,255,.45) !important;
    animation:epw-tile-float 2.8s ease-in-out infinite;
    overflow:visible;
  }
  html body .eh-bbar .eh-bb-item.is-active .eh-bb-ic::before{
    content:"✦"; position:absolute; top:-5px; right:-3px; font-size:8px; line-height:1; color:#fbbf24;
    text-shadow:0 0 6px rgba(251,191,36,.9); animation:epw-spark 2s ease-in-out infinite;
  }
  html body .eh-bbar .eh-bb-item.is-active .eh-bb-lb{
    font-weight:800 !important;
    background:linear-gradient(90deg,#4338ca,#7c3aed,#0891b2); -webkit-background-clip:text; background-clip:text;
    color:transparent !important; -webkit-text-fill-color:transparent;
  }
  html body .eh-bbar .eh-bb-item.is-active::after{
    width:12px !important; height:2px !important; margin-left:-6px !important; bottom:-1px !important; border-radius:3px !important;
    background:linear-gradient(90deg,#6366f1,#22d3ee) !important; opacity:1 !important;
  }
  html body .eh-bbar .eh-bb-item:not(.is-active):active .eh-bb-ic{ transform:scale(.9); background:rgba(99,102,241,.16) !important; }

  /* collapsed Tools pill */
  html body .eh-bbar.is-min .eh-bb-item.is-pin .eh-bb-ic{
    background:linear-gradient(135deg,#4f46e5,#7c3aed 60%,#06b6d4) !important; animation:none;
    box-shadow:0 8px 16px -8px rgba(79,70,229,.8) !important; border-color:rgba(255,255,255,.35);
  }
  html body .eh-bbar.is-min .eh-bb-item.is-pin .eh-bb-lb{ color:#4338ca !important; -webkit-text-fill-color:#4338ca; background:none; }

  /* edge fades match the glass */
  html body .eh-bbar::before{ background:linear-gradient(90deg,rgba(255,255,255,.96),rgba(255,255,255,0)); }
  html body .eh-bbar::after { background:linear-gradient(270deg,rgba(255,255,255,.96),rgba(255,255,255,0)); }

  /* ---- dark theme ---- */
  html[data-epw-theme="dark"] body .eh-bbar,
  html[data-epw-theme="dark"] .eh-bbar{
    background:
      linear-gradient(rgba(15,19,30,.94),rgba(15,19,30,.94)) padding-box,
      conic-gradient(from var(--epw-ang),#6366f1,#22d3ee,#a78bfa,#f472b6,#6366f1) border-box !important;
    border:1.5px solid transparent !important;
    box-shadow:0 18px 40px -14px rgba(0,0,0,.8),0 0 24px -10px rgba(99,102,241,.55) !important;
  }
  html[data-epw-theme="dark"] .eh-bbar.is-anim{
    background:
      linear-gradient(rgba(15,19,30,.99),rgba(15,19,30,.99)) padding-box,
      conic-gradient(from var(--epw-ang),#6366f1,#22d3ee,#a78bfa,#f472b6,#6366f1) border-box !important;
  }
  html[data-epw-theme="dark"] .eh-bbar .eh-bb-ic{ background:linear-gradient(145deg,rgba(129,140,248,.14),rgba(34,211,238,.08)) !important; border-color:rgba(129,140,248,.16); }
  html[data-epw-theme="dark"] .eh-bbar .eh-bb-item.is-active .eh-bb-ic{ background:linear-gradient(135deg,#4f46e5,#7c3aed 55%,#06b6d4) !important; }
  html[data-epw-theme="dark"] .eh-bbar .eh-bb-item.is-active .eh-bb-lb{
    background:linear-gradient(90deg,#a5b4fc,#c4b5fd,#67e8f9); -webkit-background-clip:text; background-clip:text;
  }
  html[data-epw-theme="dark"] .eh-bbar.is-min .eh-bb-item.is-pin .eh-bb-lb{ color:#a5b4fc !important; -webkit-text-fill-color:#a5b4fc; }
  html[data-epw-theme="dark"] .eh-bbar::before{ background:linear-gradient(90deg,rgba(15,19,30,.96),rgba(15,19,30,0)) !important; }
  html[data-epw-theme="dark"] .eh-bbar::after { background:linear-gradient(270deg,rgba(15,19,30,.96),rgba(15,19,30,0)) !important; }
}
@media (prefers-reduced-motion:reduce){
  html body .eh-bbar, html body .eh-bbar *{ animation:none !important; }
}
