/* Calendar - Modern minimalist design */

body {
    background: #f0f0f0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Month navigation inside calendar */
.calendar-month-nav {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding:0 16px 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    height: 60px;
    flex-wrap: nowrap;
    justify-content:center
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #666;
    font-size: 13px;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: #e5e5e5;
}

.today-btn {
    width: auto;
    padding: 0 12px;
    font-weight: 500;
    font-size: 12px;
    gap: 4px;
}

.month-year {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-right: auto;
    margin: 0;
    white-space: nowrap;
    width: 200px;
    text-align: center;
}

/* Main layout */
.calendar-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

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

.weekday-header {
    padding: 8px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    height: 32px;
    max-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weekday-header.weekend {
    color: #E84A5F;
}

.calendar-day {
    min-height: 120px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: #fff;
    border-radius: 8px;
    gap: 3px;
}

.calendar-day:hover {
    opacity: 0.7
}

.calendar-day.other-month {
    opacity: 0.4;
    pointer-events: none
}

.calendar-day.past {
    pointer-events: none;
    opacity: 0.5;
}

.calendar-day.today {
    outline: 2px solid #ffce82;
    outline-offset: 2px
}

.calendar-day.today .day-number {
    color: #dea854;
    font-weight: 900;
    transform: scale(1.3);
    width: min-content
}

.calendar-day.weekend {
    background: #ff00001f;
}

.calendar-day.weekend .day-number {
    color: #E84A5F;
}

.day-number {
    font-size: 42px;
	font-weight: 900;
	color: #b0b8bb;

	position: absolute;
	opacity: 0.4;
	line-height: 1;
}
.calendar-day:has(.day-event) {
    .day-number {
        position: relative;
        opacity: 1;
        font-size: 13px;
        font-weight: 600

    }
}
.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day-event {
    font-size: 10px;
    padding: 2px 0;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.1;
    word-wrap: break-word;
    font-weight: 500;
    display: inline;
    gap: 3px;
    flex-wrap: nowrap;
}

.day-event > * {
    display: inline !important;
    margin-right: 4px;
}

.day-event:hover {
    color: #3b82f6;
}

.day-event.priority {
    color: #92400E;
    font-weight: 700;
}

.day-event.priority:before {
    content: "! ";
    color: #F59E0B;
}

.day-event.more {
    color: #999;
    font-style: italic;
    font-weight: 400;
}

/* Events sidebar */
.events-sidebar {

    max-height: calc(100vh - 40px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    position: sticky;
    top: 0;
    background: #f0f0f0
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.sidebar-actions {
    display: flex;
    gap: 6px;
    margin-left: auto
}

.sidebar-actions .btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 6px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.date-group-header {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: #333;
    padding: 12px 10px 6px 10px;
    margin-top: 8px;
    margin-bottom: 8px;
    border-bottom: 2px solid #e5e5e5;
}

.date-group-header:first-child {
    margin-top: 0;
}

.event-card {
    padding: 8px 0;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #fff;
	margin-bottom: 4px;
	padding: 5px 10px;
	border-radius: 6px;
}



.event-card.priority {
    background: #ffd70057;
}

.event-info {
    flex: 1;
    min-width: 0;
}

.event-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.event-date {
    font-size: 11px;
    font-weight: 600;
    color: #666;
}

.event-time {
    font-size: 14px;
    color: #999;
    font-weight: 500;
    color: #dea854
}

.event-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;

}

.event-card.priority .event-title {
    color: #92400E;
    font-weight: 600;
}

.event-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.event-actions .action-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #999;
}

.event-actions .action-btn:hover {
    color: #666;
    background: #f5f5f5;
}

.no-events {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* Custom scrollbar for sidebar */
.events-sidebar::-webkit-scrollbar {
    width: 6px;
}

.events-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.events-sidebar::-webkit-scrollbar-thumb {
    background: #e5e5e5;
    border-radius: 3px;
}

.events-sidebar::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Mobile FAB (Floating Action Button) - Hidden on desktop */
.mobile-fab-container {
    display: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .calendar-layout {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 1024px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }

    .events-sidebar {
        max-height: 400px;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {
    /* Hide sidebar on mobile */
    .events-sidebar {
        display: none;
    }

    /* Show mobile FAB */
    .mobile-fab-container {
        display: block;
        position: fixed;
        bottom: 24px;
        right: 24px;
        z-index: 1000;
    }

    .mobile-fab {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        border: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        transition: all 0.3s;
        position: relative;
        z-index: 1001;
    }

    .mobile-fab:active {
        transform: scale(0.95);
    }

    .mobile-fab.active {
        transform: rotate(45deg);
        background: linear-gradient(135deg, #EF4444, #DC2626);
    }

    .mobile-fab-menu {
        position: absolute;
        bottom: 70px;
        right: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s;
        z-index: 1000;
    }

    .mobile-fab-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-fab-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        background: white;
        border: none;
        border-radius: 28px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        color: #1a1a1a;
        text-decoration: none;
        transition: all 0.2s;
        white-space: nowrap;
        min-width: 180px;
        justify-content: flex-start;
        text-align: left
    }

    .mobile-fab-item:active {
        transform: scale(0.98);
    }

    .mobile-fab-item i {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: var(--primary);
    }

    .mobile-fab-item span {
        flex: 1;
    }

    .calendar-layout {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 8px;
    }

    .calendar-layout {
        gap: 12px;
    }

    /* Navigation */
    .calendar-month-nav {
        height: 56px;
        padding: 12px 8px;
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: center;
    }

    .month-year {
        font-size: 14px;
        width: 140px;
        text-align: center;
        flex-shrink: 0;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 11px;
        flex-shrink: 0;
    }

    .today-btn {
        padding: 0 10px;
        font-size: 10px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Hide weekday headers */
    .weekday-header {
        display: none;
    }

    /* Convert calendar grid to list */
    .calendar-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    /* Hide other month days */
    .calendar-day.other-month {
        display: none;
    }

    /* Style days as list items */
    .calendar-day {
        min-height: auto;
        padding: 16px 12px;
        gap: 8px;
        flex-direction: row;
        align-items: flex-start;
        border-radius: 0;
        border-bottom: 1px solid #f0f0f0;
        background: white !important;
    }

    .calendar-day.today {
        background: #fff7ed !important;
        outline: none;
        border-left: 4px solid #ffce82;
    }

    .calendar-day.weekend {
        background: white !important;
    }

    /* Day number on left */
    .day-number {
        font-size: 32px;
        font-weight: 800;
        min-width: 50px;
        text-align: center;
        position: relative;
        opacity: 1;
        color: #333;
    }

    .calendar-day:has(.day-event) .day-number {
        font-size: 32px;
        font-weight: 800;
        position: relative;
        opacity: 1;
    }

    .calendar-day.weekend .day-number {
        color: #E84A5F;
    }

    /* Events list on right */
    .day-events {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .day-event {
        font-size: 14px;
        padding: 8px 10px;

        border-radius: 6px;
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .event-time-small {
        font-size: 13px;
        font-weight: 600;
        color: #bb6f41;
        min-width: 45px;
    }

    .event-title-small {
        font-size: 14px;
        font-weight: 500;
        flex: 1;
    }

    .day-event.priority {
        background: #ffd70057;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 4px;
    }

    .calendar-layout {
        gap: 8px;
    }

    /* Navigation - more compact on smaller screens */
    .calendar-month-nav {
        height: 52px;
        padding: 10px 6px;
        gap: 6px;
        flex-wrap: nowrap;
        justify-content: center;
        top: 0;
        position: sticky;
        backdrop-filter: blur(10px);
        z-index: 3
    }

    .month-year {
        font-size: 13px;
        width: 115px;
        text-align: center;
        flex-shrink: 0;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }

    .today-btn {
        padding: 0 8px;
        font-size: 9px;
        flex-shrink: 0;
        width: auto
    }

    /* List view - same as 768px */
    .weekday-header {
        display: none;
    }

    .calendar-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .calendar-day.other-month {
        display: none;
    }

    .calendar-day {
        min-height: auto;
        padding: 14px 10px;
        gap: 6px;
        flex-direction: row;
        align-items: flex-start;
        border-radius: 0;
        border-bottom: 1px solid #f0f0f0;
        background: white !important;
    }

    .calendar-day.today {
        background: #fff7ed !important;
        outline: none;
        border-left: 4px solid #ffce82;
    }

    .calendar-day.weekend {
        background: white !important;
    }

    .day-number {
        font-size: 28px;
        font-weight: 800;
        min-width: 45px;
        text-align: center;
        position: relative;
        opacity: 1;
        color: #333;
    }

    .calendar-day:has(.day-event) .day-number {
        font-size: 28px;
        font-weight: 800;
        position: relative;
        opacity: 1;
    }

    .calendar-day.weekend .day-number {
        color: #E84A5F;
    }

    .day-events {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .day-event {
        font-size: 13px;
        padding: 7px 9px;
        border-radius: 5px;
        display: flex;
        align-items: baseline;
        gap: 6px;
    }

    .event-time-small {
        font-size: 12px;
        font-weight: 600;
        color: #bb6f41;
        min-width: 40px;
    }

    .event-title-small {
        font-size: 13px;
        font-weight: 500;
        flex: 1;
    }

    .day-event.priority {
        background: #ffd70057;
    }
}
