/* Words of Life — global styles per STYLE_GUIDE.md */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #eab308;
  --accent-hover: #ca8a04;
  --background: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --success: #16a34a;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.15);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  background: var(--background);
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Utility: hide when drawer open on small screens if needed */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font: inherit;
  font-size: 14px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--primary);
  color: white;
}
.btn:hover {
  background: var(--primary-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.04);
}
.btn-text {
  background: transparent;
  color: var(--primary);
  padding: 8px 12px;
}
.btn-text:hover {
  background: rgba(37, 99, 235, 0.08);
}
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.btn-icon:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Material Design icon buttons (e.g. app bar actions) */
.md-icon-button {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background-color 0.15s ease;
}
.md-icon-button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.md-icon-button:hover::before {
  opacity: 0.08;
}
.md-icon-button:focus-visible::before {
  opacity: 0.12;
}
.md-icon-button:active::before {
  opacity: 0.12;
}
.md-icon-button svg {
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 1;
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  filter: brightness(0.95);
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--spacing-lg);
}
.card-clickable {
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.card-clickable:hover {
  box-shadow: var(--shadow-card-hover);
}

/* Inputs */
input[type="text"],
input[type="email"],
textarea {
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Slider */
input[type="range"] {
  accent-color: var(--primary);
}
