.custom-calendar {
    max-width: 100%;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 10px;
    font-family: sans-serif;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.calendar-header span {
    font-weight: bold;
    font-size: 1.2em;
}

.calendar-nav {
    color: #555555;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    margin: 5px;
}

.calendar-nav:hover {
    color: #333333 ;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    font-weight: bold;
    background-color: #f0f0f0;
    padding: 10px 0;
    text-align: center;
    border-radius: 6px;
    font-size: 14px;
    word-break: break-word;
}

.calendar-cell {
    height: 50px;
    text-align: center;
    font-size: 14px;
    position: relative;
    background-color: transparent;
    border-radius: 20px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Inner circle (for active/highlighted day) */
.gls-highlight .calendar-inner {
    /* background-color: #ff9800; */
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    line-height: 40px;
    margin: 0 auto;
    text-align: center;
    font-size: 14px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty cells */
.calendar-cell.empty {
    background: transparent;
    box-shadow: none;
}

/* Highlighted cell (outside circle background) */
.calendar-cell.gls-highlight {
    /* background-color: #fcdfb5; */
    color: #5d4037;
    font-weight: bold;
}

/* Connected streak styles */
.calendar-cell.streak-start {
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: -3px;
}

.calendar-cell.streak-middle {
    border-radius: 0;
    margin-right: -3px;
    margin-left: -3px;
}

.calendar-cell.streak-end {
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -3px;
}

.calendar-cell.streak-single {
    border-radius: 25px;
}

/* Spinner loader */
.calendar-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #ccc;
    border-top-color: #333333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Optional fade effect for the whole calendar */
.loading-calendar {
    opacity: 0.5;
    pointer-events: none;
}


/* RESPONSIVE BREAKPOINTS */
@media (max-width: 768px) {
    .calendar-header {
        align-items: flex-start;
        gap: 10px;
    }

    .calendar-day,
    .calendar-cell {
        font-size: 12px;
        height: 40px;
    }

    .gls-highlight .calendar-inner {
        width: 40px;
        height: 40px;
        font-size: 12px;
        line-height: 40px;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        gap: 4px;
    }

    .calendar-day,
    .calendar-cell {
        font-size: 11px;
        height: 35px;
    }

    .gls-highlight .calendar-inner {
        width: 35px;
        height: 35px;
        font-size: 11px;
        line-height: 35px;
    }
}
