/**
 * TabMail - Base Styles
 * 
 * Reset and foundational styles shared across all pages.
 * Requires: palette.css
 */

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

/* Base body styles */
html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text-color);
  line-height: 1.5;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  html, body {
    background: var(--page-bg-dark);
    color: var(--text-color-dark);
  }
}

/* ============================================
   Page Content Wrapper
   Scrollbar appears below header on all pages
   ============================================ */
.page-content {
  height: calc(100vh - 80px);
  margin-top: 80px;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .page-content {
    height: calc(100vh - 60px);
    margin-top: 60px;
  }
}

/* Links */
a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  a {
    color: var(--accent-color-dark);
  }
}

/* ============================================
   Footer (shared across all pages)
   ============================================ */
footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.6;
  margin-top: auto;
}

footer a {
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

footer a:hover {
  opacity: 1;
  border-bottom-color: var(--text-color);
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  footer a {
    color: var(--text-color-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  footer a:hover {
    border-bottom-color: var(--text-color-dark);
  }
}

/* Loading & Error States */
.loading {
  text-align: center;
  padding: 2rem;
  opacity: 0.7;
}

.error {
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: 1rem;
  color: #c33;
  margin-bottom: 1rem;
}

@media (prefers-color-scheme: dark) {
  .error {
    background: #3a1f1f;
    border-color: #5a2f2f;
    color: #ff6666;
  }
}

