/**
 * TFM Footer — "Map of the Kingdom"
 * /wp-content/themes/blocksy-child/css/tfm-footer.css
 *
 * Elementor Theme Builder footer "TFM Footer". Structure (CSS classes set
 * in Elementor under Advanced → CSS Classes):
 *
 *   .tfm-footer                 outer container (full width)
 *     .tfm-footer-map           brand + four area columns
 *       .tfm-footer-brand       Site Logo, heading .tfm-footer-name,
 *                               text .tfm-footer-claim, button .tfm-footer-more,
 *                               button .tfm-footer-more.tfm-footer-new (Tavern Bar)
 *       .tfm-footer-area        one per area, plus .is-village / .is-academy /
 *                               .is-square / .is-training for the colour;
 *                               heading .tfm-footer-area-title (linked),
 *                               text .tfm-footer-area-word, Icon List
 *                               .tfm-footer-links (no icons)
 *     .tfm-footer-notes         three text widgets .tfm-footer-note
 *                               ("<b>18+</b> <strong>Adults only.</strong> …")
 *     .tfm-footer-bottom        Icon List .tfm-footer-legal (inline),
 *                               text .tfm-footer-time, text .tfm-footer-copy
 *
 * .tfm-footer-member hides a widget for visitors who are not logged in.
 * Only the area colours of the four columns are fixed (they always show all
 * four areas); the line on top follows the current area (--area-accent).
 */

/* ============================================================
   1. FRAME
   ============================================================ */

.e-con.tfm-footer {
  --tfm-f-village: #d4a840;  --tfm-f-village-soft: #e8c97a;
  --tfm-f-academy: #5ab87a;  --tfm-f-academy-soft: #a5e8b8;
  --tfm-f-square: #40d9b0;   --tfm-f-square-soft: #80e8cc;
  --tfm-f-training: #cc3355; --tfm-f-training-soft: #e06080;
  position: relative;
  gap: 0 !important;
  padding: 0 28px !important;
  background: #09060c !important;
  color: var(--body-text, #e4ddf0);
}
/* thin line on top in the colour of the current area */
.e-con.tfm-footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--area-accent, #9b6bd8), transparent);
  opacity: 0.7;
}
.tfm-footer > .e-con,
.tfm-footer > .e-con-inner > .e-con {
  width: 100% !important;
  max-width: 1160px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.tfm-footer a {
  text-decoration: none !important;
}
/* left-aligned at every width (site-wide mobile rules centre widgets) */
.tfm-footer .e-con {
  align-items: flex-start !important;
}
.tfm-footer .elementor-widget,
.tfm-footer .elementor-heading-title {
  text-align: left !important;
}

/* ============================================================
   2. MAP — brand + four areas
   ============================================================ */

.e-con.tfm-footer-map {
  display: grid !important;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 32px !important;
  padding: 58px 0 40px !important;
}
.tfm-footer-map > .e-con {
  width: 100% !important;
  min-width: 0;
  padding: 0 !important;
}
.tfm-footer-map .elementor-element {
  width: 100% !important;
}

/* brand */
.e-con.tfm-footer-brand {
  gap: 0 !important;
}
.tfm-footer-brand .tfm-footer-logo {
  width: 48px !important;
  margin-bottom: 8px !important;
}
.tfm-footer-brand .tfm-footer-logo img {
  display: block;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(196, 122, 232, 0.45);
}
.tfm-footer-name,
.tfm-footer-name * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-footer-claim {
  max-width: 270px;
  margin-top: 12px !important;
}
.tfm-footer-claim,
.tfm-footer-claim * {
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: 1.08rem !important;
  line-height: 1.5 !important;
  color: var(--body-text, #e4ddf0) !important;
}
.tfm-footer-claim p {
  margin: 0 !important;
}
.tfm-footer-more {
  margin-top: 10px !important;
}
.tfm-footer-more .elementor-button {
  display: inline-flex !important;
  align-items: center;
  min-height: 44px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-footer-more .elementor-button:hover {
  color: var(--ink, #f6f1ea) !important;
}
/* second link under "About the Kingdom": the Welcome Tavern Bar, in Village gold */
.tfm-footer-more.tfm-footer-new {
  margin-top: 0 !important;
}
.tfm-footer-new .elementor-button {
  color: var(--tfm-f-village-soft) !important;
}

/* area columns */
.tfm-footer-area.is-village  { --c: var(--tfm-f-village);  --c-soft: var(--tfm-f-village-soft); }
.tfm-footer-area.is-academy  { --c: var(--tfm-f-academy);  --c-soft: var(--tfm-f-academy-soft); }
.tfm-footer-area.is-square   { --c: var(--tfm-f-square);   --c-soft: var(--tfm-f-square-soft); }
.tfm-footer-area.is-training { --c: var(--tfm-f-training); --c-soft: var(--tfm-f-training-soft); }
.e-con.tfm-footer-area {
  position: relative;
  gap: 0 !important;
  padding-top: 16px !important;
}
.tfm-footer-area-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
}
.tfm-footer-area-title,
.tfm-footer-area-title * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.18rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  color: var(--ink, #f6f1ea) !important;
  transition: color 0.25s ease;
}
.tfm-footer-area-title a:hover {
  color: var(--c-soft) !important;
}
.tfm-footer-area-word,
.tfm-footer-area-word * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: var(--c-soft) !important;
  margin: 0 !important;
}
.tfm-footer-area-word {
  margin: 2px 0 8px !important;
}

/* link lists (Icon List widget without icons) */
.tfm-footer-links .elementor-icon-list-item {
  margin: 0 !important;
  padding: 0 !important;
}
.tfm-footer-links .elementor-icon-list-item a {
  display: inline-block;
  padding: 5px 0;
  transition: padding 0.25s ease;
}
.tfm-footer-links .elementor-icon-list-icon {
  display: none !important;
}
.tfm-footer-links .elementor-icon-list-text {
  padding: 0 !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.86rem !important;
  color: var(--body-text, #e4ddf0) !important;
  transition: color 0.25s ease;
}
.tfm-footer-area .tfm-footer-links a:hover {
  padding-left: 4px;
}
.tfm-footer-area .tfm-footer-links a:hover .elementor-icon-list-text {
  color: var(--c-soft) !important;
}
.tfm-footer-links a:focus-visible,
.tfm-footer-area-title a:focus-visible,
.tfm-footer-more .elementor-button:focus-visible {
  outline: 2px solid var(--muted, #b6afc7);
  outline-offset: 3px;
}

/* only for signed-in users ("Your file") */
body:not(.logged-in):not(.elementor-editor-active) .tfm-footer-member {
  display: none !important;
}

/* ============================================================
   3. NOTES — 18+, not therapy, your choice
   ============================================================ */

.e-con.tfm-footer-notes {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 10px 34px !important;
  padding: 16px 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.tfm-footer-notes > .elementor-element {
  width: auto !important;
  flex: 0 1 auto !important;
}
.tfm-footer-note,
.tfm-footer-note * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.76rem !important;
  line-height: 1.5 !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-footer-note p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
}
.tfm-footer-note strong {
  color: var(--ink, #f6f1ea) !important;
  font-weight: 500 !important;
}
/* the badge: first <b> in the text */
.tfm-footer-note b {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  color: var(--ink, #f6f1ea) !important;
}

/* ============================================================
   4. BOTTOM ROW — legal, time of day, copyright
   ============================================================ */

.e-con.tfm-footer-bottom {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px 24px !important;
  padding: 18px 0 24px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.tfm-footer-bottom > .elementor-element {
  width: auto !important;
  flex: 0 1 auto !important;
}
/* Elementor's inline list pulls itself 8px outwards; not needed with gap */
.tfm-footer-legal .elementor-icon-list-items {
  display: flex !important;
  flex-wrap: wrap;
  gap: 2px 20px;
  margin: 0 !important;
}
.tfm-footer-legal .elementor-icon-list-item {
  margin: 0 !important;
  padding: 0 !important;
}
.tfm-footer-legal .elementor-icon-list-item::after {
  display: none !important;
}
.tfm-footer-legal .elementor-icon-list-text,
.tfm-footer-time,
.tfm-footer-time *,
.tfm-footer-copy,
.tfm-footer-copy * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.74rem !important;
  color: var(--muted, #b6afc7) !important;
  margin: 0 !important;
}
.tfm-footer-legal a:hover .elementor-icon-list-text {
  color: var(--ink, #f6f1ea) !important;
}
.tfm-footer-time p {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
/* sun/moon, inserted by tfm-footer.js; the global JS sets body.tfm-time-* */
.tfm-footer-sun {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #f8e8a0 60%, #e0b850);
  box-shadow: 0 0 12px rgba(248, 232, 160, 0.7);
}
body.tfm-time-sunrise .tfm-footer-sun {
  background: radial-gradient(circle at 35% 35%, #fff8e0, #f0b880 60%, #d07070);
  box-shadow: 0 0 10px rgba(240, 184, 128, 0.6);
}
body.tfm-time-sunset .tfm-footer-sun {
  background: radial-gradient(circle at 35% 35%, #fff4d0, #e8a050 60%, #a04030);
  box-shadow: 0 0 10px rgba(232, 160, 80, 0.6);
}
body.tfm-time-night .tfm-footer-sun {
  background: radial-gradient(circle at 65% 35%, transparent 0 38%, #e8e0f0 40%);
  box-shadow: 0 0 10px rgba(232, 224, 240, 0.4);
}

/* ============================================================
   5. RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .e-con.tfm-footer-map {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 24px !important;
  }
  .e-con.tfm-footer-brand {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 4px 14px !important;
  }
  .tfm-footer-brand > .elementor-element {
    width: auto !important;
    margin: 0 !important;
  }
  .tfm-footer-brand .tfm-footer-claim {
    max-width: 420px;
    margin-left: 10px !important;
  }
  .tfm-footer-brand .tfm-footer-more {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .e-con.tfm-footer {
    padding: 0 20px !important;
  }
  .e-con.tfm-footer-map {
    grid-template-columns: 1fr 1fr;
    gap: 28px 18px !important;
    padding: 44px 0 32px !important;
  }
  .e-con.tfm-footer-brand {
    display: flex !important;
    gap: 0 !important;
  }
  .tfm-footer-brand .tfm-footer-claim {
    margin: 12px 0 0 !important;
  }
  .tfm-footer-links .elementor-icon-list-item a {
    padding: 8px 0;
  }
  .e-con.tfm-footer-notes {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .e-con.tfm-footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  .tfm-footer-legal .elementor-icon-list-item a {
    display: inline-block;
    padding: 6px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tfm-footer-links .elementor-icon-list-item a,
  .tfm-footer-links .elementor-icon-list-text,
  .tfm-footer-area-title * {
    transition: none !important;
  }
}
