/* Flash message slideshow on portal home dashboard */
.fm-slideshow-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fmFadeIn 0.25s ease;
}

@keyframes fmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fm-slideshow {
  width: min(520px, 100%);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  position: relative;
}

.fm-slideshow__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  gap: 10px;
}

.fm-slideshow__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.fm-slideshow__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.fm-slideshow__icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.fm-slideshow__icon-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.fm-slideshow__icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fm-slideshow__icon-btn:disabled:hover {
  background: #f1f5f9;
  color: #475569;
}

.fm-slideshow__body {
  padding: 0 16px 12px;
  min-height: 120px;
  max-height: min(72vh, 640px);
  overflow-x: hidden;
  overflow-y: auto;
}

.fm-slideshow__slide {
  will-change: opacity, transform;
  transition: opacity 0.34s cubic-bezier(0.4, 0, 0.2,  1), transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.fm-slideshow__slide--exit {
  opacity: 0;
  transform: translateX(-18px) scale(0.985);
}

.fm-slideshow__slide--enter {
  opacity: 0;
  transform: translateX(22px) scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
  .fm-slideshow__slide {
    transition: opacity 0.15s ease;
  }

  .fm-slideshow__slide--exit,
  .fm-slideshow__slide--enter {
    transform: none;
  }
}

.fm-slideshow__card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px;
  line-height: 1.35;
}

.fm-slideshow__text {
  font-size: 1rem;
  line-height: 1.55;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 8px 0 4px;
}

.fm-slideshow__caption {
  font-size: 0.9rem;
  color: #64748b;
  padding: 0 0 6px;
}

.fm-slideshow__image-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
  margin-top: 4px;
}

.fm-slideshow__image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(65vh, 520px);
  object-fit: contain;
  background: #f1f5f9;
}

.fm-slideshow__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-top: 1px solid #e2e8f0;
  gap: 12px;
}

.fm-slideshow__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fm-slideshow__counter {
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
}

.fm-slideshow__countdown-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fm-slideshow__icon-btn--sm {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.fm-slideshow__pause-btn.hidden {
  display: none;
}

.fm-slideshow__countdown {
  font-size: 0.82rem;
  color: #64748b;
}

.fm-slideshow__countdown strong {
  color: #2563eb;
  font-variant-numeric: tabular-nums;
}

.fm-slideshow__dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.fm-slideshow__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.28s ease, transform 0.28s ease, width 0.28s ease;
}

.fm-slideshow__dot.is-active {
  background: #2563eb;
  transform: scale(1.2);
  width: 18px;
}

.fm-slideshow__end {
  padding: 12px 16px 18px;
  text-align: center;
}

.fm-slideshow__end-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.fm-slideshow__end-actions .mt-toolbar-btn {
  min-width: 0;
}
