/* Tamakkin Footer + Mobile Drawer Polish V2
   Scope: footer layout + mobile drawer only. No data or route changes. */

/* ---------- Footer ---------- */
.tmk-footer-polished {
  background:
    radial-gradient(circle at 90% 10%, rgba(16, 185, 129, .09), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(245,250,248,.98)) !important;
  border-top: 1px solid rgba(15, 53, 42, .10) !important;
  color: #243d36 !important;
}

html[data-theme="dark"] .tmk-footer-polished,
body.dark .tmk-footer-polished {
  background:
    radial-gradient(circle at 90% 10%, rgba(134,239,172,.10), transparent 30%),
    linear-gradient(180deg, #0b1f1a, #071a16) !important;
  border-top-color: rgba(226,244,236,.12) !important;
  color: rgba(238,245,241,.9) !important;
}

.tmk-footer-polished .footer-grid {
  align-items: stretch !important;
  gap: 24px !important;
}

.tmk-footer-polished .footer-brand,
.tmk-footer-polished .footer-column {
  min-height: 210px !important;
  border-radius: 26px !important;
  background: rgba(255,255,255,.74) !important;
  border: 1px solid rgba(15,53,42,.10) !important;
  box-shadow: 0 18px 48px rgba(18, 49, 39, .07) !important;
}

html[data-theme="dark"] .tmk-footer-polished .footer-brand,
html[data-theme="dark"] .tmk-footer-polished .footer-column,
body.dark .tmk-footer-polished .footer-brand,
body.dark .tmk-footer-polished .footer-column {
  background: rgba(15, 35, 30, .72) !important;
  border-color: rgba(226,244,236,.12) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.20) !important;
}

.footer-platform-desc {
  margin: 14px 0 10px !important;
  max-width: 360px !important;
  color: #4c625b !important;
  font-size: 14px !important;
  line-height: 1.9 !important;
  font-weight: 650 !important;
}

.footer-brand-tagline {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  background: rgba(15, 123, 95, .10) !important;
  color: #0f7b5f !important;
  border: 1px solid rgba(15, 123, 95, .16) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

html[data-theme="dark"] .footer-platform-desc,
body.dark .footer-platform-desc {
  color: rgba(238,245,241,.78) !important;
}

html[data-theme="dark"] .footer-brand-tagline,
body.dark .footer-brand-tagline {
  background: rgba(134,239,172,.12) !important;
  color: #86efac !important;
  border-color: rgba(134,239,172,.20) !important;
}

.footer-meta-row {
  margin-top: 22px !important;
  padding-top: 18px !important;
  border-top: 1px solid rgba(15,53,42,.10) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  color: #4c625b !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  line-height: 1.8 !important;
}

.footer-meta-row span:first-child {
  color: #0f7b5f !important;
  background: rgba(15,123,95,.08) !important;
  border: 1px solid rgba(15,123,95,.14) !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
}

html[data-theme="dark"] .footer-meta-row,
body.dark .footer-meta-row {
  border-top-color: rgba(226,244,236,.12) !important;
  color: rgba(238,245,241,.72) !important;
}

html[data-theme="dark"] .footer-meta-row span:first-child,
body.dark .footer-meta-row span:first-child {
  color: #86efac !important;
  background: rgba(134,239,172,.10) !important;
  border-color: rgba(134,239,172,.18) !important;
}

.footer-credit-card,
.footer-school,
.school-name,
.footer-school,
.school-label {
  display: none !important;
}

/* ---------- Mobile Drawer ---------- */
@media (max-width: 860px) {
  .nav-drawer.tmk-mobile-sheet {
    position: fixed !important;
    inset: 92px 14px auto 14px !important;
    max-height: calc(100dvh - 120px) !important;
    overflow: auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.98);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }

  .nav-drawer.tmk-mobile-sheet.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .drawer-panel {
    border-radius: 30px !important;
    padding: 18px !important;
    background: rgba(255,255,255,.94) !important;
    border: 1px solid rgba(15,53,42,.12) !important;
    box-shadow: 0 26px 80px rgba(15,23,42,.18) !important;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
  }

  html[data-theme="dark"] .drawer-panel,
  body.dark .drawer-panel {
    background: rgba(10, 33, 27, .94) !important;
    border-color: rgba(226,244,236,.14) !important;
    box-shadow: 0 26px 80px rgba(0,0,0,.36) !important;
  }

  .drawer-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 4px 4px 14px !important;
    border-bottom: 1px solid rgba(15,53,42,.10) !important;
    margin-bottom: 14px !important;
  }

  .drawer-head strong {
    display: block !important;
    color: #10251f !important;
    font-size: 18px !important;
    font-weight: 950 !important;
  }

  .drawer-head span {
    display: block !important;
    color: #63766f !important;
    font-size: 12.5px !important;
    margin-top: 3px !important;
    font-weight: 750 !important;
  }

  .drawer-close {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(15,53,42,.12) !important;
    background: #fff !important;
    color: #10251f !important;
    font-size: 24px !important;
    line-height: 1 !important;
  }

  .drawer-section {
    display: grid !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .drawer-section-title {
    color: #0f7b5f !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    margin: 2px 4px 4px !important;
  }

  .nav-drawer.tmk-mobile-sheet a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 48px !important;
    padding: 12px 14px !important;
    border-radius: 18px !important;
    background: rgba(247,250,248,.86) !important;
    border: 1px solid rgba(15,53,42,.08) !important;
    color: #172b24 !important;
    font-size: 15.5px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
  }

  .nav-drawer.tmk-mobile-sheet a::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(15,123,95,.26);
  }

  .nav-drawer.tmk-mobile-sheet a.is-active,
  .nav-drawer.tmk-mobile-sheet a:hover {
    background: rgba(15,123,95,.10) !important;
    color: #0f7b5f !important;
    border-color: rgba(15,123,95,.18) !important;
  }

  .nav-drawer.tmk-mobile-sheet .nav-drawer-cta {
    justify-content: center !important;
    min-height: 54px !important;
    margin-top: 6px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #0f8a64, #16a34a) !important;
    border-color: transparent !important;
    box-shadow: 0 18px 40px rgba(15,123,95,.24) !important;
  }

  .nav-drawer.tmk-mobile-sheet .nav-drawer-cta::before {
    display: none !important;
  }

  html[data-theme="dark"] .drawer-head,
  body.dark .drawer-head {
    border-bottom-color: rgba(226,244,236,.12) !important;
  }

  html[data-theme="dark"] .drawer-head strong,
  body.dark .drawer-head strong,
  html[data-theme="dark"] .drawer-close,
  body.dark .drawer-close {
    color: #f8fafc !important;
  }

  html[data-theme="dark"] .drawer-head span,
  body.dark .drawer-head span {
    color: rgba(238,245,241,.72) !important;
  }

  html[data-theme="dark"] .drawer-close,
  body.dark .drawer-close {
    background: rgba(255,255,255,.06) !important;
    border-color: rgba(226,244,236,.14) !important;
  }

  html[data-theme="dark"] .nav-drawer.tmk-mobile-sheet a,
  body.dark .nav-drawer.tmk-mobile-sheet a {
    background: rgba(255,255,255,.055) !important;
    border-color: rgba(226,244,236,.10) !important;
    color: rgba(248,250,252,.92) !important;
  }

  html[data-theme="dark"] .drawer-section-title,
  body.dark .drawer-section-title {
    color: #86efac !important;
  }
}

@media (max-width: 640px) {
  .tmk-footer-polished .footer-grid {
    grid-template-columns: 1fr !important;
  }

  .tmk-footer-polished .footer-brand,
  .tmk-footer-polished .footer-column {
    min-height: auto !important;
  }

  .footer-meta-row {
    align-items: stretch !important;
  }

  .footer-meta-row span {
    width: 100% !important;
  }
}

/* iOS Safari AI Assistant Zoom Fix */
.ai-assistant input,
.ai-assistant textarea,
.ai-chat-input,
.ai-assistant-panel textarea,
.ai-widget-panel textarea {
  font-size: 16px !important;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .ai-assistant-panel,
  .ai-chat-panel,
  .ai-widget-panel {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: auto !important;
    transform: none !important;
    overflow-x: hidden !important;
  }

  .ai-assistant-panel * {
    max-width: 100%;
    box-sizing: border-box;
  }
}
