/* ==========================================================================
   Thermal Theme (Django-friendly)
   File: static/css/thermal.css
   ========================================================================== */

:root{
  --bg: #05070c;
  --panel: rgba(10, 16, 32, 0.72);
  --text: #eef2ff;
  --text-2: rgba(238, 242, 255, 0.78);
  --muted: rgba(238, 242, 255, 0.58);
  --border: rgba(255,255,255,0.10);

  --hot: #ffb300;
  --hot-2: #ff5a1f;
  --hot-3: #ff2a2a;
  --cool: #2bd0ff;
  --cool-2: #2a6bff;

  --glow-hot: 0 0 18px rgba(255, 179, 0, 0.35), 0 0 40px rgba(255, 90, 31, 0.18);
  --glow-cool: 0 0 18px rgba(43, 208, 255, 0.25), 0 0 44px rgba(42, 107, 255, 0.12);
  --shadow: 0 16px 40px rgba(0,0,0,0.55);
  --radius: 18px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --container: 1120px;

  /* Header lock-in */
  --header-min-h-desktop: 260px;
  --header-min-h-mobile: 210px;

  --coyote-h-desktop: 150px;
  --coyote-h-mobile: 120px;

  --logo-h-desktop: 118px;
  --logo-h-mobile: 92px;

  --logo-gap: 0px;

  --pad-left-desktop: 8px;
  --pad-left-mobile: 6px;

  --pad-right-desktop: 12px;
  --pad-right-mobile: 8px;
}

/* ---------- Global ---------- */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(42,107,255,0.10), transparent 55%),
    radial-gradient(900px 500px at 70% 20%, rgba(255,90,31,0.10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #04050a 70%, #020309 100%);
}

.container{
  width: min(var(--container), calc(100% - 2rem));
  margin-inline:auto;
}
.stack{ display:flex; flex-direction:column; gap:1rem; }
.row{ display:flex; gap:1rem; flex-wrap:wrap; }
.center{ display:grid; place-items:center; }
.muted{ color: var(--muted); }

.thermal-text{
  background: linear-gradient(90deg, var(--hot-3), var(--hot), var(--cool), var(--cool-2));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
  text-shadow: 0 0 18px rgba(255, 90, 31, 0.18);
}

a{ color: var(--cool); text-decoration:none; }
a:hover{ color:#8be9ff; text-shadow: var(--glow-cool); }

h1,h2,h3{ margin:0 0 .5rem 0; }
h1{ font-size: clamp(1.8rem, 2.6vw, 2.5rem); }
h2{ font-size: clamp(1.3rem, 2.0vw, 2.0rem); }
p{ margin:0 0 1rem 0; color: var(--text-2); line-height:1.7; }

/* ---------- Header / Navbar ---------- */
.navbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);

  /* CLEAN: image only, no dark overlay */
  background:
    url("/static/img/header/header_scene.webp") center center / cover no-repeat;

  border-bottom:1px solid var(--border);
}
.navbar .inner{
  position: relative;
  min-height: var(--header-min-h-desktop);
  padding: .5rem 0 1rem;
}

/* Bottom-left: coyote + logo */
.header-bottom-left{
  position: absolute;
  left: 0;
  bottom: 0;
  padding-left: var(--pad-left-desktop);
}

.coyote-wrap{
  position: relative;
  display: flex;
  align-items: flex-end;
}

.coyote-img{
  height: var(--coyote-h-desktop);
  width: auto;
  object-fit: contain;
  display: block;
}

/* Ensure the logo link is always clickable */
.logo-link{
  display: inline-block;
  line-height: 0;
  pointer-events: auto;
}

/* Make the image clickable */
.coyote-logo{
  position: absolute;
  left: 50%;
  bottom: calc(var(--coyote-h-desktop) + var(--logo-gap));
  transform: translateX(-50%);
  height: var(--logo-h-desktop);
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 14px rgba(255,140,0,.35));
  pointer-events: auto;
  cursor: pointer;
}

/* Bottom-right: carousel */
.header-carousel{
  position: absolute;
  right: var(--pad-right-desktop);
  bottom: 0;
  padding-bottom: 6px;
}

/* Carousel */
.therm-carousel{
  position: relative;
  width: 65px;
  height: 55px;
  background: transparent;
}
.therm-carousel img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: thermFade 52s linear infinite;
}
.therm-carousel img:nth-child(1)  { animation-delay: 0s; }
.therm-carousel img:nth-child(2)  { animation-delay: 4s; }
.therm-carousel img:nth-child(3)  { animation-delay: 8s; }
.therm-carousel img:nth-child(4)  { animation-delay: 12s; }
.therm-carousel img:nth-child(5)  { animation-delay: 16s; }
.therm-carousel img:nth-child(6)  { animation-delay: 20s; }
.therm-carousel img:nth-child(7)  { animation-delay: 24s; }
.therm-carousel img:nth-child(8)  { animation-delay: 28s; }
.therm-carousel img:nth-child(9)  { animation-delay: 32s; }
.therm-carousel img:nth-child(10) { animation-delay: 36s; }
.therm-carousel img:nth-child(11) { animation-delay: 40s; }
.therm-carousel img:nth-child(12) { animation-delay: 44s; }
.therm-carousel img:nth-child(13) { animation-delay: 48s; }

@keyframes thermFade{
  0%   { opacity: 0; }
  1.2% { opacity: 1; }
  5.2% { opacity: 1; }
  6.0% { opacity: 0; }
  100% { opacity: 0; }
}

/* Hamburger top-right */
.header-right{
  position: absolute;
  right: 0;
  top: 10px;
  display: flex;
  align-items: center;
}

/* Mobile dropdown */
.mobile-menu{
  position: absolute;
  right: 0;
  top: 62px;
  z-index: 60;
}
.mobile-menu-card{
  min-width: 220px;
  margin-right: 1rem;
}

/* ---------- Toast (Logout confirmation, etc.) ---------- */
/* FIX: make it fixed-position so it never reserves layout space */
.toast{
  position: fixed;
  left: 50%;
  top: calc(var(--header-min-h-desktop) + 12px);
  transform: translateX(-50%);
  z-index: 1000;

  padding: .85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,16,32,0.86);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  color: rgba(238,242,255,0.92);

  animation: toastFade 4.5s ease forwards;
}

@keyframes toastFade{
  0%   { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  10%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  80%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
}

/* ---------- Cards / Buttons / Forms ---------- */
.card{
  border-radius: var(--radius);
  background: var(--panel);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
}
.card-body{ padding:1.2rem; }

.hero-card{
  border-radius: calc(var(--radius) + 8px);
  background: var(--panel);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-card .content{ padding:1.6rem; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:.65rem 1rem;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.12);
  cursor:pointer;
  font-weight:700;
  letter-spacing:.2px;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }

/* ADD: normalize <button> and <a> rendering for .btn */
button.btn,
a.btn{
  font-size:14px;
  line-height:1.2;
  font-family: var(--font);
}

.btn-primary{
  color: #0b1020;
  background: linear-gradient(90deg, var(--hot), var(--hot-2));
  box-shadow: var(--glow-hot);
  border-color: rgba(255,179,0,0.35);
}
.btn-ghost{
  background: rgba(255,255,255,0.06);
  color: rgba(238,242,255,0.90);
}
.btn-ghost:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}

input, select, textarea{
  width:100%;
  padding:.7rem .85rem;
  border-radius:14px;
  background: rgba(0,0,0,0.35);
  border:1px solid var(--border);
  color: var(--text);
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(43,208,255,0.45);
  box-shadow: 0 0 0 3px rgba(43,208,255,0.14);
  outline:none;
}
label{
  display:block;
  margin-bottom:.35rem;
  font-weight:600;
}

.errorlist{
  list-style:none;
  padding:0;
  margin:.5rem 0;
}
.errorlist li{
  padding:.35rem .6rem;
  border-radius:12px;
  background: rgba(255,42,42,0.14);
  border:1px solid rgba(255,42,42,0.35);
}

.footer{
  margin-top:3rem;
  padding:2rem 0;
  border-top:1px solid var(--border);
  background: rgba(0,0,0,0.25);
}

/* ---------- Meta (Listings / Properties consistency) ---------- */
/* Base: label/value on one line (prevents "Status" stacking above "Active") */
.meta-grid{ display:flex; flex-direction:column; gap: 4px; }
.meta-row{ display:flex; gap:10px; align-items:flex-start; }
.meta-k{
  width: 190px;
  min-width: 190px;
  font-weight: 650;
  color: rgba(255,255,255,0.84);
}
.meta-v{
  color: rgba(255,255,255,0.74);
  font-style: italic;
  min-width: 0;
  flex: 1;
}

/* Opt-in: allow stacked meta only when explicitly needed */
.meta-stack .meta-row{ flex-direction:column; gap:2px; }
.meta-stack .meta-k{ width:auto; min-width: 0; }

/* Opt-in: tighter meta (useful beside images) */
.meta-tight .meta-k{ width: 140px; min-width: 140px; }

/* ---------- Responsive ---------- */
@media (max-width:820px){
  /* Mobile: reduce side gutters so cards use the screen */
  .container{
    width: min(var(--container), calc(100% - 0.75rem));
  }

  .navbar .inner{
    min-height: var(--header-min-h-mobile);
    padding-bottom: .9rem;
  }

  .header-bottom-left{
    padding-left: var(--pad-left-mobile);
  }

  .coyote-img{
    height: var(--coyote-h-mobile);
  }

  .coyote-logo{
    height: var(--logo-h-mobile);
    bottom: calc(var(--coyote-h-mobile) + var(--logo-gap));
  }

  .header-carousel{
    right: var(--pad-right-mobile);
  }

  .therm-carousel{
    width: 55px;
    height: 48px;
  }

  .header-right{
    top: 8px;
  }
  .mobile-menu{
    top: 58px;
  }

  .toast{
    top: calc(var(--header-min-h-mobile) + 10px);
    left: 1rem;
    right: 1rem;
    width: auto;
    transform: none;
  }

  @keyframes toastFade{
    0%   { opacity: 0; transform: translateY(-6px); }
    10%  { opacity: 1; transform: translateY(0); }
    80%  { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-6px); }
  }
}

/* On very small screens, keep meta readable but still inline by default */
@media (max-width:560px){
  /* Even tighter gutters for phones */
  .container{
    width: min(var(--container), calc(100% - 0.5rem));
  }

  .meta-row{ flex-direction: row; gap:10px; }
  .meta-k{ width: 160px; min-width: 160px; }
}