/* ==============================================
   MIND MASTERS LABS — SHARED STYLES
   Common styles loaded by all public pages
   ============================================== */

/* ── CSS Custom Properties ── */
:root {
  --blue: #61AEDB;
  --yellow: #F3BE33;
  --ink: #0f172a;
  --slate: #334155;
  --muted: #64748b;
  --bg: #ffffff;
  --card: #ffffff;
  --line: #e6eef7;
  --radius: 18px;
  --shadow: 0 12px 30px rgba(10,44,63,.12);
  --shadowSoft: 0 10px 24px rgba(10,44,63,.08);

  /* Footer shading */
  --navDark1: #1b2f5b;
  --navDark2: #16264a;

  /* Status colors */
  --danger: #b91c1c;
  --ok: #166534;
  --warn: #92400e;

  /* Flip-note highlight */
  --flipNoteBg: rgba(97,174,219,.16);
  --flipNoteBorder: rgba(97,174,219,.30);
}

/* ── Base Reset ── */
* { box-sizing: border-box }
body {
  margin: 0;
  font-family: Barlow, system-ui, sans-serif;
  color: var(--ink);
  background: #ffffff;
  font-weight: 400;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit }
.container { width: min(1120px, 92vw); margin: auto }

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
.nav {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav .container-shift {
  position: relative;
  left: -20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.brand img {
  width: 61px;
  height: 61px;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  padding: 0;
  border: 0;
  box-shadow: none;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
  position: relative;
  left: 0px;
}
.nav-link {
  color: var(--slate);
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 600;
}
.nav-link i { font-size: 20px; }
.ic-home    { color: var(--blue); }
.ic-focus   { color: #22c55e; }
.ic-calm    { color: #a855f7; }
.ic-support { color: var(--yellow); }
.nav-link:hover {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadowSoft);
}
.post-login-nav .nav-link.active {
  border-color: rgba(97,174,219,.35);
  background: rgba(97,174,219,.10);
  box-shadow: var(--shadowSoft);
  position: relative;
}
.post-login-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 3px;
  border-radius: 999px;
  background: var(--yellow);
  opacity: .95;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

/* ── Buttons ── */
.btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
}
.btn .login-ic { color: var(--blue); }
.btn-outline-blue {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}
.btn-outline-blue .login-ic { color: var(--blue); }
#authBtn    { min-width: 140px; height: 44px; justify-content: center; }
#signOutBtn { min-width: 140px; height: 44px; justify-content: center; }
@keyframes mml-auth-spin { to { transform: rotate(360deg); } }
.auth-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--blue, #61AEDB);
  border-top-color: transparent;
  border-radius: 50%;
  animation: mml-auth-spin .65s linear infinite;
}

/* ── Floating Tabs ── */
.dashboard-tab {
  position: fixed;
  right: 0;
  top: 46%;
  z-index: 60;
  display: none;
}
.dashboard-tab a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(135deg, var(--yellow), #e2aa1f);
  color: var(--ink);
  border: 1px solid rgba(243,190,51,.55);
  box-shadow: 0 14px 28px rgba(10,44,63,.18);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: .2px;
  font-weight: 700;
  opacity: .98;
  transform: translateX(10px);
  transition: transform .2s ease, opacity .2s ease;
}
.dashboard-tab a:hover { transform: translateX(2px); opacity: 1; }

.signup-float {
  position: fixed;
  right: 0;
  top: 56%;
  z-index: 60;
  display: none;
}
.signup-float a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(135deg, var(--blue), #4a94c0);
  color: #fff;
  border: 1px solid rgba(97,174,219,.55);
  box-shadow: 0 14px 28px rgba(10,44,63,.18);
  font-weight: 700;
  letter-spacing: .2px;
  transform: translateX(10px);
  transition: transform .2s ease, opacity .2s ease;
  opacity: .98;
}
.signup-float a:hover { transform: translateX(2px); opacity: 1; }
.signup-float .tab-emoji { font-size: 18px; line-height: 1; }
.signup-float .tab-text  { font-size: 16px; }

/* ── Mobile Hamburger Menu ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 101;
}
.hamburger span {
  width: 30px;
  height: 3px;
  background-color: var(--slate);
  border-radius: 2px;
  transition: 0.3s;
}
.mobile-menu {
  position: fixed;
  top: 82px;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 15px;
  z-index: 99;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  max-height: calc(100vh - 82px);
  overflow-y: auto;
}
.mobile-menu.active { display: flex; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  font-size: 18px;
  font-weight: 600;
  color: var(--slate);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
.mobile-nav-link:hover { background: rgba(97,174,219,.10); }
.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.mobile-actions .btn {
  width: 100%;
  justify-content: center;
  font-size: 18px;
}

/* ── Footer ── */
footer {
  background: linear-gradient(180deg, var(--navDark1), var(--navDark2));
  color: #eaf3ff;
  padding: 56px 0;
  margin-top: 40px;
}
footer a { color: #eaf3ff; opacity: .92; font-weight: 500; }
footer a:hover { opacity: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr;
  gap: 28px;
  align-items: start;
}
.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foot-brand .tagline {
  color: #d2e3f5;
  font-size: 20px;
  font-weight: 600;
}
.foot-brand .copy {
  color: #d2e3f5;
  font-size: 18px;
  font-weight: 400;
}
.foot-col h4 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
}
.foot-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 18px;
  font-weight: 500;
}
.contact-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  font-weight: 600;
  color: #f5faff;
  max-width: 520px;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-pill:hover { background: rgba(255,255,255,.2); }
.contact-pill span { opacity: .98; }
.contact-pill i { color: #f0f8ff; }

/* ── Contact Modal (index, sign-in, support, profile) ── */
.contact-modal {
  background: white;
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}
.modal-header h3 {
  margin: 0;
  font-size: 24px;
  color: var(--ink);
  font-weight: 700;
}
.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-modal:hover { background: rgba(0,0,0,0.05); }
.modal-body { padding: 24px; }
.form-control {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: Barlow, sans-serif;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(97,174,219,0.2);
}
.form-control::placeholder { color: var(--muted); }
textarea.form-control { min-height: 120px; resize: vertical; }
.submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--blue), #4a94c0);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: Barlow, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 8px 20px rgba(97,174,219,.3);
}
.submit-btn:hover  { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(97,174,219,.4); }
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.status-line {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
  min-height: 20px;
}
.success-message { display: none; text-align: center; padding: 40px 24px; }
.success-message.active { display: block; }
.success-icon { font-size: 48px; color: #22c55e; margin-bottom: 20px; }
.success-message h4 { font-size: 24px; margin: 0 0 12px; color: var(--ink); font-weight: 700; }
.success-message p  { color: var(--slate); line-height: 1.6; font-size: 16px; margin: 0; }
.form-fields { display: block; }
.form-fields.hidden { display: none; }

/* ── Ask a Question Modal (about-us, privacy, terms, post-log-in-header, sign-up) ── */
.modal {
  width: min(720px, 92vw);
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(230,238,247,.9);
  box-shadow: 0 24px 60px rgba(2,10,24,.35);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px;
  background: linear-gradient(180deg, rgba(97,174,219,.14), rgba(97,174,219,.06));
  border-bottom: 1px solid rgba(97,174,219,.22);
}
.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -.2px;
}
.modal-title i { color: var(--yellow); }
.modal-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(230,238,247,.9);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.btn-send {
  padding: 12px 16px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, var(--blue), #4a94c0);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadowSoft);
}
.btn-send i { color: #fff; }
.btn-send[disabled] { opacity: .75; cursor: not-allowed; filter: saturate(.75); }
.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 400;
}
.hp-wrap {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links   { display: none; }
  .hamburger   { display: flex; }
}
@media (max-width: 640px) {
  .brand     { font-size: 20px; }
  .brand img { width: 50px; height: 50px; }
  .nav       { height: 70px; }
  .mobile-menu {
    top: 70px;
    max-height: calc(100vh - 70px);
  }
  #publicHeader .nav-actions { display: none; }
  .nav .container-shift { left: 0px; }
}
@media (max-width: 480px) {
  .container    { width: 92vw; }
  .btn          { font-size: 16px; padding: 10px 16px; }
  .modal-header { padding: 20px; }
  .modal-body   { padding: 20px; }
  .form-control { padding: 12px; }
}
