/* ============================================================
   ClientX Notifications – Client Area Styles v2.0
   ============================================================ */

/* ── Banner Container ────────────────────────────────────── */
#cxn-banners-container {
  width: 100%;
}

/* ── Shared link style ───────────────────────────────────── */
.cxn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: underline;
  white-space: nowrap;
  margin-left: 6px;
  transition: opacity .2s;
}
.cxn-link:hover { opacity: .75; }
.cxn-link-info    { color: #1a6fa8; }
.cxn-link-success { color: #1a7a40; }
.cxn-link-warning { color: #8a6d00; }
.cxn-link-danger  { color: #922b21; }

/* ── Alert Bar ───────────────────────────────────────────── */
.cxn-alert-bar {
  width: 100%;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,.07);
  position: relative;
  animation: cxnSlideDown .4s ease;
}
@keyframes cxnSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.cxn-alert-bar.cxn-info    { background: #e8f4fd; color: #1a6fa8; border-left: 5px solid #2196F3; }
.cxn-alert-bar.cxn-success { background: #eafaf1; color: #1a7a40; border-left: 5px solid #27ae60; }
.cxn-alert-bar.cxn-warning { background: #fef9e7; color: #8a6d00; border-left: 5px solid #f39c12; }
.cxn-alert-bar.cxn-danger  { background: #fceaeb; color: #922b21; border-left: 5px solid #e74c3c; }

.cxn-alert-icon { font-size: 17px; flex-shrink: 0; }
.cxn-alert-text { flex: 1; }

/* ── Marquee Scroller ────────────────────────────────────── */
.cxn-marquee-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,.07);
  padding: 0;
  position: relative;
  overflow: hidden;
}
.cxn-marquee-wrap.cxn-info    { background: #e8f4fd; color: #1a6fa8; }
.cxn-marquee-wrap.cxn-success { background: #eafaf1; color: #1a7a40; }
.cxn-marquee-wrap.cxn-warning { background: #fef9e7; color: #8a6d00; }
.cxn-marquee-wrap.cxn-danger  { background: #fceaeb; color: #922b21; }

.cxn-marquee-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}
.cxn-marquee-badge.cxn-info    { background: #2196F3; color: #fff; }
.cxn-marquee-badge.cxn-success { background: #27ae60; color: #fff; }
.cxn-marquee-badge.cxn-warning { background: #f39c12; color: #fff; }
.cxn-marquee-badge.cxn-danger  { background: #e74c3c; color: #fff; }

/*
  The outer div clips the scrolling content.
  The track holds TWO identical spans side-by-side (each 50% of the total width).
  Animating translateX from 0 → -50% scrolls one full copy off the left
  while the second copy perfectly replaces it — creating a seamless infinite loop.
  JS measures actual content pixel width and sets duration = width / 80 px/s.
*/
.cxn-marquee-outer {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  /* Height set by JS to match span height */
}
.cxn-marquee-track {
  /* Animation driven entirely by JS rAF – no CSS keyframes needed */
  position: relative;
  overflow: hidden;
}
.cxn-marquee-content {
  /* Positioned absolutely by JS */
  display: block;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.cxn-marquee-dismiss-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 0 12px;
  opacity: .5;
  color: inherit;
  z-index: 2;
}
.cxn-marquee-dismiss-btn:hover { opacity: 1; }

/* ── Shared dismiss button ───────────────────────────────── */
.cxn-dismiss-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  opacity: .55;
  color: inherit;
  transition: opacity .2s;
  flex-shrink: 0;
}
.cxn-dismiss-btn:hover { opacity: 1; }

/* ── Popup Modal ─────────────────────────────────────────── */
.cxn-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cxnFadeIn .3s ease;
}
@keyframes cxnFadeIn { from { opacity:0; } to { opacity:1; } }

.cxn-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  max-width: 480px;
  width: 90%;
  overflow: hidden;
  animation: cxnPopUp .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes cxnPopUp {
  from { transform: scale(.7); opacity:0; }
  to   { transform: scale(1);  opacity:1; }
}

.cxn-modal-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cxn-modal-header.cxn-info    { background: #2196F3; color: #fff; }
.cxn-modal-header.cxn-success { background: #27ae60; color: #fff; }
.cxn-modal-header.cxn-warning { background: #f39c12; color: #fff; }
.cxn-modal-header.cxn-danger  { background: #e74c3c; color: #fff; }

.cxn-modal-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.cxn-modal-close {
  background: rgba(255,255,255,.2);
  border: none; cursor: pointer;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 18px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.cxn-modal-close:hover { background: rgba(255,255,255,.35); }
.cxn-modal-body   { padding: 22px 20px; font-size: 15px; line-height: 1.6; color: #333; }
.cxn-modal-footer {
  padding: 14px 20px;
  background: #f8f9fa;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.cxn-popup-link { margin-right: auto; }

.cxn-btn-dismiss {
  padding: 8px 22px;
  border-radius: 6px;
  font-size: 14px;
  border: none; cursor: pointer;
  font-weight: 600;
  transition: filter .2s;
}
.cxn-btn-dismiss:hover { filter: brightness(.9); }
.cxn-btn-info    { background: #2196F3; color: #fff; }
.cxn-btn-success { background: #27ae60; color: #fff; }
.cxn-btn-warning { background: #f39c12; color: #fff; }
.cxn-btn-danger  { background: #e74c3c; color: #fff; }
