/*
 * MCI Footer Styles — Mind Companion Institute
 * Scoped to .mci-footer-* and .mci-modal-* classes. No global resets.
 * Replaces Tailwind CDN classes from components/footer.html
 */

/* ─── Interest Modal Overlay ────────────────────────────────────────────── */
.mci-interest-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: none; /* toggled via JS */
  overflow-y: auto;
  padding: 1rem;
  align-items: center;
  justify-content: center;
}

.mci-interest-modal.mci-modal-open {
  display: flex;
}

.mci-modal-box {
  position: relative;
  background-color: #0e1b33;
  color: #fff;
  border-radius: 1rem;
  max-width: 42rem;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: auto;
}

@media (min-width: 640px) {
  .mci-modal-box {
    padding: 2.5rem;
  }
}

.mci-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  padding: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.mci-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.mci-modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.mci-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(201, 162, 75, 0.4);
  background: rgba(201, 162, 75, 0.1);
  padding: 0.25rem 0.75rem;
  margin-bottom: 1.5rem;
}

.mci-modal-badge-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: #c9a24b;
  animation: mciPing 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes mciPing {
  75%, 100% { transform: scale(1.8); opacity: 0; }
}

.mci-modal-badge-text {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #c9a24b;
}

.mci-modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .mci-modal-title { font-size: 1.875rem; }
}

.mci-modal-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Modal Form */
.mci-modal-form .mci-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .mci-modal-form .mci-modal-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.mci-modal-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.mci-modal-input,
.mci-modal-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.mci-modal-input:focus,
.mci-modal-select:focus {
  border-color: #c9a24b;
}

.mci-modal-select {
  background-color: #1a2942;
}

.mci-modal-select option {
  background-color: #1a2942;
  color: #fff;
}

.mci-modal-submit {
  display: block;
  width: 100%;
  padding: 0.875rem;
  border-radius: 0.5rem;
  background-color: #c9a24b;
  color: #0e1b33;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: 0 4px 14px rgba(201, 162, 75, 0.35);
  margin-top: 0.5rem;
}

.mci-modal-submit:hover {
  background-color: #b08a35;
}

.mci-modal-fine {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin-top: 0.75rem;
}

.mci-modal-field {
  margin-bottom: 1rem;
}

/* Success State */
.mci-modal-success {
  display: none;
  text-align: center;
  padding: 2rem 0;
}

.mci-modal-success.mci-visible {
  display: block;
}

.mci-success-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.mci-success-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mci-success-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.mci-success-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ─── Main Footer ───────────────────────────────────────────────────────── */
.mci-footer {
  background-color: #0a1428;
  padding-top: 5rem;
  padding-bottom: 2rem;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mci-footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.mci-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 3rem;
}

@media (min-width: 640px) {
  .mci-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .mci-footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Column 1 — Brand */
.mci-footer-brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

.mci-footer-brand-name span {
  color: #c9a24b;
}

.mci-footer-brand-desc {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
}

.mci-footer-brand-cpd {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.35);
}

.mci-footer-email {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.mci-footer-email:hover {
  color: #fff;
}

/* Columns 2-4 — Navigation */
.mci-footer-col-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
}

.mci-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.mci-footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.mci-footer-col ul li a:hover {
  color: #fff;
}

/* Copyright bar */
.mci-footer-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 2rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
}

@media (min-width: 640px) {
  .mci-footer-copy {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.mci-footer-copy p {
  margin: 0;
}

/* ─── Floating CPD Widget ───────────────────────────────────────────────── */
.mci-cpd-widget {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 9000;
  display: flex;
  align-items: center;
}

@media print {
  .mci-cpd-widget { display: none; }
}

.mci-cpd-badge-btn {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.mci-cpd-badge-btn:hover {
  opacity: 1;
}

.mci-cpd-badge-btn img {
  height: 72px;
  width: 72px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(26, 41, 66, 0.25));
  display: block;
}

.mci-cpd-ticker-panel {
  overflow: hidden;
  border-radius: 0 9999px 9999px 0;
  border: 1px solid rgba(26, 41, 66, 0.1);
  border-left: none;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(26, 41, 66, 0.14);
  padding: 0.75rem 0;
  margin-left: -1.25rem;

  /* collapsed by default; JS toggles max-width */
  max-width: 0;
  transition: max-width 0.5s ease;
}

.mci-cpd-widget.mci-cpd-open .mci-cpd-ticker-panel {
  max-width: 320px;
}

.mci-cpd-ticker-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a2942;
  white-space: nowrap;
  animation: mciMarquee 12s linear infinite;
  padding: 0 1rem;
}

@keyframes mciMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Floating WhatsApp Widget ──────────────────────────────────────────── */
.mci-whatsapp-widget {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9000;
  display: flex;
  align-items: center;
}

@media print {
  .mci-whatsapp-widget { display: none; }
}

.mci-whatsapp-widget a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.mci-whatsapp-label {
  border-radius: 9999px 0 0 9999px;
  border: 1px solid rgba(26, 41, 66, 0.1);
  border-right: none;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(26, 41, 66, 0.14);
  padding: 0.625rem 1.25rem 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a2942;
  white-space: nowrap;

  /* hidden by default; shown on hover */
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  padding-left: 0;
  padding-right: 0;
}

.mci-whatsapp-widget:hover .mci-whatsapp-label {
  max-width: 220px;
  opacity: 1;
  padding-left: 1rem;
  padding-right: 1.25rem;
}

.mci-whatsapp-circle {
  position: relative;
  margin-left: -0.875rem;
  display: flex;
  height: 3.75rem;
  width: 3.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #25D366;
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.3s ease;
}

.mci-whatsapp-widget:hover .mci-whatsapp-circle {
  transform: scale(1.05);
}

.mci-whatsapp-circle svg {
  width: 1.75rem;
  height: 1.75rem;
}

/* Social icons (brand column) */
.mci-footer-social { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1.25rem; }
.mci-social-link { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.75); text-decoration: none; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s; }
.mci-social-link svg { width: 1.0625rem; height: 1.0625rem; }
.mci-social-link:hover, .mci-social-link:focus-visible { background: #c9a24b; border-color: #c9a24b; color: #0e1b33; transform: translateY(-2px); }

/* ─── Floating widgets: tidy look (v1.0.21) ─────────────────────────────── */
/* The badge sits on a white disc at full opacity, so page text no longer shows through it. */
.mci-cpd-badge-btn { opacity: 1; background: #fff; box-shadow: 0 6px 18px rgba(26, 41, 66, 0.18); }
.mci-cpd-badge-btn img { width: 64px; height: 64px; padding: 4px; filter: none; }
.mci-cpd-ticker-panel { align-self: center; }
.mci-cpd-widget, .mci-whatsapp-widget { bottom: 1.25rem; }
.mci-whatsapp-circle { height: 3.5rem; width: 3.5rem; }

/* Phones: smaller, the same size, and level with each other. */
@media (max-width: 767px) {
  .mci-cpd-widget { left: 0.875rem; bottom: 0.875rem; }
  .mci-whatsapp-widget { right: 0.875rem; bottom: 0.875rem; }
  .mci-cpd-badge-btn img { width: 48px; height: 48px; padding: 3px; }
  .mci-whatsapp-circle { height: 3rem; width: 3rem; margin-left: 0; box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4); }
  .mci-whatsapp-circle svg { width: 1.5rem; height: 1.5rem; }
  .mci-whatsapp-label { display: none; }               /* no hover on phones */
  .mci-cpd-widget.mci-cpd-open .mci-cpd-ticker-panel { max-width: calc(100vw - 9rem); }
  .mci-cpd-ticker-panel { margin-left: -0.75rem; padding: 0.5rem 0; }
  .mci-cpd-ticker-track { font-size: 0.6875rem; }
  /* Room at the very bottom so the buttons never cover the copyright line. */
  .mci-footer { padding-bottom: 4.5rem; }
}

/* "Cookie settings" link in the copyright bar. */
.mci-footer-cookie-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mci-footer-cookie-link:hover { color: #d4a853; }
