/* ==========================================================
   MoboLink Global eSIM — Extra custom styles
   Tailwind is loaded via CDN in header; this file covers
   any site-specific overrides that are hard to inline.
   ========================================================== */

/* ---- Global smooth scroll & nicer fonts ---- */
html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Fancy underline hover in nav (kept as simple underlines already via TW, this is accent) */
.nav-link-active {
  position: relative;
}
.nav-link-active::after {
  content: "";
  position: absolute;
  left: 1rem; right: 1rem;
  bottom: 0.35rem;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #14b8a6);
  border-radius: 2px;
}

/* ---- Hero background gradient overlay ---- */
.hero-gradient {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(16,185,129,.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(20,184,166,.15), transparent 55%),
    linear-gradient(180deg, #f8fffc 0%, #ffffff 75%);
}
.hero-dots {
  background-image:
    radial-gradient(rgba(16,185,129,.12) 1px, transparent 1px),
    radial-gradient(rgba(15,23,42,.05) 1px, transparent 1px);
  background-size: 22px 22px, 40px 40px;
  background-position: 0 0, 11px 11px;
}

/* ---- Card hover lifts ---- */
.card-lift {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px -15px rgba(16,185,129,.25);
}

/* ---- Product region/price badge shine ---- */
.shine {
  background: linear-gradient(120deg, transparent 25%, rgba(255,255,255,.35) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shine 3.5s linear infinite;
}
@keyframes shine {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---- Modal popups ---- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadein .18s ease-out;
}
.modal-box {
  width: 100%; max-width: 560px;
  background: white; border-radius: 1.5rem;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.4);
  overflow: hidden;
  animation: popin .22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes fadein { from { opacity:0 } to { opacity:1 } }
@keyframes popin  { from { opacity:0; transform: translateY(12px) scale(.97) } to { opacity:1; transform: none } }

/* ---- Notification toast ---- */
.toast-wrap {
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 100;
  display: flex; flex-direction: column; gap: .5rem;
  max-width: calc(100vw - 2rem);
}
.toast {
  padding: .9rem 1.1rem;
  border-radius: .85rem;
  font-weight: 600;
  font-size: .875rem;
  color: white;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: .6rem;
  animation: slidein .22s ease-out;
  border-left: 4px solid rgba(255,255,255,.35);
  max-width: 420px;
}
.toast-success { background: linear-gradient(135deg, #10b981, #059669); }
.toast-error   { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast-info    { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.toast-warn    { background: linear-gradient(135deg, #f59e0b, #d97706); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---- Tiny animated "glow dot" for live indicators ---- */
.pulse-dot {
  position: relative;
  width: .55rem; height: .55rem; border-radius: 9999px;
  background: #10b981; display: inline-block;
}
.pulse-dot::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 9999px; background: #10b981; opacity: .5;
  animation: pulseGlow 1.8s infinite ease-out;
}
@keyframes pulseGlow {
  0%   { transform: scale(1);   opacity: .5 }
  100% { transform: scale(3);   opacity: 0  }
}

/* ---- Select dropdown custom ---- */
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem !important;
  -webkit-appearance: none;
  appearance: none;
}

/* ---- Mobile nav slide (used by header mobile menu if JS runs) ---- */
#mobile-menu[data-open="true"] {
  max-height: 700px !important;
  opacity: 1 !important;
}
#mobile-menu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .2s ease;
}

/* ---- Print support ---- */
@media print {
  .no-print { display: none !important; }
}

/* ---- Small helper for dashboard tree connections ---- */
.tree-line {
  position: relative;
}
.tree-line::before {
  content: "";
  position: absolute;
  left: 1.1rem; top: -0.75rem; bottom: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, #d1fae5);
}
.tree-line::after {
  content: "";
  position: absolute;
  left: 1.1rem; right: 0; top: 50%;
  height: 2px; width: 0.75rem;
  background: #d1fae5;
}

/* Loading spinner overlay */
.loader-spin {
  width: 1.1rem; height: 1.1rem;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: white;
  border-radius: 50%;
  display: inline-block;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
