body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f0f0f0;
}

#calendar-container {
    max-width: 900px;
    width: 100%;
    height: auto;
    margin: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 25px 15px;
    box-sizing: border-box;
}



.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin-bottom: 25px;
    padding: 0 15px;
}

#calendar-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.8rem;
    pointer-events: none;
}

header h2 {
    font-size: 2rem;
    margin: 0;
}

header a {
    font-size: 2.2rem;
    color: #007bff;
    padding: 0 20px;
    cursor: pointer;
    text-decoration: none;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

#calendar.dimmed {
    opacity: 0.7;
    pointer-events: none;
}

.day {
    height: 80px;
    padding: 6px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #ddd;
    box-sizing: border-box;
    transition: all 0.2s ease;
    border-radius: 10px;
    background-color: #fff;
}

.day:hover {
    background-color: #d9e7ff;
    transform: scale(1.03);
}

.day.header {
    background-color: #e0e0e0;
    font-weight: bold;
    font-size: 1rem;
    color: #444;
    cursor: default;
}

.day-number {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
}

.bikes-info {
    font-size: 12px;
    line-height: 1.2;
    min-height: 1em;
    color: #444;
}

.day.available {
    background-color: #e6fffb;
    cursor: pointer;
}

.day.partial {
    background-color: #ffe58f;
    cursor: pointer;
}

.day.unavailable {
    background-color: #ffd6d6;
    text-decoration: line-through;
}

.day.disabled {
    opacity: 0.4;
    filter: grayscale(0.4);
    pointer-events: none;
    cursor: not-allowed;
    background-color: #f2f2f2;
    color: #999;
}

.day.available.disabled {
    background-color: #e6fffb !important;
}

.day.partial.disabled {
    background-color: #ffe58f !important;
}

.day.unavailable.disabled {
    background-color: #ffd6d6 !important;
    /* keep it red */
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.6;
}

.day.selected {
    background-color: #1a73e8;
    color: #fff;
    font-weight: bold;
    border: 2px solid #0c4aad;
    box-shadow: 0 0 10px rgba(26, 115, 232, 0.5);
}

.day.in-range {
    background-color: #cce5ff;
    color: #003c78;
}

.day.prev-month,
.day.next-month {
    background-color: #f9f9f9;
    opacity: 0.7;
}

.day.prev-month:hover,
.day.next-month:hover {
    background-color: #e6f0ff;
}

#prev,
#next {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    background-color: #e6f0ff;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    z-index: 1;
    /* Keep clickable above centered title */
}

/* === Responsive (Mobile) === */
@media (pointer: coarse) {
    .calendar-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 10px;
    }

    #calendar-title {
        font-size: 1.5rem;
    }

    #prev,
    #next {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .day {
        height: auto;
        min-height: 60px;
        font-size: 12px;
        padding: 6px 4px;
    }

    .day-number {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .bikes-info {
        font-size: clamp(7px, 2vw, 12px);
        line-height: 1.1;
        word-break: break-word;
    }

    .bikes-info div {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .day:hover {
        transform: none;
    }
}

@media (pointer: coarse) and (orientation: landscape) {
    #calendar-container {
        max-width: 100%;
        padding: 30px 20px;
    }

    #calendar {
        gap: 8px;
    }

    .day {
        min-height: 90px;
        font-size: 14px;
        padding: 8px 6px;
    }

    .day-number {
        font-size: 16px;
    }

    .bikes-info {
        font-size: clamp(8px, 1.5vw, 10px);
    }

    header h2 {
        font-size: 1.8rem;
    }

    header a {
        font-size: 2rem;
    }
}