/* ==========================================================================
   Agro Capital Investment — investment activity notification bar
   Bottom-left / bottom-right slide-in toast. Self-contained: nothing here
   depends on, or overrides, the landing-page or plans-grid styles.
   ========================================================================== */

.agi-notif {
  position: fixed;
  z-index: 999990;
  bottom: 20px;
  max-width: 380px;
  width: calc(100vw - 32px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .3s ease, transform .3s ease;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.agi-notif[hidden] {
  display: none !important;
}

.agi-notif--right { right: 20px; }
.agi-notif--left  { left: 20px; }

.agi-notif.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.agi-notif__inner {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 40px 14px 14px;
  background: #ffffff;
  color: #16241d;
  border: 1px solid #dfe8e2;
  border-left: 4px solid #2a8c68;
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(8, 40, 29, .16);
}

.agi-notif--right .agi-notif__inner { border-left: 4px solid #2a8c68; }
.agi-notif--left  .agi-notif__inner { border-left: 4px solid #2a8c68; }

/* Live dot */
.agi-notif__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: #2a8c68;
  box-shadow: 0 0 0 0 rgba(42, 140, 104, .6);
  animation: agi-notif-pulse 2.4s ease-out infinite;
}

@keyframes agi-notif-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(42, 140, 104, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(42, 140, 104, 0); }
  100% { box-shadow: 0 0 0 0 rgba(42, 140, 104, 0); }
}

.agi-notif__text {
  margin: 0;
  flex: 1 1 auto;
  font-weight: 500;
  color: #16241d;
  /* Two lines is enough for a full sentence; longer copy is clamped rather
     than allowed to grow the bar down the screen. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.agi-notif__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5c6f66;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.agi-notif__close:hover,
.agi-notif__close:focus {
  background: #eef6f1;
  color: #14503c;
}

/* A visible focus ring is required: this is a real control and must be
   reachable and identifiable from the keyboard. */
.agi-notif__close:focus-visible,
.agi-notif__close:focus {
  outline: 2px solid #2a8c68;
  outline-offset: 2px;
}

.agi-notif__close-icon {
  display: block;
  margin-top: -2px;
}

/* WordPress ships .screen-reader-text in most themes; restate it here so the
   button keeps an accessible name even in a theme that does not. */
.agi-notif .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .agi-notif {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    width: auto;
  }

  .agi-notif__inner {
    padding: 12px 38px 12px 12px;
    font-size: 13.5px;
  }

  .agi-notif__text {
    -webkit-line-clamp: 4;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .agi-notif {
    transition: none;
    transform: none;
  }

  .agi-notif.is-visible {
    transform: none;
  }

  .agi-notif__dot {
    animation: none;
  }
}
