@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* ── Overlay: covers full screen, locks interaction ── */
#chari-popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 18, 50, 0.6);
}

#chari-popup-overlay.cp-visible {
  display: flex;
}

/* ── Card ── */
#chari-popup-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
  position: relative;
}

#chari-popup-card * {
  box-sizing: border-box;
}

/* ── Header ── */
.cp-header {
  background: linear-gradient(120deg, #1B2A6B 0%, #2E47A4 60%, #F4820A 100%);
  padding: 1.3rem 1.5rem 1rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cp-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-logo-c {
  font-size: 22px; font-weight: 600;
  color: #fff; line-height: 1;
}

.cp-logo-s {
  font-size: 7px; font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.1em; margin-top: 2px;
}

.cp-htext { flex: 1; }

.cp-hname {
  font-size: 18px; font-weight: 600;
  color: #fff; line-height: 1.2; margin: 0;
}

.cp-hname em { font-style: normal; color: #FDB96E; }

.cp-hmotto {
  font-size: 9.5px; color: rgba(255,255,255,0.65);
  letter-spacing: 0.13em; text-transform: uppercase; margin-top: 3px;
}

.cp-hloc {
  font-size: 9.5px; color: rgba(255,255,255,0.45); margin-top: 2px;
}

.cp-close {
  position: absolute; top: 10px; right: 12px;
  background: rgba(255,255,255,0.15);
  border: none; color: #fff;
  width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer;
  font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.cp-close:hover { background: rgba(255,255,255,0.3); }

/* ── Alert bar ── */
.cp-alert {
  background: #F4820A;
  padding: 0.42rem 1.4rem;
  display: flex; align-items: center; gap: 8px;
}

.cp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; flex-shrink: 0;
  animation: cpPulse 1.4s ease-in-out infinite;
}

@keyframes cpPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.6); }
}

.cp-alert span {
  font-size: 11px; font-weight: 500; color: #fff;
}

/* ── Tabs ── */
.cp-tabs {
  display: flex;
  border-bottom: 0.5px solid rgba(27,42,107,0.12);
  background: #f7f8fc;
  padding: 0 1.2rem;
  margin: 0;
}

.cp-tab {
  padding: 0.6rem 0.85rem;
  font-size: 11.5px; font-weight: 500;
  color: #888; cursor: pointer;
  border: none;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  transition: color 0.18s, border-color 0.18s;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}

.cp-tab:hover { color: #1B2A6B; }
.cp-tab-on   { color: #1B2A6B !important; border-bottom-color: #F4820A !important; }

/* ── Panels ── */
.cp-panel {
  display: block;
  padding: 1.2rem 1.4rem;
  min-height: 260px;
}

.cp-panel-hidden { display: none; }

/* ── Key Dates ── */
.cp-dates-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 12px;
}

.cp-dcard {
  border-radius: 12px; padding: 0.85rem 1rem;
  border: 0.5px solid rgba(27,42,107,0.12);
  position: relative; overflow: hidden;
  background: #fff;
}

.cp-dcard::before {
  content: ''; position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
}

.cp-dcard-a::before { background: #1B2A6B; }
.cp-dcard-b::before { background: #F4820A; }

.cp-dlabel {
  font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #999; margin-bottom: 5px;
}

.cp-dval { font-size: 16px; font-weight: 600; }
.cp-dval-navy   { color: #1B2A6B; }
.cp-dval-orange { color: #F4820A; }

.cp-dsub { font-size: 10px; color: #aaa; margin-top: 3px; }

/* ── Notice boxes ── */
.cp-nbox {
  border-radius: 0 10px 10px 0;
  padding: 0.75rem 1rem; margin-bottom: 10px;
}

.cp-nbox-blue   { background: #EEF1FB; border-left: 3px solid #1B2A6B; }
.cp-nbox-orange { background: #FEF3E6; border-left: 3px solid #F4820A; }

.cp-nlabel {
  font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 4px;
}

.cp-nlabel-blue   { color: #1B2A6B; }
.cp-nlabel-orange { color: #c06200; }

.cp-ntext { font-size: 12px; color: #333; line-height: 1.65; }

/* ── On Campus list ── */
.cp-hlist { list-style: none; margin: 0; padding: 0; }

.cp-hitem {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 0.5px solid rgba(27,42,107,0.08);
}

.cp-hitem:last-child { border-bottom: none; }

.cp-badge {
  flex-shrink: 0; padding: 2px 8px; border-radius: 20px;
  font-size: 9px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px;
}

.cp-badge-bl { background: #D4EDDA; color: #155724; }
.cp-badge-bs { background: #FEF3E6; color: #c06200; }
.cp-badge-bd { background: #EBEBEB; color: #555; }
.cp-badge-bp { background: #EEF1FB; color: #1B2A6B; }

.cp-htext-main { font-size: 12px; color: #333; line-height: 1.5; }
.cp-hdate      { font-size: 10px; color: #aaa; margin-top: 2px; }

/* ── Schedule ── */
.cp-erow {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 0.5px solid rgba(27,42,107,0.08);
}

.cp-erow:last-child { border-bottom: none; }

.cp-edatecol {
  text-align: center; min-width: 42px; flex-shrink: 0;
  background: #EEF1FB; border-radius: 10px;
  padding: 5px 4px 0; overflow: hidden;
}

.cp-eday   { font-size: 21px; font-weight: 600; color: #1B2A6B; line-height: 1; }
.cp-emonth {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em;
  color: #fff; font-weight: 600; background: #F4820A;
  margin: 4px -4px 0; padding: 2px 0;
  border-radius: 0 0 8px 8px;
}

.cp-einfo  { flex: 1; padding-top: 3px; }
.cp-ename  { font-size: 12.5px; font-weight: 500; color: #1B2A6B; }
.cp-edetail{ font-size: 10.5px; color: #aaa; margin-top: 2px; }

/* ── Read more links ── */
.cp-readmore {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px; font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid;
  padding-bottom: 1px;
  transition: color 0.18s, border-color 0.18s;
}

.cp-readmore-blue {
  color: #1B2A6B;
  border-bottom-color: rgba(27,42,107,0.3);
}

.cp-readmore-blue:hover {
  color: #F4820A;
  border-bottom-color: #F4820A;
}

.cp-readmore-orange {
  color: #c06200;
  border-bottom-color: rgba(192,98,0,0.3);
}

.cp-readmore-orange:hover {
  color: #F4820A;
  border-bottom-color: #F4820A;
}

/* ── Footer ── */
.cp-footer {
  background: #1B2A6B;
  padding: 0.7rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between;
}

.cp-footer span { font-size: 10px; color: rgba(255,255,255,0.45); }

.cp-footer a {
  font-size: 10.5px; color: #FDB96E;
  font-weight: 500; text-decoration: none;
}

.cp-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .cp-dates-grid { grid-template-columns: 1fr; }
  .cp-hname { font-size: 15px; }
  .cp-panel { padding: 1rem; }
  #chari-popup-card { border-radius: 14px; }
}
