/* ==========================================================
   WhoTaggedIt — Review Console Stylesheet (GPT-5-Nano Edition)
   ========================================================== */

body {
  background-color: #111;
  color: #eee;
  font-family: system-ui, sans-serif;
  margin: 0;
}

/* ==========================================================
   HEADER
   ========================================================== */

header {
  padding: 1rem;
  text-align: center;
  background-color: #222;
  border-bottom: 1px solid #333;
}
header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.filters,
.search-box {
  margin-top: 0.5rem;
}

.filters a {
  display: inline-block;
  margin: 0.2rem;
  padding: 0.5rem 1rem;
  border: 1px solid #444;
  border-radius: 4px;
  text-decoration: none;
  color: #eee;
  background-color: #1b1b1b;
}
.filters a.active {
  background-color: #444;
  font-weight: bold;
}

/* ==========================================================
   Compact Header: logo + title on one line
   ========================================================== */

.header-row {
  display: flex;
  justify-content: center;   /* center horizontally */
  align-items: center;       /* align vertically */
  gap: 1rem;
  margin-bottom: 0.8rem;     /* space above filters */
}

.header-logo {
  height: 80px;
  width: auto;
}

.header-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

/* ==========================================================
   Compact Inline Search Bar (Final)
   ========================================================== */

/* Keep row tight and centered */
.search-row {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  width: auto;              /* prevents full-width stretch */
  margin: 0 auto;           /* center the whole bar */
}

/* Compact input */
.search-input {
  width: 260px;             /* narrower and consistent */
  padding: 0.45rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #444;
  background: #222;
  color: #eee;
  display: inline-block;
  margin: 0;
  white-space: nowrap;
}

/* Compact button base */
.search-btn,
.adv-search-btn {
  white-space: nowrap;      /* forces single-line labels */
  padding: 0.45rem 0.8rem;  /* tighter width */
  font-size: 0.9rem;
  border: 1px solid #555;
  border-radius: 4px;
  background: #333;
  color: #eee;
  cursor: pointer;
  text-decoration: none;
}

/* Hover */
.search-btn:hover,
.adv-search-btn:hover {
  background: #444;
}

/* Spacing below the search bar */
.search-box {
  margin-bottom: 1rem;   /* adjust to taste */
}

/* Optional: shrink emoji spacing */
/*.search-btn, .adv-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}


/* ==========================================================
   SUMMARY BLOCK
   ========================================================== */

.summary {
  text-align: center;
  margin: 1rem 0;
  font-size: 0.95rem;
  color: #aaa;
  background: #1b1b1b;
  border: 1px solid #333;
  padding: 0.6rem;
  border-radius: 6px;
}

/* ==========================================================
   MAIN LAYOUT
   ========================================================== */

main {
  max-width: 1400px;
  margin: 1rem auto;
  padding: 1rem;
}
main,
main * {
  text-align: left !important;
}

/* ==========================================================
   RECORD BLOCKS
   ========================================================== */

.record {
  display: flex;
  flex-direction: row;
  background: #1a1a1a;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #333;
}

.left {
  flex: 0 0 40%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.left img:hover {
  transform: scale(1.03);
}

.right {
  flex: 1;
  padding-left: 1.2rem;
}

.filename {
  font-weight: bold;
  color: #66ccff;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Metadata box */
.meta {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #ccc;
  background: #151515;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #282828;
}

/* ==========================================================
   FORM ELEMENTS
   ========================================================== */

textarea,
select,
input[type="text"] {
  background: #222;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  width: 95%;
}

textarea {
  min-height: 4.5em;
  resize: vertical;
}

.caption-status {
  display: inline-block;
  margin-left: 0.4rem;
  color: #7fd47f;
  visibility: hidden;
}

button {
  background: #333;
  color: #eee;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  margin-top: 0.3rem;
  cursor: pointer;
}
button:hover {
  background: #444;
}

.status {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
.status span.ok {
  color: #7fd47f;
}
.status span.bad {
  color: #f76c6c;
}
.status span.warn {
  color: #e6b800;
}

/* ==========================================================
   PAGINATION
   ========================================================== */

.pagination {
  text-align: center;
  margin-top: 2rem;
}
.pagination a {
  display: inline-block;
  margin: 0 0.4rem;
  padding: 0.5rem 1rem;
  color: #eee;
  background: #222;
  border-radius: 4px;
  border: 1px solid #444;
  text-decoration: none;
}
.pagination a:hover {
  background: #333;
}

/* ==========================================================
   LIGHTBOX
   ========================================================== */

#lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
}

#lightbox img {
  max-width: 95%;
  max-height: 95%;
}

/* ==========================================================
   COMPACT LIMIT SELECTOR
   ========================================================== */

.limit-selector select {
  width: auto;
  min-width: 4em;
  display: inline-block;
  padding: 0.25rem 0.5rem;
}
.limit-selector {
  display: inline-block;
  margin-left: 1em;
}

/* ==========================================================
   STATS PAGE CHART LAYOUT
   ========================================================== */

.charts-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}

.chart-box {
  flex: 0 0 45%;
  min-width: 360px;
  max-width: 600px;
  background: #1b1b1b;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.5rem;
  box-sizing: border-box;
}

.chart-box-full {
  width: 100%;
  background: #1b1b1b;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.5rem;
  margin-top: 1rem;
  box-sizing: border-box;
}

/* ==========================================================
   BULK TOOLBAR
   ========================================================== */

.bulk-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  background: #222;
  border: 2px solid #555;
  border-radius: 6px;
  padding: 0.6rem;
  margin-bottom: 0.8rem;
}

.bulk-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.bulk-controls label {
  font-size: 0.9rem;
  color: #ccc;
}

.bulk-controls select {
  width: auto;
  min-width: 65px;
  padding: 0.25rem 0.4rem;
}

#bulk_apply_btn {
  background: #333;
  color: #eee;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 0.3rem 0.8rem;
  margin-left: 0.6rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
#bulk_apply_btn:hover {
  background: #3a3a3a;
}

#bulk_status_icon {
  margin-left: 0.4rem;
  color: #7fd47f;
  visibility: hidden;
}

/* Map button */
#bulk_map_btn {
  background: #333;
  border: 1px solid #555;
  color: #eee;
  border-radius: 4px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}
#bulk_map_btn:hover {
  background: #444;
}

/* ==========================================================
   MAP PAGE
   ========================================================== */

#map {
  height: 100vh;
  width: 100vw;
  background: #000;
}

/* Floating controls */
#map-controls {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  background: rgba(20,20,20,0.82);
  border: 1px solid #444;
  border-radius: 8px;
  padding: 10px;
}

#map-controls button {
  background: #333;
  color: #eee;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px 12px;
  margin: 6px 0;
  width: 140px;
  cursor: pointer;
}
#map-controls button:hover {
  background: #444;
}

/* Popup wrapper */
.leaflet-popup-content-wrapper {
  background: #1b1b1b;
  color: #eee;
  border-radius: 8px;
  border: 1px solid #333;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

/* Popup content */
.leaflet-popup-content {
  max-height: 450px;
  overflow-y: auto;
  padding-right: 4px;
  font-size: 0.9rem;
  scrollbar-width: thin;
}

.popup-container {
  min-width: 280px;
}

.popup-container h3 {
  margin: 0 0 8px 0;
  color: #ffb347;
}

.popup-meta {
  line-height: 1.4;
  margin-bottom: 8px;
}

.popup-image-block {
  margin-bottom: 6px;
}

.popup-image-block img {
  max-width: 100%;
  border-radius: 4px;
  border: 1px solid #333;
  margin: 6px 0;
}

.popup-fields {
  font-size: 0.85rem;
  line-height: 1.45;
}

.leaflet-popup-content hr {
  border: 0;
  border-top: 1px solid #444;
  margin: 10px 0;
}

.leaflet-popup-content a {
  color: #66ccff;
  text-decoration: none;
}
.leaflet-popup-content a:hover {
  text-decoration: underline;
}



/* ===== PDF GENERATION OVERLAY ===== */

#pdf_loading_overlay {
  display: none; /* hidden until needed */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.78);
  z-index: 9999;
  backdrop-filter: blur(3px);
}

.pdf_loading_box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  font-size: 20px;
}

/* Spinner Animation */
.spinner {
  width: 48px;
  height: 48px;
  border: 6px solid #444;
  border-top: 6px solid #fff;
  border-radius: 50%;
  margin: 0 auto 15px auto;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading_text {
  margin-top: 10px;
  font-size: 18px;
  letter-spacing: 0.5px;
}


/* ===== Logout Button ---- */

.logout-container {
  position: absolute;
  top: 20px;
  right: 20px;
}

.logout-btn {
  background: #aa3333;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid #771f1f;
}

.logout-btn:hover {
  background: #cc4444;
}


/* ===== View-Only Warning Style ---- */
.readonly-banner {
  background: #663;
  border: 1px solid #aa8;
  color: #ffebc2;
  padding: 0.8rem 1rem;
  margin: 1.2rem auto;
  text-align: center;
  font-size: 1.05rem;
  border-radius: 6px;
  max-width: 900px;
  box-shadow: 0 0 8px rgba(0,0,0,0.35);
}
