/* Health Day — Theme CSS
   Ported from template/src/styles/theme.css
   No build step required — plain CSS with variables */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

:root {
    --font-size: 16px;
    --font-family: 'Outfit', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --background: #f0fbfd;
    --foreground: #0a2332;
    --card: #ffffff;
    --card-foreground: #0a2332;
    --popover: #ffffff;
    --popover-foreground: #0a2332;
    --primary: #0891b2;
    --primary-foreground: #ffffff;
    --secondary: #e0f9f9;
    --secondary-foreground: #0a2332;
    --muted: #e4f4f8;
    --muted-foreground: #4a7a8a;
    --accent: #10b981;
    --accent-foreground: #ffffff;
    --destructive: #0891b2;
    --destructive-foreground: #ffffff;
    --border: rgba(8, 145, 178, 0.14);
    --input: transparent;
    --input-background: #e8f6f9;
    --switch-background: #a5d8e6;
    --font-weight-medium: 600;
    --font-weight-normal: 400;
    --ring: #0891b2;
    --chart-1: #0891b2;
    --chart-2: #14b8a6;
    --chart-3: #10b981;
    --chart-4: #0ea5e9;
    --chart-5: #22d3ee;
    --radius: 1rem;
    --sidebar: #eaf8fb;
    --sidebar-foreground: #0a2332;
    --sidebar-primary: #0891b2;
    --sidebar-primary-foreground: #ffffff;
    --sidebar-accent: #d4f1f8;
    --sidebar-accent-foreground: #0a2332;
    --sidebar-border: rgba(8, 145, 178, 0.12);
    --sidebar-ring: #0891b2;
}

[data-theme="dark"] {
    --background: #0a1a24;
    --foreground: #c8e6f0;
    --card: #102836;
    --card-foreground: #c8e6f0;
    --popover: #102836;
    --popover-foreground: #c8e6f0;
    --primary: #0891b2;
    --primary-foreground: #ffffff;
    --secondary: #143340;
    --secondary-foreground: #c8e6f0;
    --muted: #143340;
    --muted-foreground: #6b9ba8;
    --accent: #10b981;
    --accent-foreground: #ffffff;
    --destructive: #0891b2;
    --destructive-foreground: #ffffff;
    --border: rgba(8, 145, 178, 0.25);
    --input: transparent;
    --input-background: #143340;
    --switch-background: #1a3a4a;
    --ring: #0891b2;
    --chart-1: #0891b2;
    --chart-2: #14b8a6;
    --chart-3: #10b981;
    --chart-4: #0ea5e9;
    --chart-5: #22d3ee;
    --sidebar: #0d1f2a;
    --sidebar-foreground: #c8e6f0;
    --sidebar-primary: #0891b2;
    --sidebar-primary-foreground: #ffffff;
    --sidebar-accent: #143340;
    --sidebar-accent-foreground: #c8e6f0;
    --sidebar-border: rgba(8, 145, 178, 0.2);
    --sidebar-ring: #0891b2;
}

[data-theme="dark"] .extra-slot-card {
    background: #0a1a24 !important;
}

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

html, body {
    height: 100%;
    font-size: var(--font-size);
    font-family: var(--font-family);
    background: var(--background);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 { font-size: 1.5rem; font-weight: var(--font-weight-medium); line-height: 1.5; }
h2 { font-size: 1.25rem; font-weight: var(--font-weight-medium); line-height: 1.5; }
h3 { font-size: 1.125rem; font-weight: var(--font-weight-medium); line-height: 1.5; }
h4 { font-size: 1rem; font-weight: var(--font-weight-medium); line-height: 1.5; }

label { font-size: 1rem; font-weight: var(--font-weight-medium); line-height: 1.5; }
button { font-size: 1rem; font-weight: var(--font-weight-medium); line-height: 1.5; cursor: pointer; }
input { font-size: 1rem; font-weight: var(--font-weight-normal); line-height: 1.5; }

/* Scrollbar hiding utility */
.scrollbar-none {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.scrollbar-none::-webkit-scrollbar {
    display: none;
}

/* Custom scrollbar for main content */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(8, 145, 178, 0.2);
    border-radius: 3px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(8, 145, 178, 0.4);
}

/* Masonry-like grid (left-to-right fill) */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.masonry-grid > div {
    width: calc(100% - 1rem);
}
@media (min-width: 640px) {
    .masonry-grid > div { width: calc(50% - 0.5rem); }
}
@media (min-width: 1024px) {
    .masonry-grid > div { width: calc(33.333% - 0.667rem); }
}
@media (min-width: 1280px) {
    .masonry-grid > div { width: calc(25% - 0.75rem); }
}

.break-inside-avoid {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

/* Transitions */
.transition-all {
    transition: all 0.2s ease;
}
.transition-colors {
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

/* Hover lift effect */
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.12);
}
.hover-lift-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(8, 145, 178, 0.1);
}

/* Active press effect */
.active-scale:active {
    transform: scale(0.95);
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.scale-in {
    animation: scaleIn 0.2s ease-out;
}

/* Heartbeat animation for logo: 2 beats + pause, 3 times, 4.5s total */
@keyframes heartbeat {
    0% { transform: scale(1); }
    2% { transform: scale(1.15); }
    5% { transform: scale(1); }
    8% { transform: scale(1.15); }
    11% { transform: scale(1); }
    33% { transform: scale(1); }
    35% { transform: scale(1.15); }
    38% { transform: scale(1); }
    41% { transform: scale(1.15); }
    44% { transform: scale(1); }
    66% { transform: scale(1); }
    68% { transform: scale(1.15); }
    71% { transform: scale(1); }
    74% { transform: scale(1.15); }
    77% { transform: scale(1); }
    100% { transform: scale(1); }
}
.heartbeat {
    animation: heartbeat 4.5s ease-in-out;
}

/* Form inputs */
.form-input {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--input-background);
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--foreground);
    outline: none;
    transition: all 0.2s ease;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}
.form-textarea {
    width: 100%;
    min-height: 4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--input-background);
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--foreground);
    outline: none;
    transition: all 0.2s ease;
    resize: vertical;
}
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

/* Gradient button */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    padding: 0.625rem 1.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-gradient:hover {
    opacity: 0.9;
}
.btn-gradient:active {
    transform: scale(0.95);
}

/* Card */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

/* Spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast animation */
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Fade in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Cross pulse */
@keyframes crossPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0.1; }
}
