/* ============================================================
   NCM Theme – News Popup Styles
   ============================================================ */

/* --- Body Scroll Lock --- */
body.popup-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px);
}

/* --- Overlay --- */
.news-popup-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.news-popup-overlay.active {
  display: flex;
  opacity: 1;
  animation: popupOverlayIn 0.3s ease forwards;
}

/* --- Popup Container --- */
.news-popup {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  opacity: 0;
  animation: popupCardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

/* --- Animations --- */
@keyframes popupOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popupCardIn {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes popupCardOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
}

/* --- Popup Header --- */
.news-popup-header {
  position: relative;
  background: linear-gradient(135deg, #0F2440 0%, #1B3A5C 100%);
  padding: 28px 28px 24px;
  color: var(--white);
  overflow: hidden;
}

/* Decorative circle */
.news-popup-header::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--gold);
  opacity: 0.12;
  pointer-events: none;
}

/* Secondary decorative circle */
.news-popup-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--orange);
  opacity: 0.08;
  pointer-events: none;
}

/* Popup icon (gold) */
.news-popup-header h3 span {
  color: #E8B84A;
  margin-right: 8px;
}

.news-popup-header h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 6px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-popup-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  position: relative;
  z-index: 1;
  line-height: 1.5;
}

/* --- Close Button --- */
.news-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 2;
}
.news-popup-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg) scale(1.1);
}

/* --- Popup Body --- */
.news-popup-body {
  padding: 24px 28px;
  overflow-y: auto;
  background: var(--white);
}

/* Custom scrollbar for popup body */
.news-popup-body::-webkit-scrollbar {
  width: 4px;
}
.news-popup-body::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 4px;
}
.news-popup-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.news-popup-body::-webkit-scrollbar-thumb:hover {
  background: var(--gray);
}

/* --- News Item --- */
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition);
}
.news-item:first-child {
  padding-top: 0;
}
.news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Gold dot bullet */
.news-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--gold);
  margin-top: 6px;
  box-shadow: 0 0 0 3px rgba(200, 150, 46, 0.15);
}

.news-item p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.news-item p strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-navy);
  margin-bottom: 3px;
  line-height: 1.4;
}

/* --- Popup Footer --- */
.news-popup-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.news-popup-footer a,
.news-popup-footer button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
}

/* Primary button (navy solid) */
.news-popup-footer .btn-navy,
.news-popup-footer a:first-child {
  background-color: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.news-popup-footer .btn-navy:hover,
.news-popup-footer a:first-child:hover {
  background-color: var(--dark-navy);
  border-color: var(--dark-navy);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Secondary button (navy outline) */
.news-popup-footer .btn-outline-navy,
.news-popup-footer a:last-child {
  background-color: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.news-popup-footer .btn-outline-navy:hover,
.news-popup-footer a:last-child:hover {
  background-color: var(--navy);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* When there is only one button */
.news-popup-footer a:only-child {
  flex: none;
  min-width: 200px;
  margin: 0 auto;
}

/* --- Popup Active State (JS toggle) --- */
.ncm-popup--active {
  display: flex !important;
}
