/* ============================================================================
   BASE LAYOUT INVARIANTS
   Applies to ALL breakpoints
   No geometry decisions here
   ============================================================================ */

:root {
  --header-height: 3.5rem;
  --header-height-real: 92px;
  /* measured mobile header height */
  --sidebar-height-mobile: 13rem;
  --sidebar-width: 18rem;
  --content-width: 42%;
  --panel-opacity: 0.9;
  --panel-bg: rgba(247, 247, 247, var(--panel-opacity));
  --app-horizontal-padding: 1rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: system-ui, sans-serif;
}

.layout {
  height: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

/* Subtle app fade during auth transitions */
.app-transition {
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}

.layout {
  opacity: 1;
  transition: opacity 200ms ease-out;
}

/* ---------- Header appearance (no geometry) ---------- */

.site-header {
  background: var(--panel-bg);
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 1rem;
}

.header-inner {
  display: flex;
  gap: 0.5rem;
}

.site-title {
  margin: 0;
  font-size: 1.1rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ---------- Shared structural identities ---------- */

.site-main {
  position: relative;
}

.sidebar {
  display: none;
}

.map-container {
  z-index: 1;
}

#map {
  width: 100%;
  height: 100%;
}

/* ---------- Shared search input styling ---------- */
.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: white;
  min-height: 44px;
  padding-right: 2rem;
}

.search-clear {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  display: none;
}

.search-container.has-value .search-clear {
  display: block;
}

/* ---------- Context menu styling ---------- */
.context-menu {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.25rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 2000;
}

.context-menu button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  text-align: left;
}

.context-menu button:hover {
  background: #f2f2f2;
}



/* ---------- Shared colors etc ---------- */
.sidebar,
.content {
  background: var(--panel-bg);
  backdrop-filter: blur(15px);
}



/* ---------- Shared headlines, lists, etc ---------- */
h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  color: #222;
}

.content h2 {
  margin-top: 0;
}

h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
  color: #222;
}

.content h3 {
  margin-top: 1rem;
}

.campsite-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.campsite-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

.campsite-list li:last-child {
  border-bottom: none;
}


/* ---------- Shared button styles ---------- */
button {
  font: inherit;
}

.btn {
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  align-self: flex-start;
}

.btn-primary {
  border: 1px solid transparent;
  background: #0066cc;
  color: white;
}

.btn-primary:hover {
  background: #005bb5;
}

.btn-primary:active {
  background: #004c99;
}

.btn-cancel {
  border: 1px solid #bbb;
  background: transparent;
  color: #555;
}

.btn-cancel:hover {
  background: #f2f2f2;
  border-color: #999;
}

.btn-cancel:active {
  background: #e6e6e6;
}


/* adding the password show/hide button */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding-right: 2.4rem; /* space for eye button */
}

.password-toggle {
  position: absolute;
  right: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;

  font-size: 1.1rem;
  line-height: 1;
  padding: 0.3rem;

  color: #555;
}

.password-toggle:hover {
  color: #000;
}

.password-toggle:focus {
  outline: none;
}

.password-toggle img {
  width: 20px;
  height: 20px;
  filter: invert(45%) sepia(0%) saturate(0%) brightness(85%);
}




/* ===================ADMIN PANEL============================ */

.admin-section {
  margin-top: 1rem;
}

.admin-section label {
  display: block;
  margin-bottom: 0.5rem;
}

.admin-section input {
  width: 100%;
  margin-top: 0.25rem;
}
