/* Custom CSS for Hindi Medicine Tracker */

/* Font Setup */
:root {
    --font-hindi: 'Noto Sans Devanagari', sans-serif;
    --font-english: 'Noto Sans', sans-serif;
    --color-saffron: #FF9933;
    --color-white: #FFFFFF;
    --color-green: #138808;
    --color-light-green: #e8f5e8;
    --color-light-red: #ffe6e6;
    --shadow-soft: 0 2px 8px rgba(0,0,0,0.1);
    --border-radius: 12px;
}

/* Body and Typography */
body {
    font-family: var(--font-hindi);
    padding-bottom: 80px; /* Space for bottom navigation */
    background-color: #f8f9fa;
    position: relative;
}

.english {
    font-family: var(--font-english);
}

/* Custom Colors */
.bg-saffron {
    background-color: var(--color-saffron) !important;
}

.text-saffron {
    color: var(--color-saffron) !important;
}

.btn-saffron {
    background-color: var(--color-saffron);
    border-color: var(--color-saffron);
    color: white;
}

.btn-saffron:hover {
    background-color: #e8841f;
    border-color: #e8841f;
    color: white;
}

/* Card Enhancements */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: none;
    margin-bottom: 1rem;
}

.card-header {
    border-top-left-radius: var(--border-radius) !important;
    border-top-right-radius: var(--border-radius) !important;
    border-bottom: none;
    padding: 1rem;
}

/* Medicine List Items */
.medicine-item {
    padding: 1rem;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 70px;
    display: flex;
    align-items: center;
}

.medicine-item:hover {
    background-color: #f8f9fa;
}

.medicine-item.taken {
    background-color: var(--color-light-green);
    border-left: 4px solid var(--color-green);
}

.medicine-item.missed {
    background-color: var(--color-light-red);
    border-left: 4px solid #dc3545;
}

.medicine-checkbox {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.medicine-checkbox.checked {
    background-color: var(--color-green);
    border-color: var(--color-green);
    color: white;
}

.medicine-checkbox:hover {
    transform: scale(1.1);
}

.medicine-info {
    flex-grow: 1;
}

.medicine-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.medicine-dosage {
    color: #6c757d;
    font-size: 0.9rem;
}

.medicine-time {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Course Progress Styling */
.course-progress {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.course-day-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.course-taken-info {
    margin-bottom: 0.5rem;
}

.course-progress .progress {
    height: 4px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.course-progress .progress-bar {
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Course Summary Styling */
.course-item {
    padding: 0.75rem 0;
}

.course-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.course-item h6 {
    color: #333;
    font-weight: 600;
}

.course-item .progress {
    height: 6px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.course-item .progress-bar {
    transition: width 0.4s ease;
    border-radius: 3px;
}

/* Progress Card */
.progress {
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.5s ease;
}


/* Bottom Navigation */
.navbar.fixed-bottom {
    padding: 0.5rem 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.navbar.fixed-bottom .btn {
    padding: 0.5rem;
    color: #6c757d;
    min-height: 60px;
    width: 100%;
}

.navbar.fixed-bottom .btn.active {
    color: var(--color-saffron);
}

.navbar.fixed-bottom .btn:hover {
    color: var(--color-saffron);
}

.navbar.fixed-bottom i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.navbar.fixed-bottom small {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Date Navigation */
.date-nav {
    background: linear-gradient(135deg, var(--color-saffron), #ff6b35);
    color: white;
}

/* Language Toggle */
#lang-toggle {
    border-radius: 20px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .medicine-name {
        font-size: 1rem;
    }
    
    .medicine-checkbox {
        width: 44px;
        height: 44px;
    }
    
    .card-header h5 {
        font-size: 1.1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.pulse {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Special Schedules */
.medicine-special {
    border: 2px dashed #ffc107;
    background-color: #fff9e6;
}

.medicine-special::before {
    content: "⚡";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.2rem;
}

/* Accessibility */
.medicine-item:focus {
    outline: 2px solid var(--color-saffron);
    outline-offset: 2px;
}

/* ॐ Blessing Animation */
.om-blessing {
    font-family: 'Noto Sans Devanagari', serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    user-select: none;
    animation: omGlowPeaceful 8s ease-in-out forwards;
    font-weight: 800;
    position: relative;
}

@keyframes omGlowPeaceful {
    0% {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        filter: drop-shadow(0 0 5px currentColor) brightness(1.1);
    }
    20% {
        text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
        filter: drop-shadow(0 0 12px currentColor) brightness(1.3);
    }
    40% {
        text-shadow: 4px 4px 8px rgba(0,0,0,0.4);
        filter: drop-shadow(0 0 18px currentColor) brightness(1.4);
    }
    60% {
        text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
        filter: drop-shadow(0 0 15px currentColor) brightness(1.2);
    }
    80% {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        filter: drop-shadow(0 0 10px currentColor) brightness(1.0);
    }
    100% {
        text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
        filter: drop-shadow(0 0 5px currentColor) brightness(0.8);
    }
}

/* Gentle glow for peaceful effect */
.om-blessing::before {
    content: 'ॐ';
    position: absolute;
    top: 0;
    left: 0;
    color: inherit;
    filter: blur(2px);
    opacity: 0.4;
    z-index: -1;
}

/* Week View Styles */
.week-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.week-day {
    flex: 1;
    min-width: 120px;
    min-height: 100px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: white;
    text-align: center;
}

.week-day:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.week-day.today {
    border: 3px solid var(--color-saffron);
    background-color: #fff8f0;
    box-shadow: 0 2px 8px rgba(255, 153, 51, 0.3);
}

.week-day.selected {
    background-color: var(--color-saffron);
    color: white;
    border-color: var(--color-saffron);
}

.week-day-header {
    margin-bottom: 8px;
}

.day-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    opacity: 0.8;
}

.day-date {
    font-weight: 700;
    font-size: 1.4rem;
}

.week-day .status-indicator {
    font-size: 1.5rem;
    margin: 8px 0;
}

.status-text {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Status Colors for Week View */
.week-day.status-complete {
    background-color: var(--color-light-green) !important;
    border-color: var(--color-green) !important;
}

.week-day.status-partial {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
}

.week-day.status-missed {
    background-color: var(--color-light-red) !important;
    border-color: #dc3545 !important;
}

.week-day.status-pending {
    background-color: #e3f2fd !important;
    border-color: #2196f3 !important;
}

.week-day.status-no-data {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

.week-day.selected.status-complete,
.week-day.selected.status-partial,
.week-day.selected.status-missed,
.week-day.selected.status-pending,
.week-day.selected.status-no-data {
    background-color: var(--color-saffron) !important;
    color: white !important;
    border-color: var(--color-saffron) !important;
}

/* Responsive Week View */
@media (max-width: 768px) {
    .week-grid {
        flex-direction: column;
    }
    
    .week-day {
        min-width: 100%;
        min-height: 80px;
        padding: 8px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .week-day-header {
        margin-bottom: 0;
        text-align: left;
    }
    
    .day-date {
        font-size: 1.2rem;
    }
    
    .week-day .status-indicator {
        font-size: 1.3rem;
        margin: 0;
    }
    
    .status-text {
        font-size: 0.75rem;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 153, 51, 0.2);
    max-width: 300px;
    width: 90%;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.text-saffron {
    color: var(--color-saffron) !important;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.loading-subtext {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Loading animation for content */
.content-loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.content-ready {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

/* Print Styles */
@media print {
    .navbar, .modal, .btn, .loading-overlay {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
    }
}