/* Global toasts + modal alerts/confirm
   Included via menu bars.
*/

:root{
  --toast-shadow: 0 24px 54px rgba(14,50,74,.18);
  --eos-notice-blue: #2baae1;
  --eos-notice-blue-deep: #007bb8;
  --eos-notice-ink: #12324a;
  --eos-notice-muted: #5e7a8d;
  --eos-notice-border: rgba(43,170,225,.18);
  --eos-notice-panel: rgba(252,254,255,.96);
}

#eos-toast-region{
  position: fixed;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
  padding: var(--space-3-5);
}

/* Desktop: top-right */
@media (min-width: 721px){
  #eos-toast-region{
    top: 62px;
    right: 10px;
    max-width: min(430px, calc(100vw - 20px));
  }
}

/* Mobile: bottom-center */
@media (max-width: 720px){
  #eos-toast-region{
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
    width: calc(100vw - 20px);
    max-width: 520px;
  }
}

.eos-toast{
  pointer-events: auto;
  position: relative;
  border-radius: 22px;
  padding: 0.95rem 1rem 1rem 1rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(239,248,255,.93) 100%),
    rgba(255,255,255,.95);
  border: 1px solid var(--eos-notice-border);
  box-shadow: var(--toast-shadow);
  overflow: hidden;
  color: var(--eos-notice-ink);
  font-family: var(--font-family-base);
  touch-action: pan-y;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.eos-toast::before{
  content:"";
  position:absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(43,170,225,.16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(94,234,212,.12), transparent 30%);
  pointer-events:none;
}

.eos-toast::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height: 4px;
  background: linear-gradient(90deg, rgba(100,116,139,.45), rgba(100,116,139,.75));
}

.eos-toast[data-kind="success"]::after{ background: linear-gradient(90deg, #34d399, #16a34a); }
.eos-toast[data-kind="info"]::after{ background: linear-gradient(90deg, #5ad0ff, #007bbd); }
.eos-toast[data-kind="warning"]::after{ background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.eos-toast[data-kind="error"]::after{ background: linear-gradient(90deg, #fb7185, #dc2626); }

.eos-toast__row{
  position: relative;
  z-index: 1;
  display:flex;
  align-items:flex-start;
  gap: 0.85rem;
}

.eos-toast__icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #2baae1 0%, #007bb8 100%);
  box-shadow: 0 12px 22px rgba(0,123,184,.20);
}

.eos-toast[data-kind="success"] .eos-toast__icon{ background: linear-gradient(180deg, #34d399 0%, #16a34a 100%); box-shadow: 0 12px 22px rgba(22,163,74,.18); }
.eos-toast[data-kind="warning"] .eos-toast__icon{ background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%); box-shadow: 0 12px 22px rgba(217,119,6,.18); }
.eos-toast[data-kind="error"] .eos-toast__icon{ background: linear-gradient(180deg, #fb7185 0%, #dc2626 100%); box-shadow: 0 12px 22px rgba(220,38,38,.18); }

.eos-toast__body{
  min-width: 0;
  flex: 1;
}

.eos-toast__kind{
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(43,170,225,.10);
  border: 1px solid rgba(43,170,225,.12);
  color: #0f6f97;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eos-toast__title{
  font-weight: 900;
  font-size: .96rem;
  line-height: 1.2;
  margin: 0;
  color: #0f2f46;
}

.eos-toast__msg{
  margin-top: 0.28rem;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.45;
  color: rgba(18,50,74,.92);
  white-space: pre-wrap;
}

.eos-toast__meta{
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(43,170,225,.10);
  font-size: .78rem;
  font-weight: 700;
  color: var(--eos-notice-muted);
}

.eos-toast__close,
.eos-modal__close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(43,170,225,.12);
  background: rgba(255,255,255,.72);
  color: rgba(15,23,42,.78);
  border-radius: 12px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.eos-toast__close:hover,
.eos-modal__close:hover{
  background: rgba(234,245,252,.96);
}

.eos-toast__progress{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(43,170,225,.08);
}

.eos-toast__progress > div{
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(43,170,225,.7), rgba(0,123,184,.95));
}

.eos-toast{
  animation: eosToastIn .2s ease-out;
}
@keyframes eosToastIn{
  from { transform: translateY(-6px) scale(.985); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.eos-toast.is-leaving{
  animation: eosToastOut .14s ease-in forwards;
}
@keyframes eosToastOut{
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-6px); opacity: 0; }
}

#eos-toast-region .eos-toast{
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  opacity: 1;
  transition: none;
}

#eos-modal-root{
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1000001;
  display: none;
  align-items: center;
  justify-content: center;
  padding-top: var(--space-18px);
  padding-bottom: var(--space-18px);
  padding-left: calc(var(--space-18px) + env(safe-area-inset-left));
  padding-right: calc(var(--space-48px) + env(safe-area-inset-right));
  background: rgba(7,25,39,.58);
  backdrop-filter: blur(6px);
  overscroll-behavior: contain;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body.eos-modal-open,
body.eos-reminder-overlay-open{
  overflow: hidden;
}

#eos-reminder-overlay-root{
  position: fixed;
  inset: 0;
  z-index: 1000002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7,25,39,.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

#eos-reminder-overlay-root.is-open{
  display: flex;
}

.eos-reminder-overlay{
  width: min(760px, calc(100vw - 40px));
}

.eos-reminder-overlay__panel{
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  max-height: calc(100dvh - 48px);
  border-radius: 30px;
  padding: 34px 30px 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(234,246,255,.97) 100%),
    rgba(255,255,255,.98);
  border: 1px solid rgba(255,255,255,.76);
  box-shadow: 0 36px 100px rgba(7,25,39,.34), 0 0 0 1px rgba(43,170,225,.22), 0 0 40px rgba(43,170,225,.18);
  color: #0f2f46;
  text-align: center;
  animation: eosReminderPanelPulse 1.8s ease-in-out infinite;
}

.eos-reminder-overlay__panel::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(43,170,225,.22), transparent 36%),
    radial-gradient(circle at bottom left, rgba(94,234,212,.12), transparent 32%);
  pointer-events: none;
}

.eos-reminder-overlay__signal,
.eos-reminder-overlay__eyebrow,
.eos-reminder-overlay__title,
.eos-reminder-overlay__message,
.eos-reminder-overlay__meta,
.eos-reminder-overlay__actions{
  position: relative;
  z-index: 1;
}

.eos-reminder-overlay__signal{
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.eos-reminder-overlay__signal span{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5ad0ff 0%, #007bbd 100%);
  box-shadow: 0 0 0 0 rgba(43,170,225,.44);
  animation: eosReminderBeacon 1.2s ease-in-out infinite;
}

.eos-reminder-overlay__signal span:nth-child(2){ animation-delay: .16s; }
.eos-reminder-overlay__signal span:nth-child(3){ animation-delay: .32s; }

.eos-reminder-overlay__eyebrow{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  background: rgba(43,170,225,.12);
  border: 1px solid rgba(43,170,225,.18);
  color: #0f6f97;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eos-reminder-overlay__title{
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
  font-weight: 900;
}

.eos-reminder-overlay__message{
  margin: 18px auto 0;
  max-width: 640px;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.55;
  font-weight: 750;
  white-space: pre-wrap;
}

.eos-reminder-overlay__meta{
  margin-top: 16px;
  color: #5e7a8d;
  font-size: .92rem;
  font-weight: 700;
}

.eos-reminder-overlay__actions{
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

@keyframes eosReminderBeacon{
  0%, 100% { transform: scale(.92); box-shadow: 0 0 0 0 rgba(43,170,225,.10); opacity: .72; }
  50% { transform: scale(1.14); box-shadow: 0 0 0 14px rgba(43,170,225,0); opacity: 1; }
}

@keyframes eosReminderPanelPulse{
  0%, 100% { transform: scale(1); box-shadow: 0 36px 100px rgba(7,25,39,.34), 0 0 0 1px rgba(43,170,225,.22), 0 0 40px rgba(43,170,225,.18); }
  50% { transform: scale(1.01); box-shadow: 0 42px 110px rgba(7,25,39,.36), 0 0 0 1px rgba(43,170,225,.28), 0 0 62px rgba(43,170,225,.24); }
}

#eos-modal-root.is-open{ display:flex; }

.eos-modal{
  position: relative;
  width: min(580px, calc(100vw - 36px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 36px);
  background:
    linear-gradient(180deg, rgba(252,254,255,.98) 0%, rgba(236,247,255,.94) 100%),
    rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(7,25,39,.28);
  overflow: hidden;
}

.eos-modal::before{
  content:"";
  position:absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(43,170,225,.16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(94,234,212,.12), transparent 30%);
  pointer-events:none;
}

.eos-modal__head,
.eos-modal__body,
.eos-modal__actions{
  position: relative;
  z-index: 1;
}

.eos-modal__head{
  padding: 1rem 1.1rem 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(43,170,225,.10);
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.eos-modal__title-wrap{
  display:flex;
  align-items:flex-start;
  gap: 0.8rem;
}

.eos-modal__badge{
  display:flex;
  align-items:center;
  justify-content:center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(180deg, #2baae1 0%, #007bb8 100%);
  color:#fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(0,123,184,.22);
}

.eos-modal[data-variant="danger"] .eos-modal__badge{
  background: linear-gradient(180deg, #fb7185 0%, #dc2626 100%);
  box-shadow: 0 12px 22px rgba(220,38,38,.22);
}

.eos-modal__title-stack{
  display:grid;
  gap: 0.2rem;
}

.eos-modal__eyebrow{
  display:inline-flex;
  align-items:center;
  min-height: 22px;
  width: fit-content;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(43,170,225,.10);
  border: 1px solid rgba(43,170,225,.12);
  color: #0f6f97;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eos-modal[data-variant="danger"] .eos-modal__eyebrow{
  background: rgba(251,113,133,.10);
  border-color: rgba(251,113,133,.16);
  color: #be123c;
}

.eos-modal__title{
  font-size: 1.08rem;
  font-weight: 950;
  margin: 0;
  color: #0f2f46;
}

.eos-modal__body{
  padding: 0.95rem 1.1rem 0.4rem;
  color: rgba(18,50,74,.92);
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.5;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.eos-form label{
  display:block;
  font-weight: 900;
  margin: 0 0 var(--space-6px);
}

.eos-form input,
.eos-form select,
.eos-form textarea{
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-2-5) var(--space-3);
  border-radius: 14px;
  border: 1px solid rgba(43,170,225,.18);
  background: rgba(255,255,255,.9);
  color: #12324a;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.eos-form input:focus,
.eos-form select:focus,
.eos-form textarea:focus{
  outline: none;
  border-color: rgba(43,170,225,.7);
  box-shadow: 0 0 0 4px rgba(43,170,225,.12);
}

.eos-form__row{ margin-bottom: var(--space-2); }

.eos-form input[type="color"]{
  padding: 0;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}

.eos-modal__actions{
  padding: 1rem 1.1rem 1.1rem;
  display:flex;
  gap: 0.7rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.eos-btn{
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0.72rem 1rem;
  font-weight: 900;
  cursor:pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, background .16s ease;
}

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

.eos-btn--ghost{
  background: rgba(255,255,255,.74);
  color: rgba(15,23,42,.90);
  border-color: rgba(43,170,225,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.eos-btn--primary{
  background: linear-gradient(180deg, #2baae1 0%, #007bb8 100%);
  color: #fff;
  box-shadow: 0 14px 24px rgba(0,123,184,.24);
}

.eos-btn--danger{
  background: linear-gradient(180deg, #fb7185 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 14px 24px rgba(220,38,38,.22);
}

@media (max-width: 720px){
  .eos-toast{
    border-radius: 20px;
    padding: 0.9rem;
  }

  #eos-modal-root,
  #eos-reminder-overlay-root{
    align-items: flex-start;
    padding: 12px;
  }

  .eos-modal{
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100dvh - 24px);
    border-radius: 20px;
  }

  .eos-reminder-overlay{
    width: min(100%, calc(100vw - 24px));
  }

  .eos-reminder-overlay__panel{
    max-height: calc(100dvh - 24px);
    min-height: 0;
    padding: 24px 18px 20px;
    border-radius: 24px;
  }

  .eos-reminder-overlay__actions{
    flex-direction: column;
  }

  .eos-reminder-overlay__actions .eos-btn{
    width: 100%;
  }

  .eos-modal__head,
  .eos-modal__body,
  .eos-modal__actions{
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }

  .eos-modal__actions{
    justify-content: stretch;
  }

  .eos-btn{
    width: 100%;
  }
}
