/* ===== Announcement Toast Popup ===== */

.announcement-toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 320px;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 99999;
  border-left: 4px solid #2563eb;

  /* Hidden by default — slides in from right */
  transform: translateX(140%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;

  /* Prevent layout shift */
  visibility: hidden;
}

.announcement-toast.show {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

/* ─── Header ─────────────────────────────────────── */
.toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.toast-icon {
  font-size: 20px;
  line-height: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 15px;
  color: #1e40af;
  letter-spacing: 0.01em;
}

.toast-close {
  background: #f1f5f9;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}

.toast-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* ─── Body ─────────────────────────────────────────── */
.toast-date {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toast-notice-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.toast-text {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Footer ──────────────────────────────────────── */
.toast-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toast-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s;
}

.toast-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Auto-close progress bar */
.toast-progress {
  height: 3px;
  background: #e2e8f0;
  border-radius: 0 0 16px 16px;
  margin: 12px -20px -20px;
  overflow: hidden;
}

.toast-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border-radius: 3px;
  width: 100%;
  animation: toastProgress 10s linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ─── Priority Variants ───────────────────────────── */
.announcement-toast[data-priority="important"] {
  border-left-color: #f59e0b;
}

.announcement-toast[data-priority="important"] .toast-title {
  color: #d97706;
}

.announcement-toast[data-priority="urgent"] {
  border-left-color: #dc2626;
}

.announcement-toast[data-priority="urgent"] .toast-title {
  color: #dc2626;
}

/* ─── Dark Mode ───────────────────────────────────── */
[data-theme="dark"] .announcement-toast {
  background: #1e293b;
  border-left-color: #3b82f6;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .toast-title {
  color: #60a5fa;
}

[data-theme="dark"] .toast-notice-title {
  color: #f1f5f9;
}

[data-theme="dark"] .toast-text {
  color: #94a3b8;
}

[data-theme="dark"] .toast-close {
  background: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .toast-close:hover {
  background: #7f1d1d;
  color: #fca5a5;
}

[data-theme="dark"] .toast-date {
  color: #64748b;
}

[data-theme="dark"] .toast-progress {
  background: #334155;
}

[data-theme="dark"] .announcement-toast[data-priority="important"] {
  border-left-color: #f59e0b;
}

[data-theme="dark"] .announcement-toast[data-priority="urgent"] {
  border-left-color: #ef4444;
}

/* ─── Mobile ──────────────────────────────────────── */
@media (max-width: 600px) {
  .announcement-toast {
    width: calc(100% - 32px);
    right: 16px;
    left: 16px;
    bottom: 16px;
    border-radius: 14px;
  }
}
