/* ============================================================
   expiry_banner.css — Sticky expiry warning
   Mobile-first, RTL, dark/light aware
   ============================================================ */

.expiry-banner{
  position:sticky;
  inset-block-start:0;
  z-index:180;
  background:linear-gradient(135deg,
    hsl(354 78% 45%) 0%,
    hsl(354 78% 55%) 100%
  );
  color:#fff;
  box-shadow:0 4px 12px hsl(354 60% 20% / .3);
  animation:ebSlideDown .35s ease-out;
}
.expiry-banner[hidden]{ display:none; }

@keyframes ebSlideDown{
  from { transform:translateY(-100%); opacity:0; }
  to   { transform:translateY(0);      opacity:1; }
}

.eb-inner{
  display:flex; align-items:center;
  gap:10px;
  padding:10px 14px;
  max-inline-size:1400px; margin:0 auto;
}

.eb-icon{
  inline-size:32px; block-size:32px;
  border-radius:50%;
  display:grid; place-items:center;
  background:hsl(0 0% 100% / .18);
  flex-shrink:0;
  animation:ebPulse 2s ease-in-out infinite;
}
.eb-icon .ic{ inline-size:16px; block-size:16px; }
@keyframes ebPulse{
  0%,100% { box-shadow:0 0 0 0 hsl(0 0% 100% / .4); }
  50%     { box-shadow:0 0 0 8px hsl(0 0% 100% / 0); }
}

.eb-body{
  display:grid; gap:1px;
  flex:1; min-inline-size:0;
}
.eb-title{
  font-size:13px; font-weight:700;
  color:#fff;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.eb-sub{
  font-size:11px; color:hsl(0 0% 100% / .85);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.eb-cta{
  display:flex; align-items:center; gap:6px;
  padding:8px 14px;
  background:#fff;
  color:hsl(354 78% 45%);
  border:none; border-radius:8px;
  font-size:12.5px; font-weight:700;
  cursor:pointer;
  flex-shrink:0;
  transition:transform .15s, box-shadow .15s;
  min-block-size:36px;
}
.eb-cta:hover{ transform:translateY(-1px); box-shadow:0 4px 8px hsl(0 0% 0% / .2); }
.eb-cta:active{ transform:translateY(0); }
.eb-cta .ic{ inline-size:14px; block-size:14px; }

/* ═══ Tablet+ ═══ */
@media (min-inline-size: 640px){
  .eb-inner{ padding:12px 20px; gap:14px; }
  .eb-icon{ inline-size:38px; block-size:38px; }
  .eb-icon .ic{ inline-size:18px; block-size:18px; }
  .eb-title{ font-size:14px; }
  .eb-sub{ font-size:12px; white-space:normal; }
  .eb-cta{ padding:10px 18px; font-size:13px; }
}

/* ═══ Auto-warning variant (قبل الانتهاء بأيام قليلة) ═══ */
.expiry-banner[data-severity="warn"]{
  background:linear-gradient(135deg,
    hsl(38 92% 44%) 0%,
    hsl(38 92% 54%) 100%
  );
  box-shadow:0 4px 12px hsl(38 60% 20% / .3);
}
.expiry-banner[data-severity="warn"] .eb-cta{
  color:hsl(38 92% 40%);
}
