/* MarkerDemo - Main Stylesheet */

/* CSS Variables */
:root {
  --primary-color: #7eb3f0;
  --primary-dark: #6a9fdd;
  --secondary-color: #64748b;
  --text-color: #1e293b;
  --text-light: #64748b;
  --bg-light: #f1f5f9;
  --bg-white: #f9fafb;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --max-width: 1200px;
}

/* Staging Theme Override */
body.staging {
  --primary-color: #e89999;
  --primary-dark: #d48888;
  --bg-white: #fdfaf9;
  --bg-light: #f5efed;
}

/* Smooth environment transition */
body,
.header,
.header__logo,
.header__nav a,
.btn--primary,
.card,
.value-card,
.hero,
.section--gray,
.footer {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Staging banner */
.staging-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #d48888;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.35s ease;
}
.staging-banner--visible {
  padding: 0.4rem 1rem;
  max-height: 40px;
  opacity: 1;
}
.staging-banner__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: stagingPulse 2s ease-in-out infinite;
}
.staging-banner__label {
  font-weight: 400;
  opacity: 0.8;
  margin-left: 0.25rem;
}
@keyframes stagingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-white);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--gray {
  background-color: var(--bg-light);
}

/* Header */
.header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.header__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.header__logo span {
  color: var(--text-color);
}

.header__nav {
  display: flex;
  gap: 2rem;
}

.header__nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Environment Switcher */
.env-switcher {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-left: 1rem;
}

.env-switcher__btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.env-switcher__btn--live {
  background-color: transparent;
  color: var(--text-light);
  border-right: 1px solid var(--border-color);
}

.env-switcher__btn--live:hover {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.env-switcher__btn--live.active {
  background-color: var(--success-color);
  color: white;
}

.env-switcher__btn--live.active:hover {
  background-color: var(--success-color);
  color: white;
}

.env-switcher__btn--staging {
  background-color: transparent;
  color: var(--text-light);
}

.env-switcher__btn--staging:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.env-switcher__btn--staging.active {
  background-color: var(--danger-color);
  color: white;
}

.env-switcher__btn--staging.active:hover {
  background-color: var(--danger-color);
  color: white;
}

/* Footer */
.footer {
  background-color: var(--text-color);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer__bottom {
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Hero Section */
.hero {
  background: var(--bg-white);
  color: var(--text-color);
  padding: 2rem 0 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

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

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

.btn--secondary {
  background-color: white;
  color: var(--primary-color);
}

.btn--secondary:hover {
  background-color: var(--bg-light);
  color: var(--primary-dark);
}

/* Cards */
.card {
  background-color: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__text {
  color: var(--text-light);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-white);
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--text-color);
}

tr:hover {
  background-color: var(--bg-light);
}

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

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Team Cards */
.team-card {
  text-align: center;
  padding: 2rem;
}

.team-card__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--bg-light);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary-color);
}

.team-card__name {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.team-card__role {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--primary-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: translateX(-5px);
}

.timeline-item__year {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timeline-item__content h4 {
  margin-bottom: 0.5rem;
}

.timeline-item__content p {
  color: var(--text-light);
}

/* Values Grid */
.value-card {
  padding: 1.5rem;
  border-left: 4px solid var(--primary-color);
  background-color: var(--bg-light);
}

.value-card h4 {
  margin-bottom: 0.5rem;
}

.value-card p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info__icon {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.contact-info__text h4 {
  margin-bottom: 0.25rem;
}

.contact-info__text p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* Sensitive Data Styling */
.sensitive {
  font-family: monospace;
  background-color: #fef3c7;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}


/* Bug Guide */
.bug-guide__toggle {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background-color: rgba(30, 41, 59, 0.9);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 9998;
  letter-spacing: 0.5px;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bug-guide__toggle:hover {
  background-color: rgba(30, 41, 59, 1);
}

.bug-guide__panel {
  position: fixed;
  bottom: 3.5rem;
  left: 1rem;
  width: 340px;
  max-height: 420px;
  background-color: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 9998;
  overflow-y: auto;
  transform: translateY(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.bug-guide__panel--open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.bug-guide__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
}

.bug-guide__list {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.bug-guide__list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bug-guide__list li:last-child {
  border-bottom: none;
}

.bug-guide__page {
  background-color: rgba(126, 179, 240, 0.2);
  color: #7eb3f0;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  min-width: 52px;
  text-align: center;
}

.bug-guide__desc {
  flex: 1;
  color: #cbd5e1;
}

.bug-guide__feature {
  background-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
  .header__inner {
    flex-direction: column;
    gap: 1rem;
  }

  .header__nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Mobile switcher - much more prominent */
  .env-switcher {
    margin: 0;
    order: -1;
    width: 100%;
    justify-content: center;
    border-width: 2px;
  }

  .env-switcher__btn {
    flex: 1;
    text-align: center;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .env-switcher__btn--live {
    border-right-width: 2px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}
