/* ABFC UI Pack - styles */
:root{
  --abfc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --abfc-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  --abfc-shadow-strong: 0 18px 45px rgba(15, 23, 42, 0.18);
  --abfc-accent: #0ea5b7;
}

/* Reveal */
.abfc-reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--abfc-duration, 600ms) var(--abfc-ease),
    transform var(--abfc-duration, 600ms) var(--abfc-ease);
  transition-delay: var(--abfc-delay, 0ms);
  will-change: opacity, transform;
}
[data-animate="fade"].abfc-reveal{ transform: none; }
[data-animate="slide-up"].abfc-reveal{ transform: translateY(18px); }
[data-animate="slide-left"].abfc-reveal{ transform: translateX(-18px); }
[data-animate="slide-right"].abfc-reveal{ transform: translateX(18px); }
[data-animate="zoom"].abfc-reveal{ transform: scale(0.98); }
.abfc-inview{ opacity: 1; transform: none; }

/* Back to top */
.abfc-backtotop{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #ffffff;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--abfc-shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  z-index: 9999;
}
.abfc-backtotop--visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.abfc-backtotop:focus-visible{
  outline: 3px solid var(--abfc-accent);
  outline-offset: 2px;
}

/* Progress bar */
.abfc-progress{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(15, 23, 42, 0.08);
  z-index: 9999;
}
.abfc-progress__bar{
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8A1538, #0ea5b7);
  transition: width 120ms linear;
}

/* Header */
.abfc-header--scrolled{
  box-shadow: var(--abfc-shadow);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.abfc-header--hidden{
  transform: translateY(-100%);
  transition: transform 200ms ease;
}

/* Menu lock */
.abfc-menu-open{
  overflow: hidden;
}

/* Toasts */
.abfc-toast-wrap{
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}
.abfc-toast{
  pointer-events: auto;
  max-width: min(90vw, 360px);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  color: #0b1220;
  background: #e2f8ee;
  border: 1px solid rgba(12, 58, 43, 0.12);
  box-shadow: var(--abfc-shadow-strong);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.abfc-toast--visible{ opacity: 1; transform: translateY(0); }
.abfc-toast--success{ background: #e2f8ee; color: #0c3a2b; }
.abfc-toast--error{ background: #fee2e2; color: #7f1d1d; }
.abfc-toast--info{ background: #e0f2fe; color: #0b1220; }
.abfc-toast__message{ flex: 1; }
.abfc-toast__close{
  border: 0;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
  color: inherit;
}

/* Listing search */
.abfc-listing-search{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--abfc-shadow);
}
.abfc-listing-search__input{
  flex: 1 1 220px;
  min-width: 180px;
  height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #ffffff;
  font-size: 14px;
}
.abfc-listing-search__input:focus{
  border-color: var(--abfc-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 183, 0.18);
  outline: none;
}
.abfc-listing-search__reset{
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #ffffff;
  font-weight: 700;
}
.abfc-listing-search__count{
  font-weight: 700;
  color: #0f172a;
}

/* Table search */
.abfc-table-search{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.abfc-table-search__input{
  min-width: 200px;
  height: 38px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #ffffff;
}
.abfc-table__match{
  background: #fef9c3;
}

/* Form states */
.abfc-field--invalid{
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}
.abfc-field-help{
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #b91c1c;
}
.abfc-btn-loading{
  position: relative;
}
.abfc-btn-loading::after{
  content: '';
  position: absolute;
  right: 12px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: rgba(255, 255, 255, 0);
  animation: abfc-spin 0.8s linear infinite;
}
@keyframes abfc-spin{
  to { transform: rotate(360deg); }
}

/* FAQ */
.abfc-details{ border-radius: 12px; border: 1px solid rgba(15, 23, 42, 0.08); padding: 10px 14px; background: #ffffff; }
.abfc-details summary{ font-weight: 700; cursor: pointer; }
.abfc-faq__btn{ width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: transparent; font-size: 16px; font-weight: 700; text-align: left; padding: 10px 0; cursor: pointer; }
.abfc-faq__panel{ padding: 6px 0 12px; }

/* Tabs */
[data-tabs] [data-tab]{ cursor: pointer; }

/* Hover / press */
.abfc-hover-lift{
  transition: transform 180ms var(--abfc-ease), box-shadow 180ms var(--abfc-ease);
}
.abfc-hover-lift:hover{
  transform: translateY(-3px);
  box-shadow: var(--abfc-shadow);
}
.abfc-press:active{
  transform: translateY(1px) scale(0.99);
}
.abfc-press:focus-visible{
  outline: 3px solid var(--abfc-accent);
  outline-offset: 2px;
}

/* Spotlight */
.abfc-hover-lift{
  position: relative;
  overflow: hidden;
}
.abfc-hover-lift::after{
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--abfc-spot-x, 50%) var(--abfc-spot-y, 50%), rgba(14, 165, 183, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}
.abfc-hover-lift:hover::after{ opacity: 1; }

/* Skeleton */
.abfc-skeleton .abfc-skeleton-item{
  position: relative;
  overflow: hidden;
}
.abfc-skeleton .abfc-skeleton-item::before{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.6) 0%, rgba(248, 250, 252, 0.9) 50%, rgba(226, 232, 240, 0.6) 100%);
  animation: abfc-shimmer 0.6s linear infinite;
}
@keyframes abfc-shimmer{
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Lazy images */
.abfc-lazy{ opacity: 0; transition: opacity 240ms ease; }
.abfc-lazy.abfc-lazy--loaded{ opacity: 1; }

/* Page fade */
.abfc-pagefade{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 9998;
}
.abfc-pagefade--active{ opacity: 1; }

/* UI toggle */
.abfc-ui-toggle{
  margin-top: 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 6px 12px;
  background: #ffffff;
  font-weight: 700;
}

/* Scroll spy */
.abfc-toc-active{
  font-weight: 800;
  text-decoration: underline;
}

/* Tooltip */
.abfc-tooltip{
  position: absolute;
  z-index: 9999;
  padding: 6px 10px;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 150ms ease, transform 150ms ease;
}
.abfc-tooltip--visible{
  opacity: 1;
  transform: translateY(0);
}

/* Logout button override */
.abfc-logout-floating{ right: 104px !important; }

@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .abfc-reveal{ opacity: 1; transform: none; }
  .abfc-hover-lift::after{ opacity: 0; }
}
