@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
/* Calendar-specific styles */

/* Custom brand colors - earthy, professional palette for gardening audience */
:root {
    --calendar-primary: #2d5a3d;      /* Deep forest green - trustworthy, natural */
    --calendar-secondary: #8b5a3c;    /* Warm brown - soil, wood, rustic */
    --calendar-accent: #6b8e23;       /* Olive green - growth, herbs */
    --calendar-sage: #9caf88;         /* Sage green - calm, mature */
    --calendar-cream: #f9f7f4;        /* Warm cream - natural, soft */
    --calendar-stone: #e6e2dc;        /* Light stone - neutral, grounding */
    --calendar-terracotta: #c17b5a;   /* Terracotta - warm, earthy */
    --calendar-success: #22c55e;      /* Fresh green for completion */
    
    /* Deprecated - keeping for compatibility */
    --calendar-pink: #c17b5a;
    --calendar-green: #2d5a3d;
    --calendar-light-pink: #f5f1ed;
    --calendar-light-green: #f0f4f1;
}

/* Progress circle positioning */
.progress-circle {
    position: relative;
    display: inline-block;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Circle progress animations */
.circle-progress {
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.3s ease;
    transform-origin: center;
}

/* Task completion animations */
.task-completed {
    position: relative;
    overflow: hidden;
}

.task-completed .task-text {
    opacity: 0.8;
}

/* Completion ripple effect */
.completion-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: rippleExpand 0.6s ease-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes rippleExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/* Slide in animation for celebrations */
@keyframes slideInUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Task item hover and interaction improvements */
.task-item {
    position: relative;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-item:hover {
    border-color: rgba(34, 197, 94, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Enhanced task section styling */
.task-section {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.task-section:hover {
    border-color: rgba(34, 197, 94, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Progress indicator positioning */
.task-progress-indicator {
    display: flex;
    align-items: center;
}

/* Task wrapper transitions for hiding/showing */
.task-item-wrapper {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.task-item-wrapper.task-hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Hide button styling */
.task-hide-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.task-hide-btn:hover {
    transform: scale(1.1);
    background-color: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
}

.task-hide-btn:active {
    transform: scale(0.95);
}

/* Task actions container */
.task-actions {
    flex-shrink: 0;
}

/* Mobile-first improvements */
@media (max-width: 768px) {
    /* Larger touch targets for mobile */
    .task-item {
        min-height: 48px;
        padding: 16px !important;
    }
    
    .calendar-checkbox {
        width: 20px;
        height: 20px;
        margin-top: 0;
    }
    
    /* Better spacing for mobile */
    .task-section {
        margin-bottom: 24px;
    }
    
    /* Improve button accessibility */
    .task-hide-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
    
    /* Native-like month selector */
    .month-selector-btn {
        min-height: 48px;
        border-radius: 12px;
        font-weight: 500;
    }
    
    .month-dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Professional color refinements */
.task-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--calendar-stone);
}

.task-section:hover {
    border-color: var(--calendar-sage);
    box-shadow: 0 8px 25px rgba(45, 90, 61, 0.08);
}

/* Progress circle colors */
.progress-circle svg .circle-progress[stroke="#dc96a7"] {
    stroke: var(--calendar-terracotta);
}

.progress-circle svg .circle-progress[stroke="#26583a"] {
    stroke: var(--calendar-primary);
}

/* Enhanced checkbox animations */
.calendar-checkbox {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-width: 2px;
}

.calendar-checkbox:checked {
    animation: checkboxPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.calendar-checkbox:hover {
    transform: scale(1.05);
    border-color: var(--calendar-green);
}

.calendar-checkbox:focus {
    ring-width: 3px;
    ring-offset-width: 2px;
}

@keyframes checkboxPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1.1);
    }
}

/* Checkbox completion state */
.task-completed .calendar-checkbox {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Enhanced month navigation */
.month-nav-item {
    position: relative;
    overflow: hidden;
    transform-origin: center;
}

/* Desktop hover effects */
@media (min-width: 768px) {
    .month-nav-item:hover {
        transform: translateY(-2px);
    }

    .month-nav-item:active {
        transform: translateY(0) scale(0.98);
    }
}

/* Mobile touch feedback */
@media (max-width: 767px) {
    .month-nav-item:active {
        transform: scale(0.95);
    }
}

/* Smooth scroll behavior for month navigation */
.month-nav-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Enhanced scroll snap for better mobile experience */
@media (max-width: 768px) {
    .month-nav-scroll {
        scroll-snap-type: x mandatory;
        scroll-padding: 1rem;
    }

    .month-nav-item {
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }
}

/* Current month indicator animation */
@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.animate-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Seasonal background variations */
.season-winter {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.season-spring {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.season-summer {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.season-autumn {
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    .month-nav-scroll {
        scroll-snap-type: x mandatory;
    }

    .month-nav-item {
        scroll-snap-align: center;
    }
}

/* Focus styles for accessibility */
.month-nav-item:focus {
    outline: 2px solid var(--calendar-green);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(38, 88, 58, 0.1);
}

/* Enhanced visual feedback */
.month-nav-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.month-nav-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Desktop grid layout improvements */
@media (min-width: 768px) {
    .month-nav-item {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Task section hover effects */
.task-section {
    transition: all 0.3s ease;
}

.task-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Plant tag animations */
.plant-tag {
    transition: all 0.2s ease;
}

.plant-tag:hover {
    transform: scale(1.05);
}

/* Focus styles for accessibility */
.calendar-checkbox:focus {
    outline: 2px solid var(--calendar-green);
    outline-offset: 2px;
}

/* Mobile-specific task interactions */
@media (max-width: 768px) {
    .task-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .calendar-checkbox:active {
        transform: scale(1.2);
    }
}

/* Desktop improvements */
@media (min-width: 769px) {
    .task-item:hover .task-completion-animation {
        opacity: 0.3 !important;
        transition: opacity 0.2s ease;
    }
    
    .task-completed:hover .task-completion-animation {
        opacity: 1 !important;
    }
}

/* Celebration banner improvements */
.task-celebration {
    animation-fill-mode: both;
    border-style: dashed;
    border-width: 2px;
}

.task-celebration.hidden {
    animation: slideOutDown 0.3s ease-in;
}

@keyframes slideOutDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* Progress circle glow effect */
.progress-circle svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: filter 0.3s ease;
}

/* Improved focus indicators for accessibility */
.task-item:focus-within {
    outline: 2px solid var(--calendar-green);
    outline-offset: 2px;
    border-radius: 12px;
}

/* Seasonal enhancement classes */
.season-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.6;
}

.season-winter .season-indicator { background: #3b82f6; }
.season-spring .season-indicator { background: #10b981; }
.season-summer .season-indicator { background: #f59e0b; }
.season-autumn .season-indicator { background: #ef4444; }

/* Print styles */
@media print {
    .month-nav,
    .navigation-arrows,
    .task-progress-indicator,
    .task-completion-animation {
        display: none;
    }

    .task-section {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .task-item {
        break-inside: avoid;
    }
}

/* Celebration emoji animations */
.calendar-celebration-emoji {
    position: fixed;
    top: 50%;
    left: 50%;
    font-size: 2rem;
    pointer-events: none;
    z-index: 1000;
    animation: floatUpCelebration 2s ease-out forwards;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes floatUpCelebration {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -150px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -250px) scale(0.5);
        opacity: 0;
    }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

h2,
h3,
.book-title,
.font-bitter {
  font-family: 'Bitter', serif;
}

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #222;
}

.body a {
  text-decoration: underline;
}

.pagination a {
  text-decoration: underline;
}

.pagination a:hover {
  color: #333;
}
