/* ============================
   Base CSS (layout + behavior)
   Visual tokens are read via CSS vars with safe fallbacks.
   Gutters remain black here (not themable).
   ============================ */

/* Start of Main Theme Layout for Template */

body {
  margin: 0;
  padding: 0;
  background: #000;                 /* gutters always black */
  color: var(--text, #fff);         /* themable text color */
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
}

/* Default: scrolling allowed */
body.yes { overflow-y: auto; }

/* Disable all scrolling when $pageScroll = 'no' */
body.no { overflow: hidden; }

/* Safety guard: sidebars/gutters are always black, regardless of theme */
body[class*="theme-"] { background: #000 !important; }


#page-wrapper {
  width: 100%;
  max-width: 420px;
  min-height: 100svh;
  /* background-image: url('/assets/img/tourist.png'); */
  display: flex;
  flex-direction: column;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background: var(--panel-bg, #111); /* themable panel surface */
}

#header-section {
  text-align: center;
  padding: 6px;
  /* background: #111; */
}

.page-heading {
  font-size: 1.8rem;
  margin: 0;
}

.page-tagline {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 6px;
  margin-bottom: 0px;
  padding-bottom: 0px;
}

.page-name{
  padding: 0px;
  margin: 0px;
  margin-right: 140px;
  margin-top: 10px;
  font-size: .9rem;
  color: #666;
  text-align: left;
  padding-left: 5%;
}

.brand-image {
  height: 28px;
  background-image: var(--brand-image, url('/assets/img/plane-white.png'));
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0px;
  padding: 0px;
  width: 90%;
  margin-left: 20px;
  border: #fff solid 0px;
}

#main-content {
  flex: 1;
  padding: 20px;
  margin-top: 0px;
  /* background: #111; */
  border: #fff solid 0px; /* set to 0px off */
  overflow-y: auto;
}

body.no #main-content { overflow-y: hidden; }

.button.profile-button {
  padding-top: 6px;
  padding-bottom: 6px;
}

.button.more-vspace { margin-top: 0px; }

/* End of Main Theme Layout for Template */



#spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.2); /* subtle dim effect */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none; /* hidden by default */
}

#spinner-overlay img {
  width: 120px;
  height: 120px;
  animation: spin 2.5s linear infinite;
}

/* Show & center the #rotate-lock container */
#rotate-lock { display: none; }

body.landscape-lock #rotate-lock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #000;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

body.landscape-lock #rotate-lock img {
  width: 100px;
  height: auto;
  margin: 0;
}

body.landscape-lock #rotate-lock p {
  color: #fff;
  font-size: 1.3rem;
  margin: 8px 0 0 0;
  text-align: center;
  max-width: 90%;
  line-height: 1.4;
}

/* Remove ALL old pseudo-element tricks */
body.landscape-lock::before,
body.landscape-lock::after {
  content: none;
  display: none;
}

.rotate { animation: spin 5.0s linear infinite; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* FX overlay vignette and flash */

#vignette-overlay,
#flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#vignette-overlay {
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
  transition: opacity 0.12s ease;
}

#flash-overlay {
  background-color: rgba(255, 255, 255, 0.6);
  transition: opacity 0.12s ease;
}

/* button style */

.button, a.button, .socialbutton  {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 60%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px 16px;
  border: 1px solid var(--button-border, #fff);
  background-color: var(--button-bg, #333);
  color: var(--button-text, #fff);
  font-size: 1rem;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.button:hover,
.socialbutton:hover {
  background-color: var(--button-hover, #444);
  transform: scale(1.02);
}

.button:active,
.socialbutton:active {
  background-color: var(--button-active, #222);
  transform: scale(0.98);
}

.button .icon {
  width: 20px;
  height: 20px;
}

.profile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.profile-label { font-weight: normal; }

.username-label {
  font-size: 0.75rem;
  opacity: 0.75;
}

/* Sign-in form buttons and layout */
.signin-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.signin-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 68%;
  margin: 0 auto;
}

.signin-input-wrapper input {
  padding: 8px;
  border: 1px solid var(--input-border, #fff);
  background: var(--input-bg, #222);
  color: var(--input-text, #fff);
  border-radius: 4px;
  font-size: .8rem;
  width: 94%;
}

.signin-input-wrapper input::placeholder { color: #aaa; }

.forgot-password-container {
  text-align: right;
  line-height: 0; /* smaller than default 1.5–1.6 */
  margin-top: 2px; /* small positive tweak instead of negative */
}

.forgot-password-link {
  color: #ccc;
  font-size: 0.7rem;
  text-decoration: none;
}

.forgot-password-link:hover { text-decoration: none; }

.socialbutton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 60%;
  max-width: 400px;
  margin: 0px auto;
  padding: 8px 16px;
  border: 1px solid var(--button-border, #fff);
  background-color: var(--button-bg, #333);
  color: var(--button-text, #fff);
  font-size: 1rem;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease;
  margin-top: 8px;
}

.socialbutton.last { margin-bottom: 20px; }

/* Spacer line */
.buttonspacer {
  display: block;
  text-align: center;
  color: #999;
  margin: 0px auto 0px auto;
  font-size: 0.9rem;
}

/* Message page style */
.message-box {
  position: relative;
  max-width: 90%;
  margin: 20px auto;
  background: rgba(102, 102, 102, 0.5);
  padding: 20px 70px 20px 20px; /* extra right padding for icon space */
  border-radius: 10px;
  box-sizing: border-box;
}

.message-box .main-message {
  margin: 0 0 10px 0;
  color: #fff;
}

.message-box .main-message-heading {
  margin: 0 0 10px 0;
  color: #fff;
  font-size: 0.8rem;
}

.message-box .note-status {
  display: inline-block;
  background: #28a745;
  color: white;
  padding: 8px 18px;
  border-radius: 9px;
  margin-top: 0px;
  margin-bottom: 20px;
}

.message-box .edit-note-icon {
  position: absolute;
  bottom: 25px;
  right: 15px;
  width: 50px;
}

.message-box .edit-note-icon img {
  display: block;
  width: 100%;
  height: auto;
}

@media (hover: none) and (pointer: coarse) {
  .camera-icon { display: inline-block; }
}

.button-with-icon { display: flex; align-items: center; }

.icon-camera {
  width: 40px;
  height: auto;
  margin-left: 0px;
  cursor: pointer;
}

.icon-camera:hover { filter: brightness(1.2); }

/* picture locations */
.slot {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  width: 70%;
}

.slot .icons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-right: 20px;
}

.slot img {
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.slot .trash { margin-left: 20px; }

/* Adds breathing room below the header */
.slot:first-child { margin-top: 00px; }

/* Optional: slightly smaller preview boxes to balance spacing */
.slot .preview {
  width: 120px;
  height: 120px;
  border: 2px solid #333;
  background: #eee;
  object-fit: cover;
}

/* Optional: slightly smaller icons for better balance */
.slot img { width: 36px; height: 36px; }

.slots-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center; /* This centers everything horizontally */
  gap: 8pxx;
  padding: 6px;
  box-sizing: border-box;
}

.preview.empty {
  background: rgba(0, 0, 0, 0.25);
  border: 2px dashed #848484;
  border-radius: 8px;
  height: 120px;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: normal;
  color: #8a8a8a;
  text-align: center;
  padding: 0px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.search-input-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.search-input-wrapper label {
  display: block;
  margin-bottom: -14px;
  font-weight: normal;
  font-size: .9rem;
  margin-bottom: 4px;
}

.search-input-wrapper input[type="date"] {
  margin-bottom: 26px;
  padding: 6px;
  font-size: .8rem;
  width: 66%;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.search-input-wrapper .button { margin-top: 0px; }

/* Recap page */
body.content-page {
  background: #121212 !important;
  color: #e0e0e0 !important;
}

.recap-gallery-range,
.recap-section-header,
.recap-note,
.recap-section-location,
.recap-section-date-time {
  color: #ffffff !important;
}

.recap-image {
  border: 2px solid #2a2a2a !important;
  border-radius: 6px;
}

.recap-gallery-range {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  margin: 20px 0;
  color: #ffffff;
}

.recap-section-header {
  background-color: #1e1e1e;
  padding: 10px 15px;
  border-radius: 8px;
  margin: 20px auto 10px auto;
  max-width: 700px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  color: #ffffff;
  border-left: 23px solid #444 !important;
}

.recap-section-date-time {
  font-size: 0.8rem;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recap-time { margin-right: 2px; }

.recap-section-location {
  font-size: 1.0rem;
  font-weight: normal;
  color: #ffffff;
  width: 86%;
}

/* Adjust address size under location name */
.recap-section-location {
  font-size: 0.85em;     /* slightly smaller than normal text */
  opacity: 0.9;          /* light visual de-emphasis */
  line-height: 1.3em;    /* keeps spacing neat */
}

.recap-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: left;
  padding: 10px;
  background: none !important;
  padding-left: 8%;
}

.recap-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 5px rgba(255,255,255,0.1);
  text-align: center;
}

.recap-image {
  width: 100px;
  height: auto;
  display: block;
  border: 2px solid #2a2a2a;
  border-radius: 6px;
}

.recap-note {
  color: #ccc;
  padding: 6px 15px;
  margin: 0px auto 20px auto;
  max-width: 700px;
  border-radius: 4px;
  line-height: 1.3;
  background-color: #111;
  margin-bottom: 35px;
  font-size: .85rem;
}

.recap-item img { border: 2px solid #444 !important; }

.header-icon { filter: invert(100%) !important; }

.recap-wrapper { border: #fff solid 0px; }

.recap-privacy {
  font-size: .7rem;
  color: #acacac;
}

/* Lightbox overlay styles */
#lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

#lightbox-close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2em;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
}

.camera-button { margin: 0px; padding: 0px; }

/* ===== Inline/Icon classes (use themable images) ===== */
.icon-home      { background-image: var(--icon-home, url('/assets/icons/home-white.svg')); }
.icon-profile   { background-image: var(--icon-profile, url('/assets/icons/profile-white.svg')); }
.icon-login     { background-image: var(--icon-login, url('/assets/icons/login-white.svg')); }
.icon-location  { background-image: var(--icon-location, url('/assets/icons/location-white.svg')); }
.icon-search    { background-image: var(--icon-search, url('/assets/icons/search-white.svg')); }
.icon-register  { background-image: var(--icon-register, url('/assets/icons/register-white.svg')); }
.icon-google    { background-image: var(--icon-google, url('/assets/icons/google-white.svg')); }
.icon-facebook  { background-image: var(--icon-facebook, url('/assets/icons/facebook-white.svg')); }
.icon-twitter   { background-image: var(--icon-twitter, url('/assets/icons/twitter-white.svg')); }
.icon-share     { background-image: var(--icon-share, url('/assets/icons/share-white.svg')); }
.icon-camera    { background-image: var(--icon-camera, url('/assets/icons/camera.svg')); }
.icon-gallery   { background-image: var(--icon-gallery, url('/assets/icons/gallery-white.svg')); }
.icon-trash     { background-image: var(--icon-trash, url('/assets/icons/trash-white.svg')); }
.icon-signout   { background-image: var(--icon-signout, url('/assets/icons/signout-white.svg')); }
.icon-ranking   { background-image: var(--icon-ranking, url('/assets/icons/signout-white.svg')); }

.icon-home,
.icon-profile,
.icon-login,
.icon-location,
.icon-search,
.icon-register,
.icon-google,
.icon-facebook,
.icon-twitter,
.icon-share,
.icon-camera,
.icon-gallery,
.icon-trash,
.icon-signout,
.icon-ranking {
  display: inline-block;
  width: 18px; /* camera/gallery/trash override later */
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
  margin-right: 0px;
}

/* Camera/Gallery/Trash larger overrides kept */
.icon-camera,
.icon-gallery,
.icon-trash {
  width: 40px;
  height: 40px;
}

/* ===== Top bar layout ===== */
#top-bar {
  display: flex;
  align-items: center;
  padding: 4px 8px;
}
#top-bar .home-icon { margin-right: auto; } /* pushes the right icon group to the edge */

.right-icons {
  display: flex;
  align-items: center;
}
/* Apply spacing ONLY when a sibling follows (so ? hugs the edge when alone) */
.right-icons > * + * { margin-left: 10px; }

/* ===== Icon containers (preserve your sizes) ===== */
.home-icon,
.profile-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}

.home-icon a,
.profile-icon a {
  display: block;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: brightness(40%);
}

/* Header images via vars with fallbacks */
.home-icon a    { background-image: var(--header-home, url('/assets/icons/home-white.svg')); }
.profile-icon a { background-image: var(--header-profile, url('/assets/icons/profile-white.svg')); }

/* ===== About icon — keep the working visual nudge ===== */
.about-icon {
  width: 16px;
  height: 16px;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-icon a {
  width: 16px;
  height: 16px;
  background: var(--header-about, url('/assets/icons/question-mark-white.svg')) no-repeat center;
  background-size: contain;
  filter: brightness(40%);
}

/* Your original later override (preserve) */
.profile-icon a,
.login-icon a {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* ===== Utilities that adapt to theme colors ===== */

/* Lightweight text style for paragraphs, small notes, etc. */
.default-text-style {
  font-size: 0.9em;
  color: var(--muted-text);
  text-decoration: none;
}

/* Links inside the default-text area follow the same tone */
.default-text-style a {
  font-size: 0.8em;               /* matches your original */
  color: var(--muted-text);
  text-decoration: none;
}

/* Small inline “pill” buttons like the Profile page “edit” links */
.default-text-style-button {
  display: inline-block;           /* so padding/border render nicely inline */
  font-size: 0.8em;
  color: var(--muted-text);
  text-decoration: none;
  border: 1px solid var(--muted-text);
  border-radius: 6px;
  padding: 1px 8px;                /* same vertical/horizontal as before */
  line-height: 1.2;                /* keeps it tidy with small fonts */
}

/* Optional hover focus affordances (same color, just underline) */
.default-text-style-button:hover,
.default-text-style a:hover {
  text-decoration: none;
}

/* text link with minimal style */
.default-text-style-link {
  font-size: 0.85rem;
  color: #999 !important;          /* enforce gray */
  text-decoration: none !important; /* remove underline */
}

.default-text-style-link:visited {
  color: #999 !important;          /* keep same gray after visit */
  text-decoration: none !important;
}

.default-text-style-link:hover,
.default-text-style-link:focus,
.default-text-style-link:active {
  color: #ccc !important;          /* lighter gray on hover/focus */
  text-decoration: none !important;
}

#top-bar { position: relative; } /* keep your existing layout; just enables absolute child */

#utc-clock {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0; bottom: 0;               /* vertically center within the bar */
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;             /* avoid intercepting nav taps */
  font-size: 0.82em;                /* smaller */
  color: #aaa;                      /* subtle gray */
  white-space: nowrap;              /* prevent wrap */
  font-weight: 400;
}

a.default-text-style-link:hover,
a.default-text-style-link:focus {
  color: #ccc !important;
}

.legal-links { text-decoration: none !important; text-align: center;}
.legal-links * { text-decoration: none !important;  text-align: center;}


/* inline consent row */
.legal-consent-row {
  margin: 14px 0 0px 0;
  text-align: left;
  white-space: nowrap;              /* keep on one line */
}

.legal-consent-row label, .legal-consent-row label a{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;               /* small, like forgot-password */
  color: #ccc;
  white-space: nowrap;              /* prevent wrapping inside */
}

.legal-consent-row input[type="checkbox"] {
  margin: 0;
  width: 12px;                      /* smaller box */
  height: 12px;
}

/* Zulu recap */
.recap-time {
  white-space: nowrap;
}

.recap-zulu {
  opacity: 0.85;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.recap-privacy .cred-dot { vertical-align: middle; margin-left: 4px; }

.cred-dot {
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  margin-left:6px;
  vertical-align:middle;
  border-radius: 999px;
}

.cred-green { background: #008136; }
.cred-yellow { background: #ffcc00; }
.cred-red { background: #ff0000; }

/* you already had this, keep it */
.recap-privacy .cred-dot {
  vertical-align: middle;
  margin-left: 4px;
}

.dot-key {
  text-align: center;
  font-size: 0.9em;
  color: #ccc;
  margin-top: 0px;
  margin-bottom: 13px;
}

