/* Base styles to replicate original Tailwind config */
:root {
    --bs-primary: #137fec;
    --bs-light: #f6f7f8; /* background-light */
    --bs-dark: #101922; /* background-dark */
}

/* Custom font (Manrope) */
body {
    font-family: 'Manrope', sans-serif;
}

/* Dark mode replication (simplified) */
.dark-mode-body {
    background-color: var(--bs-dark);
    color: white;
}

/* Replicating the 'primary' color text/background usage */
.bg-primary-custom {
    background-color: var(--bs-primary) !important;
}

.text-primary-custom {
    color: var(--bs-primary) !important;
}

/* Hero Section Background (simplified) */
.hero-background {
    background-image: linear-gradient(rgba(16, 25, 34, 0.6) 0%, rgba(16, 25, 34, 0.9) 100%), url("https://lh3.googleusercontent.com/aida-public/AB6AXuAbvVrfPjHViBWwqyyku6WXfeaaO6t4pLu1cwEKl-mtRLMs6yUnLagOyIquHyDb4EUoHVe2ILhIuW3CjwJp9bVOOPvQRIfOsaQKompN4H1nVyjS-Jb7q4QqbfIKY6g8F9wmUF4dAbdF3b1RmtOjIY3nP4Nyaa1fAv0PAdZAP0MCbxDbGiLAQlPV-IflQ8zcvV3SU5C1EKJ79KJKgcsxve70SYNkuu_xZj3-DEjhSoTI1CGRpOk3xOI0mjNevUmAY7XyvhOTXvaH1CnN");
    background-size: cover;
    background-position: center;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom padding/margin to match original feel */
.feature-card {
    border: 1px solid rgba(0, 0, 0, 0.125); /* approximated border */
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

/* Dark mode specific feature card styles (simplified) */
.dark-mode-body .feature-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
/* Optional: Smooth transition for hover and active effects */
.nav-item {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Active state styling */
.nav-item.active {
  background-color: rgba(59, 130, 246, 0.1); /* Tailwind's bg-primary/10 */
  color: #3b82f6; /* Tailwind's text-primary */
}

.nav-item.active .material-symbols-outlined {
  color: #3b82f6;
}

        .material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
        }
        .material-symbols-outlined.fill {
            font-variation-settings: 'FILL' 1;
        }
        /* Style Block for child templates */
        {% block custom_styles %}{% endblock %}


                .material-symbols-outlined {
          font-variation-settings:
          'FILL' 0,
          'wght' 400,
          'GRAD' 0,
          'opsz' 24
        }


            /* Custom checkbox style for Tailwind forms plugin to show a tick mark */
    .task-list {
        --checkbox-tick-svg: url('data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27rgb(255,255,255)%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3cpath d=%27M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z%27/%3e%3c/svg%3e');
    }
    .task-list input[type="checkbox"] {
        background-image: var(--checkbox-tick-svg);
        background-size: 80%; /* Adjust size for better fit */
        background-repeat: no-repeat;
        background-position: center;
    }

            /* Custom styles to approximate a dark-mode-friendly prose look for the rendered Markdown */
        .prose-custom {
            /* Mimic prose-invert for dark mode */
            color: white;
            min-height: 50vh; /* Ensure content area is substantial */
        }
        .prose-custom h1, .prose-custom h2, .prose-custom h3 {
            color: white;
            font-weight: 700;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 0.3em;
            margin-top: 1.5em;
        }
        .prose-custom p {
            margin-top: 1em;
            margin-bottom: 1em;
        }
        .prose-custom ul, .prose-custom ol {
            padding-left: 1.5em;
            list-style-type: disc;
        }
        .prose-custom a {
            color: #137fec; /* Primary color */
            text-decoration: underline;
        }
        .prose-custom code, .prose-custom pre {
            background-color: #233648; /* Darker background for code */
            color: #d1d5db;
            border-radius: 0.25rem;
            padding: 0.15em 0.3em;
        }
/* Hide default calendar icon but keep functionality */
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  right: 0;
  cursor: pointer;
  z-index: 2;
}

/* Wrapper for date input + custom SVG */
.date-wrapper {
  position: relative;
  width: 100%;
}

.date-wrapper svg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none; /* allow clicking input */
  fill: white; /* white icon in dark theme */
}

.navbar .nav-item.active a {
  color: #00bcd4;
  font-weight: bold;
  border-bottom: 2px solid #00bcd4;
}
#preview h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: inherit;
}

#preview h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: inherit;
}

#preview h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: inherit;
}

#preview ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

#preview ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

#preview li {
  margin: 0.25rem 0;
}

#preview p {
  margin: 0.5rem 0;
  line-height: 1.75;
}

#preview strong {
  font-weight: 700;
}

#preview em {
  font-style: italic;
}

#preview code {
  background-color: #f1f5f9;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.dark #preview code {
  background-color: #1e293b;
}

#preview pre {
  background-color: #f1f5f9;
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.dark #preview pre {
  background-color: #1e293b;
}

#preview pre code {
  background-color: transparent;
  padding: 0;
}

#preview a {
  color: #2563eb;
  text-decoration: underline;
}

#preview a:hover {
  color: #1d4ed8;
}

.dark #preview a {
  color: #60a5fa;
}

/* Markdown Content Styling */
#rendered-content {
    color: #0f172a;
}

.dark #rendered-content {
    color: #ffffff;
}

#rendered-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

#rendered-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

#rendered-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

#rendered-content p {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.75;
}

#rendered-content strong {
    font-weight: 700;
    color: inherit;
}

#rendered-content em {
    font-style: italic;
}

#rendered-content code {
    background-color: #f1f5f9;
    color: #0f172a;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.dark #rendered-content code {
    background-color: #1e293b;
    color: #e2e8f0;
}

#rendered-content pre {
    background-color: #f1f5f9;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.dark #rendered-content pre {
    background-color: #1e293b;
}

#rendered-content pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

#rendered-content ul,
#rendered-content ol {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

#rendered-content ul {
    list-style-type: disc;
}

#rendered-content ol {
    list-style-type: decimal;
}

#rendered-content li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

#rendered-content a {
    color: #2563eb;
    text-decoration: underline;
}

#rendered-content a:hover {
    color: #1d4ed8;
}

.dark #rendered-content a {
    color: #60a5fa;
}

.dark #rendered-content a:hover {
    color: #93c5fd;
}

/* KaTeX Math Styling */
#rendered-content .katex {
    font-size: 1.1em;
}

#rendered-content .katex-display {
    margin: 1.5rem 0;
}



/* CSS to handle the collapsed state */

/* Define the collapsed width and hide text content */
#sidebar[data-state="collapsed"] {
    width: 5rem; /* Equivalent to Tailwind's w-20 (80px) */
    padding-left: 0.5rem; /* Adjust padding for visual appeal */
    padding-right: 0.5rem;
}

/* Hide all elements with the 'sidebar-text-content' class when sidebar is collapsed */
#sidebar[data-state="collapsed"] .sidebar-text-content {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 300ms, width 300ms;
}

/* Ensure icons remain visible and centered */
#sidebar[data-state="collapsed"] .nav-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

/* Collapse button adjustments */
#sidebar[data-state="collapsed"] #toggleIcon {
    transform: rotate(180deg);
}

/* Button adjustments: Hide text, center icon */
#sidebar[data-state="collapsed"] #newTaskButton {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

/* Show the '+' icon on the button when collapsed */
#sidebar[data-state="collapsed"] #newTaskButton .sidebar-icon-only {
    display: block;
}
/* Hide the '+' icon when expanded */
#newTaskButton .sidebar-icon-only {
    display: none;
}

.todo-checkbox {
  transition: transform 0.15s ease-in-out;
}
.todo-checkbox:checked {
  transform: scale(1.15);
}

/* Strike-through when completed */
.completed .todo-text {
  text-decoration: line-through;
  opacity: 0.6;
  transition: all 0.3s ease-in-out;
}