/* =========================================
   Green Shoot Brands - Flat Tech Design
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Flat Design Palette */
  --primary: #10B981;
  /* Emerald 500 - Tech Green */
  --primary-hover: #059669;
  /* Emerald 600 */
  --primary-bg: #ECFDF5;
  /* Emerald 50 */

  --bg: #FAFAFA;
  /* Very Light Gray Background */
  --surface: #FFFFFF;
  /* Pure White Surface */

  --text-main: #111827;
  /* Gray 900 */
  --text-secondary: #374151;
  /* Gray 700 */
  /* Gray 600 - Darker for readability */
  --text-muted: #4B5563;
  /* Gray 500 */

  --border: #E5E7EB;
  /* Gray 200 */
  --border-dark: #D1D5DB;
  /* Gray 300 */

  --danger: #EF4444;
  --success: #10B981;
  --warning: #F59E0B;

  /* Tech Values */
  --radius: 8px;
  /* Moderate radius for tech feel */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  /* Minimal shadow */
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

  --header-height: 100px;
  /* Increased to accommodate stacked layout */
}

/* =========================================
   Reset & Base
   ========================================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

input,
button,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Hide number input spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* =========================================
   Layout
   ========================================= */
main {
  padding: 24px;
  max-width: 1200px;
  /* Constrain width for a cleaner look */
  margin: 0 auto;
  min-height: calc(100vh - var(--header-height));
  width: 100%;
  /* Prevent vertical centering - keep content at top */
  display: block !important;
}

/* Desktop Landing */
@media (min-width: 768px) {
  .header-container {
    padding: 0;
    /* Align perfectly with content */
  }
}

/* Landing screen - content at top */
#landing-screen.active {
  padding-top: 0;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   Header (Flat)
   ========================================= */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: auto;
  /* Allow height to grow */
  min-height: 64px;
  display: flex;
  justify-content: center;
  padding: 8px 24px;
}

.header-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  /* Stack vertically */
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Neon Logo Text Style */
.brand-logo-link {
  text-decoration: none;
  display: inline-block;
}

.gsb-neon-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 80px;
  line-height: 1;
  color: #ebfef5;
  /* Almost white green */
  text-transform: uppercase;
  letter-spacing: -0.05em;

  /* Neon Glow Effect */
  text-shadow:
    0 0 2px #fff,
    0 0 10px #10B981,
    0 0 20px #10B981,
    0 0 40px #10B981,
    0 0 80px #059669;
  /* Darker green outer glow */

  transition: text-shadow 0.3s ease;
  padding: 10px;
  /* Space for the glow */
}

.gsb-neon-logo:hover {
  text-shadow:
    0 0 4px #fff,
    0 0 15px #10B981,
    0 0 30px #10B981,
    0 0 60px #10B981,
    0 0 100px #059669;
}



.brand-block h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.brand-block h1 a {
  color: inherit;
  text-decoration: none;
}

/* Navigation Tabs (Pill style, flat) */
.switcher {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.switcher button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.switcher button:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.03);
}

.switcher button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Mobile responsive header adjustment */
@media (max-width: 768px) {
  header {
    height: auto;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  .switcher {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    /* scrollable if needed */
  }

  .switcher button {
    white-space: nowrap;
    flex: 1;
    text-align: center;
  }
}


/* =========================================
   Components: Cards
   ========================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  /* Minimal shadow */
}

/* =========================================
   Components: Buttons
   ========================================= */
.primary-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  /* Allow auto width */
  min-width: 120px;
  /* Minimum width for consistency */
}

/* Full width only on mobile */
@media (max-width: 600px) {
  .primary-btn {
    width: 100%;
  }
}

.primary-btn:hover {
  background: var(--primary-hover);
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
}

.ghost-btn:hover {
  background: var(--bg);
  border-color: var(--border-dark);
}

/* =========================================
   Components: Forms
   ========================================= */
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.025em;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-bg);
  /* subtle focus ring */
}

/* =========================================
   Lists & Items (Stores)
   ========================================= */
.store-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s ease;
  cursor: pointer;
  text-align: left;
  /* Ensure text is left-aligned on buttons */
  width: 100%;
}

.store-row:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.store-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.store-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-name {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.store-summary {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.chevron {
  font-size: 20px;
  color: var(--text-muted);
  font-weight: 300;
}

.pill {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

/* =========================================
   Grids (Photos)
   ========================================= */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.thumb-wrap {
  aspect-ratio: 1;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* =========================================
   Utilities
   ========================================= */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-gap {
  display: flex;
  gap: 10px;
}

.mt-2 {
  margin-top: 8px;
}

.mb-2 {
  margin-bottom: 8px;
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-main);
  /* Dark toast */
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Charts & Tables */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

tr:last-child td {
  border-bottom: none;
}

/* Summary Cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius);
}

.summary-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.summary-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 4px;
  letter-spacing: -0.05em;
}

/* =========================================
   Photo App (Visit-based) Styles
   ========================================= */
.photo-row,
.photo-visit-row {
  transition: transform 0.1s ease, background 0.15s ease;
}

.photo-row:active,
.photo-visit-row:active {
  transform: scale(0.98);
}

.photo-row:hover,
.photo-visit-row:hover {
  background: var(--primary-bg) !important;
  border-color: var(--primary) !important;
}

.photo-delete-single {
  transition: background 0.2s ease, transform 0.1s ease;
}

.photo-delete-single:hover {
  background: rgba(239, 68, 68, 0.9) !important;
  transform: scale(1.1);
}

.holiday-tag {
  font-size: 10px;
  background: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  font-weight: 700;
}

/* CRITICAL: Override any vertical centering on landing page */
@media (min-width: 768px) {
  main:has(#landing-screen.active) {
    display: block !important;
    justify-content: flex-start !important;
  }
}

main {
  display: block !important;
}

/* Photo filter buttons active state */
.photo-filter {
  transition: all 0.2s ease;
  cursor: pointer;
}

.photo-filter.active {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}
/* Store Analytics Styles */
#analytics-upload-area {
  background: var(--bg);
  border-color: var(--border);
}

#analytics-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.analytics-tab-content {
  animation: fadeIn 0.2s ease-out;
}

#analytics-ranking-metric {
  -webkit-appearance: auto;
  appearance: auto;
}

#analytics-date-popover {
  box-shadow: var(--shadow-md);
}

#analytics-compare-stores .pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

@media (max-width: 600px) {
  #analytics-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
