/* Shared Components - components.css */

/* 1. Header & Navigation (Fixed Wrapper System) */
.fixed-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.header-nav {
  width: 100%;
  height: var(--header-height);
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-nav.shrink {
  height: 64px;
  background: rgba(250, 250, 250, 0.95);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo-link {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 22px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--primary-cobalt);
  letter-spacing: 0.05em;
  margin-top: -2px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-item a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-item a:hover,
.nav-item.active a {
  color: var(--primary-cobalt);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-actions .btn-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-actions .btn-link:hover {
  color: var(--text-primary);
}

/* Announcement Top Bar */
.announcement-bar {
  background: var(--primary-cobalt);
  color: #FFFFFF;
  text-align: center;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
}

.announcement-bar a {
  text-decoration: underline;
  color: #FFFFFF;
}

/* 2. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border-radius: 0; /* Strict sharp corners */
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary-cobalt);
  color: #FFFFFF;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 71, 255, 0.2);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--text-primary);
  color: #FFFFFF;
}

.btn-outline-white {
  background-color: transparent;
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.btn-outline-white:hover {
  background-color: #FFFFFF;
  color: var(--bg-contrast);
}

.btn-link-arrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--primary-cobalt);
  font-weight: 500;
}

.btn-link-arrow span {
  transition: transform 0.15s ease;
  margin-left: 6px;
}

.btn-link-arrow:hover span {
  transform: translateX(4px);
}

/* 3. macOS-style Terminal Mockup */
.terminal-window {
  background-color: #1E1E1E;
  border: 1px solid #333333;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  font-family: var(--font-mono);
  text-align: left;
}

.terminal-header {
  background-color: #2D2D2D;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #222222;
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.terminal-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-btn.red { background-color: #FF5F56; }
.terminal-btn.yellow { background-color: #FFBD2E; }
.terminal-btn.green { background-color: #27C93F; }

.terminal-title {
  color: #8E8E8E;
  font-size: 12px;
  margin-left: 20px;
  flex-grow: 1;
  text-align: center;
  margin-right: 52px; /* balance centering */
}

.terminal-body {
  padding: 24px;
  color: #A9B2C3;
  font-size: 14px;
  line-height: 1.6;
  min-height: 160px;
}

.terminal-line {
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-line.command {
  color: #FFFFFF;
}

.terminal-line.command::before {
  content: "$ ";
  color: var(--primary-cobalt);
}

.terminal-line.output {
  color: #8E8E8E;
}

.terminal-line.highlight {
  color: #61AFEF;
}

.terminal-line.cobalt-highlight {
  color: #00E1FF;
  font-weight: 700;
}

.terminal-line.success-highlight {
  color: var(--success-emerald);
}

/* 4. Bento Grid Layouts */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  width: 100%;
}

.bento-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--text-primary);
}

.bento-card-icon {
  margin-bottom: 32px;
  color: var(--primary-cobalt);
}

.bento-card-title {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.bento-card-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.bento-col-8 { grid-column: span 8; }
.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }
.bento-col-12 { grid-column: span 12; }

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-col-8, .bento-col-4, .bento-col-6, .bento-col-12 {
    grid-column: span 12;
  }
  .bento-card {
    padding: 24px;
  }
}

/* 5. Pricing Tables */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card.featured {
  border-color: var(--primary-cobalt);
  box-shadow: 0 12px 30px rgba(0, 71, 255, 0.05);
}

.pricing-card.featured::before {
  content: "MOST POPULAR";
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--primary-cobalt);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  letter-spacing: 0.05em;
}

.pricing-tier {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pricing-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 48px;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
}

.pricing-price span {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-left: 4px;
}

.pricing-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  min-height: 44px;
}

.pricing-specs {
  list-style: none;
  margin-bottom: 40px;
  flex-grow: 1;
}

.pricing-spec-item {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.pricing-spec-item::before {
  content: "✓";
  color: var(--success-emerald);
  margin-right: 12px;
  font-weight: bold;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* 6. Legal / Standard Footer */
.footer-main {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 16px;
  margin-bottom: 24px;
  max-width: 320px;
}

.footer-corp-details {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.8;
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
}

.footer-link-item {
  margin-bottom: 12px;
}

.footer-link-item a {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-link-item a:hover {
  color: var(--primary-cobalt);
}

.footer-bottom {
  max-width: var(--content-max-width);
  margin: 64px auto 0;
  padding: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-socials {
  display: flex;
  gap: 24px;
}

.footer-social-link {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-social-link:hover {
  color: var(--primary-cobalt);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* 7. Toggle Switch */
.toggle-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  background: var(--bg-secondary);
  padding: 6px 12px;
  border: 1px solid var(--border-color);
}

.toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.toggle-label.active {
  color: var(--text-primary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .2s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
}

input:checked + .slider {
  background-color: var(--primary-cobalt);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* 8. Tabbed Guides Layout */
.guides-tab-headers {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.guides-tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 32px;
  cursor: pointer;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.guides-tab-btn.active {
  color: var(--primary-cobalt);
  border-bottom-color: var(--primary-cobalt);
}

.guides-tab-pane {
  display: none;
}

.guides-tab-pane.active {
  display: block;
}

.step-card {
  border-left: 2px solid var(--border-color);
  padding-left: 24px;
  margin-bottom: 32px;
  position: relative;
}

.step-card::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0;
  width: 8px;
  height: 8px;
  background: var(--text-primary);
  border-radius: 50%;
}

.step-card.active::before {
  background: var(--primary-cobalt);
}

/* 9. Interactive Database Query Sandbox */
.sandbox-console {
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
}

.sandbox-header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-primary);
}

.sandbox-query-actions {
  display: flex;
  gap: 12px;
  padding: 24px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.sandbox-terminal {
  background: #0E0E0E;
  color: #D4D4D4;
  font-family: var(--font-mono);
  padding: 24px;
  font-size: 13px;
  height: 240px;
  overflow-y: auto;
}

.sandbox-meta {
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  display: flex;
  justify-content: space-between;
}
