/* Components CSS - Lovable Inspired Theme */

/* Global Links */
a {
  color: var(--text-charcoal);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  text-decoration-thickness: 2px;
  /* No color change on hover - decoration carries the interactive signal */
}

/* Images & Borders */
img, .img-bordered {
  border-radius: var(--radius-12);
  border: 1px solid var(--border-light);
  max-width: 100%;
  height: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-size: var(--fs-16);
  font-weight: var(--fw-normal);
  padding: var(--space-1) var(--space-3); /* 8px 16px */
  border-radius: var(--radius-standard);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  text-decoration: none;
  line-height: 1.5;
  white-space: nowrap;
}

.btn:active {
  opacity: 0.8;
  transform: translateY(0.5px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ring-blue), var(--shadow-focus);
}

.btn-primary {
  background-color: var(--text-charcoal);
  color: var(--text-offwhite);
  box-shadow: var(--shadow-inset-button);
}

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

.btn-ghost {
  background-color: transparent;
  color: var(--text-charcoal);
  border: 1px solid var(--border-interactive);
}

.btn-ghost:hover {
  background-color: var(--charcoal-04);
  border-color: var(--text-charcoal);
}

.btn-cream {
  background-color: var(--bg-cream);
  color: var(--text-charcoal);
}

.btn-cream:hover {
  background-color: var(--border-light);
}

.btn-pill {
  background-color: var(--bg-cream);
  color: var(--text-charcoal);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-inset-button);
}

.btn-pill:hover {
  background-color: var(--charcoal-04);
}

.btn-sm {
  font-size: var(--fs-14);
  padding: 6px 12px;
  border-radius: var(--radius-standard);
}

/* Cards */
.card {
  background-color: var(--bg-cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  transition: border-color 0.2s ease;
  box-shadow: none; /* Borders define boundaries, not shadows */
}

.card:hover, .card-hover:hover {
  border-color: var(--border-interactive);
  box-shadow: none; /* Lovable relies on warm borders instead of heavy drop shadows */
}

/* Inputs & Form Groups */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.form-input {
  width: 100%;
  font-family: var(--font-family);
  font-size: var(--fs-16);
  padding: 10px 14px;
  background-color: var(--bg-cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-standard);
  color: var(--text-charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-interactive);
  box-shadow: 0 0 0 2px var(--ring-blue), var(--shadow-focus);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(247, 244, 237, 0.85); /* Glassmorphism cream background */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-3) 0;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.brand {
  font-size: 22px;
  font-weight: var(--fw-semibold);
  letter-spacing: -1px;
  color: var(--text-charcoal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-charcoal);
  text-decoration: none;
  font-size: var(--fs-16);
  font-weight: var(--fw-normal);
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background-color: var(--text-charcoal);
  color: var(--text-offwhite);
}

.badge-outline {
  background-color: transparent;
  color: var(--text-charcoal);
  border: 1px solid var(--border-light);
}

/* Footer styling */
.footer {
  background-color: var(--bg-cream);
  border-top: 1px solid var(--border-passive);
  padding: var(--space-8) 0 var(--space-5);
  margin-top: var(--space-10);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-6);
}

.footer-logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--color-charcoal);
  margin-bottom: var(--space-3);
}

.footer-desc {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
  max-width: 320px;
}

.footer-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-link {
  font-size: 14px;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--color-charcoal);
}

.footer-bottom {
  max-width: 1200px;
  margin: var(--space-6) auto 0;
  padding: var(--space-4) var(--space-4) 0;
  border-top: 1px solid var(--border-passive);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-muted);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--color-charcoal);
  color: var(--color-offwhite);
  padding: 12px 20px;
  border-radius: var(--radius-standard);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--focus-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideIn 0.3s ease forwards;
  max-width: 350px;
}

@keyframes slideIn {
  from {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
