/* Custom Date Picker Styles */

/* Filter Container Styles */
.filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.filter-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 12px 16px;
    min-width: 150px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-box:hover {
    border-color: #999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.filter-box.active {
    border-color: #667eea;
    background: #f0f4ff;
}

.filter-box i {
    color: #666;
    margin-right: 8px;
    font-size: 14px;
}

.filter-display {
    flex: 1;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    margin-left: 20px;
}

/* Custom Date Picker Modal */
.date-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.date-picker-modal.show {
    display: flex;
}

.date-picker {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.date-picker-header h2 {
    font-size: 20px;
    color: #1e293b;
    font-weight: 600;
}

.date-picker-header i {
    margin-right: 8px;
    color: #667eea;
}

.close-picker {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #64748b;
    margin-left: 3px;
}

.close-picker:hover {
    background: #e2e8f0;
}

.close-picker i {
    margin: auto;
}

.date-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 5px;
    border-radius: 10px;
}

.mode-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.date-picker-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.calendar-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.month-year-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.month-select,
.year-select {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    cursor: pointer;
}

.calendar-nav {
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    color: #64748b;
}

.calendar-nav:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.month-year-display {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-name {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    padding: 5px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
    color: #1e293b;
    border: 2px solid transparent;
    position: relative;
}

.calendar-day:hover {
    background: #e0e7ff;
    transform: scale(1.05);
}

.calendar-day.faded {
    color: #94a3b8;
    /* Faded color for non-selectable dates */
}

.calendar-day.faded:hover {
    background: white;
    transform: none;
}

.calendar-day.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.calendar-day.selected::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #34c759;
    border-radius: 50%;
    border: 1px solid white;
}

.calendar-day.in-range {
    background: #e0e7ff;
    color: #667eea;
}

.calendar-day.today {
    border-color: #f59e0b;
    position: relative;
}

.calendar-day.today::before {
    content: 'Today';
    position: absolute;
    top: -12px;
    font-size: 8px;
    color: #f59e0b;
    font-weight: 600;
}

.date-picker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 12px;
}

.selected-range-display {
    font-size: 13px;
    color: #64748b;
}

.selected-range-display strong {
    color: #1e293b;
}

.date-picker-actions {
    display: flex;
    gap: 8px;
}

.btn-clear,
.btn-apply {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-clear {
    background: #f1f5f9;
    color: #64748b;
}

.btn-clear:hover {
    background: #e2e8f0;
}

.btn-apply {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Dark Mode Styles */
.ocean-dark-mode .filter-box {
    background: #2a2a2a;
    border-color: #444;
}

.ocean-dark-mode .filter-box:hover {
    border-color: #666;
}

.ocean-dark-mode .filter-box.active {
    border-color: #667eea;
    background: #1a1f35;
}

.ocean-dark-mode .filter-box i {
    color: #aaa;
}

.ocean-dark-mode .filter-display {
    color: #e0e0e0;
}

.ocean-dark-mode .date-picker {
    background: #1e293b;
    color: #e0e0e0;
}

.ocean-dark-mode .date-picker-header h2,
.ocean-dark-mode .month-year-display {
    color: #e0e0e0;
}

.ocean-dark-mode .month-select,
.ocean-dark-mode .year-select {
    background: #334155;
    border-color: #444;
    color: #e0e0e0;
}

.ocean-dark-mode .close-picker {
    background: #334155;
}

.ocean-dark-mode .close-picker:hover {
    background: #475569;
}

.ocean-dark-mode .date-mode-selector {
    background: #0f172a;
}

.ocean-dark-mode .calendar-container {
    background: #0f172a;
}

.ocean-dark-mode .calendar-nav {
    background: #334155;
    color: #e0e0e0;
}

.ocean-dark-mode .calendar-day {
    background: #334155;
    color: #e0e0e0;
}

.ocean-dark-mode .calendar-day:hover {
    background: #475569;
}

.ocean-dark-mode .calendar-day.faded {
    color: #64748b;
    /* Faded color for dark mode */
}

.ocean-dark-mode .calendar-day.faded:hover {
    background: #334155;
}

.ocean-dark-mode .btn-clear {
    background: #334155;
    color: #e0e0e0;
}

.ocean-dark-mode .btn-clear:hover {
    background: #475569;
}

.ocean-dark-mode .selected-range-display {
    color: #94a3b8;
}

.ocean-dark-mode .selected-range-display strong {
    color: #e0e0e0;
}

.ocean-dark-mode .calendar-day-name {
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .filter-box {
        width: 100%;
        padding: 6px 10px;
        min-width: 120px;
    }

    .filter-box i {
        font-size: 12px;
        margin-right: 6px;
        position: absolute;
        top: 13px;
    }

    .filter-display {
        font-size: 12px;
    }

    .date-picker {
        width: 95%;
        padding: 12px;
        max-width: 400px;
    }

    .date-picker-header h2 {
        font-size: 18px;
    }

    .date-picker-header i {
        font-size: 14px;
        margin-right: 6px;
    }

    .close-picker {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .date-mode-selector {
        gap: 8px;
        padding: 4px;
    }

    .mode-btn {
        font-size: 12px;
        padding: 6px;
    }

    .date-picker-body {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .calendar-container {
        padding: 12px;
    }

    .calendar-header {
        margin-bottom: 12px;
    }

    .month-year-selector {
        gap: 8px;
    }

    .month-select,
    .year-select {
        font-size: 12px;
        padding: 5px;
    }

    .calendar-nav {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .calendar-day-name {
        font-size: 9px;
        padding: 4px 0;
    }

    .calendar-day {
        font-size: 11px;
    }

    .calendar-day.today::before {
        font-size: 7px;
        top: -10px;
    }

    .date-picker-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
    }

    .selected-range-display {
        font-size: 12px;
    }

    .date-picker-actions {
        width: 100%;
        gap: 6px;
    }

    .btn-clear,
    .btn-apply {
        flex: 1;
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .filter-container {
        gap: 6px;
    }

    .filter-box {
        padding: 5px 8px;
        min-width: 100px;
    }

    .filter-box i {
        font-size: 11px;
        margin-right: 5px;
        position: absolute;
        top: 13px;
    }

    .filter-display {
        font-size: 11px;
    }

    .date-picker {
        width: 98%;
        padding: 10px;
        max-height: 90vh;
    }

    .date-picker-header h2 {
        font-size: 16px;
    }

    .date-picker-header i {
        font-size: 12px;
        margin-right: 5px;
    }

    .close-picker {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .date-mode-selector {
        gap: 6px;
        padding: 3px;
    }

    .mode-btn {
        font-size: 11px;
        padding: 5px;
    }

    .calendar-container {
        padding: 10px;
    }

    .calendar-header {
        margin-bottom: 10px;
    }

    .month-year-selector {
        gap: 6px;
    }

    .month-select,
    .year-select {
        font-size: 11px;
        padding: 4px;
    }

    .calendar-nav {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .calendar-grid {
        gap: 4px;
    }

    .calendar-day-name {
        font-size: 8px;
        padding: 3px 0;
    }

    .calendar-day {
        font-size: 10px;
    }

    .calendar-day.today::before {
        font-size: 6px;
        top: -8px;
    }

    .date-picker-footer {
        margin-top: 10px;
        padding-top: 10px;
        gap: 6px;
    }

    .selected-range-display {
        font-size: 11px;
    }

    .date-picker-actions {
        gap: 4px;
    }

    .btn-clear,
    .btn-apply {
        font-size: 11px;
        padding: 5px 10px;
    }
}

@media (max-width: 320px) {
    .filter-box {
        padding: 4px 6px;
        min-width: 90px;
    }

    .filter-box i {
        font-size: 10px;
        margin-right: 4px;
    }

    .filter-display {
        font-size: 10px;
    }

    .date-picker {
        padding: 8px;
    }

    .date-picker-header h2 {
        font-size: 14px;
    }

    .date-picker-header i {
        font-size: 10px;
        margin-right: 4px;
    }

    .close-picker {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .date-mode-selector {
        gap: 4px;
        padding: 2px;
    }

    .mode-btn {
        font-size: 10px;
        padding: 4px;
    }

    .calendar-container {
        padding: 8px;
    }

    .calendar-header {
        margin-bottom: 8px;
    }

    .month-year-selector {
        gap: 4px;
        flex-wrap: wrap;
    }

    .month-select,
    .year-select {
        font-size: 10px;
        padding: 3px;
    }

    .calendar-nav {
        width: 20px;
        height: 20px;
        font-size: 8px;
    }

    .calendar-grid {
        gap: 3px;
    }

    .calendar-day-name {
        font-size: 7px;
        padding: 2px 0;
    }

    .calendar-day {
        font-size: 9px;
    }

    .calendar-day.today::before {
        font-size: 5px;
        top: -7px;
    }

    .date-picker-footer {
        margin-top: 8px;
        padding-top: 8px;
        gap: 4px;
    }

    .selected-range-display {
        font-size: 10px;
    }

    .btn-clear,
    .btn-apply {
        font-size: 10px;
        padding: 4px 8px;
    }
}