/* Clean Calendar Grid Styles - Blank cells for other months */

/* Calendar Header */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    background-color: #f5fcff;
}

.calendar-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-button:hover {
    background-color: #f5f5f5;
    color: #333333;
}

.month-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.today-button {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 50px;
    background-color: #f5fcff;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.today-button:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

/* Calendar Weekdays Header */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 120px);
    background-color: #f0f7fa80;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 8px 8px 0 0;
    width: 100%;
}

.weekday {
    padding: 12px 8px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #f0f0f0;
    background-color: #F6F7F980;
}

.weekday:first-child {
    border-top-left-radius: 8px;
}

.weekday:last-child {
    border-top-right-radius: 8px;
    border-right: none;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 120px);
    background-color: #f5fcff;
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 8px 8px;
    width: 100%;
}

.calendar-date {
    height: 120px;
    width: 120px;
    padding: 12px 8px;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.calendar-date:nth-child(7n) {
    border-right: none;
}

.calendar-date:hover {
    background-color: #F6F7F980;
}

/* Blank cells styling */
.calendar-date.blank {
    background-color: #F6F7F980;
    cursor: default;
}

.calendar-date.blank:hover {
    background-color: #F6F7F980;
}

/* Blank cells in the first row should have same background as date cells */
.calendar-grid .calendar-date.blank:nth-child(-n+7) {
    background-color: transparent;
}

.calendar-grid .calendar-date.blank:nth-child(-n+7):hover {
    background-color: transparent;
}

/* Date styling */
.date-number {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
    text-align: center;
}

/* Today highlighting - blue text color */
.calendar-date.today {
    background-color: #f5fcff;
}

.calendar-date.today .date-number {
    color: #1976d2 !important;
    font-weight: 600 !important;
}

.calendar-date.today:hover {
    background-color: #F6F7F980;
}

/* Other month styling (should not appear with blank cells) */
.calendar-date.other-month {
    background-color: transparent;
    color: #999999;
}

.calendar-date.other-month .date-number {
    color: #cccccc;
}

.calendar-date.other-month:hover {
    background-color: #d0e1e6;
}

/* Weekend styling */
.calendar-date.weekend {
    background-color: transparent;
}

.calendar-date.weekend:hover {
    background-color: #F6F7F980;
}

/* Event indicators */
.event-indicators {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding-top: 4px;
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #666666;
}

.event-more {
    font-size: 0.625rem;
    color: #666666;
    text-align: center;
    margin-top: 2px;
}

/* Clean grid borders - remove bottom borders from last row */

.calendar-grid .calendar-date:nth-last-child(-n+7) {
    border-bottom: none;
}

/* Remove all bottom borders from calendar grid cells to match Figma design */
.calendar-grid .calendar-date {
    border-bottom: none;
}

/* Mobile responsive - hide calendar grid content */
@media (max-width: 768px) {
    /* Hide all calendar grid content on mobile */
    .calendar-header,
    .calendar-weekdays,
    .calendar-grid {
        display: none !important;
    }
}

@media (max-width: 480px) {
    /* Ensure calendar grid content is hidden on small mobile screens */
    .calendar-header,
    .calendar-weekdays,
    .calendar-grid {
        display: none !important;
    }
}

/* Focus styles for accessibility */
.calendar-date:focus,
.nav-button:focus,
.today-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Animation for smooth transitions */
.calendar-date {
    transition: all 0.2s ease;
}

.calendar-date:hover:not(.blank) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Clean minimal styling */
.calendar-container {
    background-color: #f5fcff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px 0 0 0;
    width: fit-content;
    margin: 0 auto;
}

/* Ensure the calendar grid and weekdays have proper rounded corners */
.calendar-weekdays {
    border-radius: 8px 8px 0 0;
}

.calendar-grid {
    border-radius: 0 0 8px 8px;
}

/* Remove default margins and ensure clean layout */
.calendar-grid * {
    box-sizing: border-box;
}

/* Remove any blue borders or outlines */
.calendar-date:focus,
.calendar-date:active {
    outline: none;
    border: 1px solid #f0f0f0;
}

/* Remove any blue lines or borders from calendar dates */
.calendar-date {
    border-left: none;
    border-top: none;
}

/* Ensure no blue borders on any calendar elements */
.calendar-date * {
    border-color: #f0f0f0 !important;
}

/* Remove any blue focus rings or outlines */
.calendar-date:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Completely remove all blue lines and borders */
.calendar-date,
.calendar-date *,
.calendar-date::before,
.calendar-date::after {
    border-color: #f0f0f0 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Remove any blue borders from all states */
.calendar-date:focus,
.calendar-date:active,
.calendar-date:hover,
.calendar-date:visited {
    border-color: #f0f0f0 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Force remove any blue styling from calendar grid */
.calendar-grid,
.calendar-grid * {
    border-color: #f0f0f0 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Nuclear option - remove ALL blue styling */
.calendar-container * {
    border-color: #f0f0f0 !important;
    outline: none !important;
    box-shadow: none !important;
    color: inherit !important;
}

/* Override nuclear option for today's date */
.calendar-date.today .date-number {
    color: #1976d2 !important;
    font-weight: 600 !important;
}

/* Remove any blue from pseudo-elements */
.calendar-date::before,
.calendar-date::after {
    border-color: #f0f0f0 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Override any browser default blue styling */
.calendar-date {
    border: 1px solid #f0f0f0 !important;
    border-left: none !important;
    border-top: none !important;
}

/* Ensure consistent spacing */
.calendar-date {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

/* Clean typography */
.calendar-date .date-number {
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

/* Subtle hover effects */
.calendar-date:hover:not(.blank) .date-number {
    color: #1a1a1a;
    font-weight: 500;
}

/* Ensure proper grid layout */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 120px);
    width: 100%;
}

/* Clean borders */
.calendar-weekdays {
    border: 1px solid #f0f0f0;
    border-bottom: none !important;
    border-right: none !important;
}

.calendar-grid {
    border-top: 1px solid #f0f0f0;
    border-bottom: none !important;
    border-right: none !important;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Force remove all borders from calendar containers */
.calendar-container .calendar-weekdays,
.calendar-container .calendar-grid {
    border-right: none !important;
    border-bottom: none !important;
}

/* Force remove borders from all calendar date cells in last column and last row */
.calendar-date:nth-child(7n) {
    border-right: none !important;
}

.calendar-date:nth-last-child(-n+7) {
    border-bottom: none !important;
}

/* Add bottom border radius to bottom-left and bottom-right corners */
.calendar-date:nth-last-child(7) {
    border-bottom-left-radius: 8px;
}

.calendar-date:nth-last-child(1) {
    border-bottom-right-radius: 8px;
}
