/**
 * Period Tracker Hugo Site - Custom Styles
 * Complementary styles for Tailwind CSS
 */

/* CSS Variables */
:root {
    --color-primary: #f43f5e;
    --color-primary-dark: #e11d48;
    --color-primary-light: #fda4af;
    --color-bg: #fff1f2;
    --color-text: #881337;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Typography - Prose styles for content */
.prose {
    color: #881337;
    max-width: 65ch;
    line-height: 1.75;
}

.prose h2 {
    color: #9f1239;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #fecdd3;
    padding-bottom: 0.5rem;
}

.prose h3 {
    color: #be123c;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose ul li::marker {
    color: #f43f5e;
}

.prose ol li::marker {
    color: #f43f5e;
    font-weight: 600;
}

.prose a {
    color: #e11d48;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.prose a:hover {
    color: #f43f5e;
}

.prose strong {
    color: #9f1239;
    font-weight: 600;
}

.prose blockquote {
    border-left: 4px solid #fda4af;
    padding-left: 1rem;
    font-style: italic;
    color: #be123c;
    margin: 1.5rem 0;
}

.prose code {
    background: #ffe4e6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.prose pre {
    background: #9f1239;
    color: #fff1f2;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Calculator Form Styling */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #f43f5e;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(244, 63, 94, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #f43f5e;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(244, 63, 94, 0.3);
}

input[type="date"] {
    color-scheme: light;
}

/* Focus States */
input:focus, button:focus {
    outline: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#calculator-results:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .prose {
        font-size: 1rem;
    }

    .prose h2 {
        font-size: 1.25rem;
    }

    .prose h3 {
        font-size: 1.125rem;
    }
}

/* Print Styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    .prose {
        max-width: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    #calculator-results:not(.hidden) {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #c81e44;
        --color-text: #4a0519;
    }

    .prose {
        color: #4a0519;
    }
}

/* ========================================
 * Dynamic Tailwind Classes for Calculator
 * These classes are generated dynamically by JS
 * and cannot be detected by Tailwind JIT
 * ======================================== */

/* Rose */
.bg-rose-50 { background-color: #fff1f2; }
.bg-rose-100 { background-color: #ffe4e6; }
.text-rose-600 { color: #e11d48; }
.text-rose-700 { color: #be123c; }
.text-rose-800 { color: #9f1239; }
.border-rose-200 { border-color: #fecdd3; }
.border-rose-300 { border-color: #fda4af; }
.border-rose-400 { border-color: #fb7185; }
.border-l-rose-400 { border-left-color: #fb7185; }

/* Amber */
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-100 { background-color: #fef3c7; }
.text-amber-600 { color: #d97706; }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }
.text-amber-900 { color: #78350f; }
.border-amber-200 { border-color: #fde68a; }
.border-amber-300 { border-color: #fcd34d; }
.border-amber-400 { border-color: #fbbf24; }
.border-l-amber-400 { border-left-color: #fbbf24; }

/* Emerald */
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-100 { background-color: #d1fae5; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }
.text-emerald-800 { color: #065f46; }
.text-emerald-900 { color: #064e3b; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-emerald-300 { border-color: #6ee7b7; }
.border-emerald-400 { border-color: #34d399; }
.border-l-emerald-400 { border-left-color: #34d399; }

/* Purple */
.bg-purple-50 { background-color: #faf5ff; }
.bg-purple-100 { background-color: #f3e8ff; }
.text-purple-600 { color: #9333ea; }
.text-purple-700 { color: #7e22ce; }
.text-purple-800 { color: #6b21a8; }
.border-purple-200 { border-color: #e9d5ff; }
.border-purple-300 { border-color: #d8b4fe; }
.border-purple-400 { border-color: #c084fc; }
.border-l-purple-400 { border-left-color: #c084fc; }

/* Gray */
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
