@import "./variables.css";
@import "./animations.css";
@import "./pet-card.css";

/* CSS global reset */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  background-color: light-dark(var(--background-light), var(--background-dark));
  color: light-dark(var(--text-light), var(--text-dark));
  font-family: var(--font-primary, sans-serif);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background-color: var(--background);
  color: var(--text);
}

/* Header Styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem var(--page-padding-width);
  border-bottom: 1px solid var(--primary-foreground);
  gap: 1rem;
  flex-wrap: wrap;
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-actions,
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Navigation Buttons */
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--primary);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.nav-btn:hover,
.nav-btn:focus {
  background-color: var(--primary-foreground);
  outline: none;
}

.nav-btn:active {
  transform: scale(0.98);
}

.nav-btn.active {
  background-color: var(--primary);
  color: var(--background);
  border-color: var(--primary);
}

/* Navigation Links */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
  background-color: var(--primary-foreground);
  outline: none;
}

.nav-link.active {
  background-color: var(--primary-foreground);
  font-weight: 600;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus {
  background-color: var(--primary-foreground);
  outline: none;
}

.theme-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.theme-toggle svg path {
  stroke: var(--text);
  fill: none;
}

.theme-toggle svg[data-icon="dark"] path {
  fill: var(--text);
  stroke: none;
}

/* Main Content Styles */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--page-padding-height) var(--page-padding-width);
}

/* Card Display Area */
.card-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
}

/* Card Container - holds the pet card and overlays */
.card-container {
  position: relative;
  flex: 1;
  max-width: 350px;
}

/* Empty State Message */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text);
  opacity: 0.7;
}

.empty-state p {
  font-size: 1.125rem;
}

/* Reaction Icon Overlay */
.reaction-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
}

.reaction-overlay svg {
  width: 5rem;
  height: 5rem;
}

.reaction-overlay.like svg path {
  fill: var(--primary);
  stroke: var(--primary);
}

.reaction-overlay.dislike svg path {
  stroke: var(--secondary);
}

/* Swipe Buttons */
.swipe-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 2px solid var(--primary);
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.swipe-button:hover,
.swipe-button:focus {
  background-color: var(--primary-foreground);
  outline: none;
}

.swipe-button:active {
  transform: scale(0.95);
}

.swipe-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.swipe-button svg path {
  stroke: var(--text);
}

.swipe-button.dislike {
  border-color: var(--secondary);
}

.swipe-button.dislike:hover,
.swipe-button.dislike:focus {
  background-color: var(--secondary-foreground);
}

.swipe-button.like {
  border-color: var(--primary);
}

/* Footer Styles */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem var(--page-padding-width);
  margin-top: auto;
  border-top: 1px solid var(--primary-foreground);
}

footer small {
  font-size: 0.875rem;
  color: var(--text);
  opacity: 0.6;
}