/**
 * SAMP v4.10.135 — Trial evaluation notice and intellectual-property footer.
 * Presentation-only layer. No API, authentication, database, report, scouting,
 * control, distribution, shelter or map business logic is changed.
 */

:root {
  --samp-trial-banner-height: 28px;
  /* The public header height includes the trial banner so every existing modal,
     sticky filter and map offset keeps using one canonical top boundary. */
  --portal-header-height: 152px;
}

.trial-version-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 12000;
  box-sizing: border-box;
  width: 100%;
  height: var(--samp-trial-banner-height);
  min-height: var(--samp-trial-banner-height);
  padding: 4px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border-bottom: 1px solid #d9a62f;
  background: linear-gradient(90deg, #fff6dc, #f5d889, #fff6dc);
  color: #5e4308;
  box-shadow: 0 1px 5px rgba(77, 56, 10, .12);
  direction: rtl;
  text-align: center;
  font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  line-height: 1;
}

.trial-version-banner .trial-version-icon {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
}

.trial-version-banner strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trial-version-banner small {
  flex: 0 0 auto;
  padding-inline-start: 7px;
  border-inline-start: 1px solid rgba(94, 67, 8, .28);
  color: #70520d;
  font: 700 9px/1.2 Arial, sans-serif;
  letter-spacing: .15px;
  white-space: nowrap;
}

/* Keep the one global trial banner above the login shell without covering it. */
body.auth-locked #platform-login-screen {
  inset: var(--samp-trial-banner-height) 0 0 0 !important;
}

/* The municipal header starts immediately below the banner. Its own brand/nav
   height stays unchanged; --portal-header-height now represents banner+header. */
body:not(.auth-locked) .sidebar {
  inset: var(--samp-trial-banner-height) 0 auto 0 !important;
  height: calc(var(--portal-header-height) - var(--samp-trial-banner-height)) !important;
  min-height: calc(var(--portal-header-height) - var(--samp-trial-banner-height)) !important;
}

body:not(.auth-locked) main,
body:not(.auth-locked).command-center-active main,
html[dir="ltr"] body:not(.auth-locked) main,
html[dir="ltr"] body:not(.auth-locked).command-center-active main {
  padding-top: var(--portal-header-height) !important;
  padding-bottom: 0 !important;
}

/* The requested IP notice is a real document-flow footer, not a fixed overlay. */
body:not(.auth-locked) .platform-footer {
  position: static !important;
  inset: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: auto !important;
  box-sizing: border-box !important;
  width: calc(100% - (var(--portal-page-pad) * 2)) !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 60px !important;
  max-height: none !important;
  margin: auto var(--portal-page-pad) 10px !important;
  padding: 10px 16px !important;
  display: block !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 5px !important;
  background: linear-gradient(90deg, var(--portal-green-950), var(--portal-green-800)) !important;
  color: #fff !important;
  transform: none !important;
  transform-origin: initial !important;
  box-shadow: 0 4px 14px rgba(6, 75, 63, .12) !important;
  direction: rtl;
  text-align: center;
}

.ip-footer-full {
  display: grid;
  justify-items: center;
  gap: 4px;
  max-width: 1320px;
  margin: 0 auto;
}

.ip-footer-full strong {
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.45;
}

.ip-footer-full span {
  max-width: 1180px;
  color: rgba(255,255,255,.88);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.65;
}

.ip-footer-full small {
  color: rgba(255,255,255,.72);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.4;
}

.ip-footer-mobile {
  display: none;
}

@media (max-width: 1250px) {
  :root { --portal-header-height: 144px; }
}

@media (max-width: 900px) {
  :root { --portal-header-height: 136px; }
}

@media (max-width: 680px) {
  :root {
    --samp-trial-banner-height: 26px;
    --portal-header-height: 128px;
  }

  .trial-version-banner {
    padding-inline: 8px;
    gap: 5px;
  }

  .trial-version-banner strong {
    font-size: 9px;
  }

  .trial-version-banner small {
    display: none;
  }

  body:not(.auth-locked) .platform-footer {
    width: calc(100% - 16px) !important;
    min-height: 50px !important;
    margin: auto 8px 8px !important;
    padding: 9px 10px !important;
  }

  .ip-footer-full {
    display: none;
  }

  .ip-footer-mobile {
    display: grid;
    justify-items: center;
    gap: 5px;
  }

  .ip-footer-mobile > strong {
    color: #fff;
    font-size: 8.5px;
    font-weight: 800;
    line-height: 1.55;
  }

  .ip-footer-mobile details {
    width: min(100%, 520px);
    color: rgba(255,255,255,.86);
    font-size: 8px;
    line-height: 1.55;
  }

  .ip-footer-mobile summary {
    width: max-content;
    margin: 0 auto;
    cursor: pointer;
    color: #f1d78e;
    font-weight: 700;
    list-style-position: inside;
  }

  .ip-footer-mobile details span,
  .ip-footer-mobile details small {
    display: block;
    margin-top: 5px;
  }
}

@media print {
  .trial-version-banner,
  body:not(.auth-locked) .platform-footer {
    display: none !important;
  }

  body:not(.auth-locked) main,
  body:not(.auth-locked).command-center-active main {
    padding-top: 0 !important;
  }
}
