/* Context Menu Styles */
.context-menu-trigger {
    position: relative;
}

.context-menu-trigger-btn {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.context-menu-trigger:hover .context-menu-trigger-btn,
.context-menu-trigger-btn:hover {
    opacity: 1;
}

.context-menu {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.context-menu button {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.context-menu button:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .context-menu-trigger-btn {
        opacity: 0.8;
        min-width: 20px;
        min-height: 20px;
    }
    
    .context-menu {
        min-width: 160px;
    }
    
    .context-menu button {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .context-menu-trigger-btn {
        opacity: 0.8;
    }
    
    .context-menu-trigger:active .context-menu-trigger-btn {
        opacity: 1;
    }
}

/* ===== ONBOARDING STYLES ===== */
#onboardingOverlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#onboardingTooltip {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== MOBILE NAVIGATION ENHANCEMENTS ===== */
.mobile-bottom-nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.nav-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.2);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.nav-ripple.active {
    transform: scale(1);
}

.nav-active-indicator {
    position: absolute;
    top: -2px;
    height: 3px;
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-bottom-nav.transitioning .nav-item {
    transition: all 0.3s ease;
}

/* ===== CALENDAR INTEGRATION STYLES ===== */
.calendar-day {
    position: relative;
    overflow: hidden;
}

.calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.calendar-day:hover::before {
    opacity: 1;
}

.time-slot {
    position: relative;
    overflow: hidden;
}

.time-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.time-slot:hover::before {
    opacity: 1;
}

/* ===== ENHANCED TASK STYLES ===== */
.task-item {
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.02), rgba(124, 58, 237, 0.02));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-item:hover::before {
    opacity: 1;
}

.task-checkbox {
    position: relative;
    overflow: hidden;
}

.task-checkbox::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(79, 70, 229, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.task-checkbox:hover::before {
    width: 100%;
    height: 100%;
}

.task-action-btn {
    position: relative;
    overflow: hidden;
}

.task-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    transition: all 0.3s ease;
}

.task-action-btn:hover::before {
    width: 100%;
    height: 100%;
}

/* ===== ENHANCED IDEAS STYLES ===== */
.idea-item {
    position: relative;
    overflow: hidden;
}

.idea-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.02), rgba(236, 72, 153, 0.02));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.idea-item:hover::before {
    opacity: 1;
}

.idea-action-btn {
    position: relative;
    overflow: hidden;
}

.idea-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    transition: all 0.3s ease;
}

.idea-action-btn:hover::before {
    width: 100%;
    height: 100%;
}

/* ===== QUICK CAPTURE STYLES ===== */
#quickCaptureInput {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#quickCaptureInput:focus {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ===== SEARCH AND FILTER STYLES ===== */
#taskSearchInput,
#ideasSearchInput {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#taskSearchInput:focus,
#ideasSearchInput:focus {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.category-filter-btn {
    position: relative;
    overflow: hidden;
}

.category-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.category-filter-btn:hover::before {
    opacity: 1;
}

/* ===== MODAL ENHANCEMENTS ===== */
.modal-content {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== FLOATING ACTION BUTTONS ===== */
#quickAddTaskBtn,
#addIdeaBtn {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#quickAddTaskBtn:hover,
#addIdeaBtn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===== SUCCESS MESSAGE STYLES ===== */
.success-message {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(34, 197, 94, 0.95);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ===== RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 640px) {
    .task-item,
    .idea-item {
        margin-bottom: 0.75rem;
    }
    
    .task-item .p-4,
    .idea-item .p-4 {
        padding: 0.75rem;
    }
    
    .task-action-btn,
    .idea-action-btn {
        padding: 0.5rem;
        min-width: 2rem;
        min-height: 2rem;
    }
    
    .category-filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    #quickCaptureInput,
    #taskSearchInput,
    #ideasSearchInput {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

@media (max-width: 480px) {
    .task-item .flex,
    .idea-item .flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .task-item .justify-between,
    .idea-item .justify-between {
        justify-content: flex-start;
    }
    
    .task-actions,
    .idea-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        background: rgba(17, 24, 39, 0.95);
        border-top-color: rgba(75, 85, 99, 0.5);
    }
    
    .task-item,
    .idea-item {
        background: rgba(31, 41, 55, 0.8);
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .task-item:hover,
    .idea-item:hover {
        background: rgba(31, 41, 55, 0.9);
        border-color: rgba(75, 85, 99, 0.5);
    }
    
    #quickCaptureInput,
    #taskSearchInput,
    #ideasSearchInput {
        background: rgba(31, 41, 55, 0.8);
        border-color: rgba(75, 85, 99, 0.3);
        color: rgba(243, 244, 246, 0.9);
    }
    
    #quickCaptureInput:focus,
    #taskSearchInput:focus,
    #ideasSearchInput:focus {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(79, 70, 229, 0.5);
    }
    
    .category-filter-btn {
        background: rgba(31, 41, 55, 0.8);
        border-color: rgba(75, 85, 99, 0.3);
        color: rgba(243, 244, 246, 0.9);
    }
    
    .category-filter-btn:hover {
        background: rgba(31, 41, 55, 0.9);
        border-color: rgba(75, 85, 99, 0.5);
    }
    
    .modal-content {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(75, 85, 99, 0.3);
    }
}

/* ===== ANIMATION ENHANCEMENTS ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.task-item,
.idea-item {
    animation: slideInUp 0.3s ease;
}

.modal-content {
    animation: scaleIn 0.3s ease;
}

.success-message {
    animation: slideInDown 0.3s ease;
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for keyboard navigation */
.task-item:focus-within,
.idea-item:focus-within {
    outline: 2px solid rgba(79, 70, 229, 0.5);
    outline-offset: 2px;
}

.task-action-btn:focus,
.idea-action-btn:focus,
.category-filter-btn:focus {
    outline: 2px solid rgba(79, 70, 229, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .task-item,
    .idea-item {
        border-width: 2px;
    }
    
    .task-action-btn,
    .idea-action-btn {
        border: 1px solid currentColor;
    }
    
    .category-filter-btn {
        border: 1px solid currentColor;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.task-item,
.idea-item,
.task-action-btn,
.idea-action-btn,
.category-filter-btn {
    will-change: transform;
}

.mobile-bottom-nav {
    will-change: transform;
}

/* ===== PRINT STYLES ===== */
@media print {
    .mobile-bottom-nav,
    #quickAddTaskBtn,
    #addIdeaBtn,
    .task-action-btn,
    .idea-action-btn {
        display: none !important;
    }
    
    .task-item,
    .idea-item {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 70, 229, 0.5);
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ===== TOOLTIP STYLES ===== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* ===== EMPTY STATE STYLES ===== */
.empty-state {
    text-align: center;
    padding: 0.375rem 0.5rem;
    color: #6B7280;
    font-style: italic;
    background-color: #F9FAFB;
    border: 1px dashed #D1D5DB;
    border-radius: 0.25rem;
    margin: 0.25rem 0;
    min-height: auto;
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(55, 65, 81, 1);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: rgba(107, 114, 128, 1);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ===== PROGRESS INDICATORS ===== */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

/* ===== BADGE STYLES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge-primary {
    background: rgba(79, 70, 229, 0.1);
    color: rgba(79, 70, 229, 1);
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: rgba(34, 197, 94, 1);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: rgba(245, 158, 11, 1);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: rgba(239, 68, 68, 1);
}

/* ===== UTILITY CLASSES ===== */
.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;
}

.touch-manipulation {
    touch-action: manipulation;
}

.select-none {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.pointer-events-none {
    pointer-events: none;
}

.pointer-events-auto {
    pointer-events: auto;
}
