.calendar-container {
    max-width: 400px;
    margin: 20px auto;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calendar-header {
    background: #beab93;
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    border-top: 1px solid #e9ecef;
    border-left: 1px solid #e9ecef;
    border-right: 1px solid #e9ecef;
}

h2.calendar-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    padding: 0;
    line-height: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-button:hover,
.nav-button:active,
.nav-button:focus {
    background: rgba(255, 255, 255, 0.3);
}

.prev-button {
    left: 15px;
}

.next-button {
    right: 15px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff;
}

.day-header {
    background: #f8f9fa;
    padding: 15px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
}

.day-header:first-of-type {
    border-left: 1px solid #e9ecef;
}

.day-header:last-of-type {
    border-left: 1px solid #e9ecef;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    position: relative;
    font-size: 0.95em;
    font-weight: 500;
}

.day-cell:hover {
    background: #f8f9fa;
}

.day-cell.current-day {
    background: #724623;
    color: white;
    font-weight: 600;
}

.day-cell.other-month {
    color: #bbb;
    background: #fafafa;
}

.day-cell.other-month:hover {
    background: #f0f0f0;
}

.calendar-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.day-cell.has-events {
    border: 2px solid #beab93;
    color: #beab93;
    font-weight: 600;
    position: relative;
    cursor: pointer;
}

.day-cell.has-events:hover {
    background: #beab93;
    color: #fff;
}

.day-cell.has-events::after {
    content: "";
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    background: #beab93;
    border-radius: 50%;
}

.day-cell.has-events.current-day {
    background: #724623;
    color: white;
    border-color: #724623;
}

.day-cell.has-events.current-day::after {
    background: white;
}

.events-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
}

.event-item {
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.event-item:last-child {
    margin-bottom: 0;
}

.event-title {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.event-dates {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

.loading-events {
    padding: 20px;
    text-align: center;
    color: #666;
}

@media (max-width: 480px) {
    .calendar-container {
        max-width: 100%;
        margin: 0;
        border-radius: 8px;
    }

    .calendar-header {
        padding: 15px;
    }

    .calendar-title {
        font-size: 1.2em;
    }

    .nav-button {
        width: 35px;
        height: 35px;
        font-size: 1.1em;
    }

    .day-header {
        padding: 12px 4px;
        font-size: 0.8em;
    }

    .day-cell {
        font-size: 0.9em;
    }
}
