/* Flow State Day Planner - Enhanced Styling */

/* Custom Font Loading */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Root Variables */
:root {
    --flow-primary: #667eea;
    --flow-secondary: #764ba2;
    --flow-accent: #f093fb;
    --priority-1: #ef4444;
    --priority-2: #f97316;
    --priority-3: #eab308;
    --priority-4: #22c55e;
    --flow-bg: linear-gradient(135deg, var(--flow-primary) 0%, var(--flow-secondary) 100%);
    --recovery-bg: linear-gradient(to right, #fef3c7, #fde68a);
    --flow-block-bg: linear-gradient(to right, #f8fafc, #e2e8f0);
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* Enhanced Gradient Backgrounds */
.flow-gradient {
    background: var(--flow-bg);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Priority Color System */
.priority-1 { border-left: 4px solid var(--priority-1) !important; }
.priority-2 { border-left: 4px solid var(--priority-2) !important; }
.priority-3 { border-left: 4px solid var(--priority-3) !important; }
.priority-4 { border-left: 4px solid var(--priority-4) !important; }

/* Flow Block Styling */
.flow-block {
    background: var(--flow-block-bg);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.flow-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--flow-primary), var(--flow-secondary));
}

/* Recovery Block Styling */
.recovery-block {
    background: var(--recovery-bg);
    border: 1px solid #fbbf24;
    position: relative;
}

.recovery-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

/* Form Enhancements */
.form-input {
    transition: all 0.2s ease;
    border-radius: 8px;
}

.form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Button Enhancements */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Card Enhancements */
.card {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Schedule Item Animations */
.schedule-item {
    animation: slideInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.schedule-item:nth-child(1) { animation-delay: 0.1s; }
.schedule-item:nth-child(2) { animation-delay: 0.2s; }
.schedule-item:nth-child(3) { animation-delay: 0.3s; }
.schedule-item:nth-child(4) { animation-delay: 0.4s; }
.schedule-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flow Phase Indicators */
.flow-phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.flow-phase {
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.flow-phase.struggle { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.flow-phase.release { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.flow-phase.flow { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.flow-phase.recovery { background: linear-gradient(135deg, #fef3c7, #fde68a); }

/* Responsive Enhancements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .flow-phases {
        grid-template-columns: 1fr 1fr;
    }
    
    .schedule-item {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .no-print { 
        display: none !important; 
    }
    
    .print-break { 
        page-break-after: always; 
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .flow-gradient {
        background: #667eea !important;
        color: white !important;
    }
    
    .card, .schedule-item {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
    
    .flow-block, .recovery-block {
        background: white !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--flow-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Indicators */
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--flow-primary);
    outline-offset: 2px;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--flow-primary), var(--flow-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}