﻿.calendar {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 12px;
}

/* Nagłówki dni tygodnia */
.dow {
    font-weight: 600;
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.weekend {
    color: #ef4444;
}

/* Komórka dnia: 20% (numer) + 40% (rano) + 40% (popołudnie) */
.day {
    position: relative;
    display: grid;
    grid-template-rows: 20% 1fr 1fr;
    padding: 6px 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    min-height: 220px;
    overflow: hidden;
    transition: box-shadow .12s ease, background-color .12s ease;
    cursor: pointer;
}

    .day.outside {
        opacity: .45;
    }

/* Numer dnia (górny wiersz) */
.day-number {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 10px;
    font-weight: 800;
    font-size: 14px;
    color: #0f172a;
}


/* Dla dni z przeszłości ukryj tooltip */
.day.past:hover::after {
    opacity: 0;
}

/* Pigułki pór (tylko informacyjne, nieklikalne) */
.period {
    margin: 2px 10px;
    height: calc(100% - 30px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px;
    background: #f8fafc;
    color: #0f172a;
    transition: none; /* wyłączone animacje hover */
}

    .period .period-label {
        font-weight: 700;
    }

    .period .period-count {
        opacity: .9;
    }

/* Odstępy między pigułkami */
.day .period:first-of-type {
    margin-top: 0;
}

.day .period + .period {
    margin-top: 6px;
}

.day .period:last-of-type {
    margin-bottom: 0;
}

/* Kolorystyka „wolne” / „pełne” */
.period-free {
    background: #dcfce7;
    border-color: #86efac;
    color: #14532d;
}

.period-full {
    background: #e5e7eb;
    border-color: #cbd5e1;
    color: #334155;
}

/* Responsywność */
@media (max-width:1100px) {
    .calendar {
        gap: 8px;
    }

    .day {
        min-height: 180px;
        border-radius: 10px;
    }

    .period {
        font-size: 12px;
        padding: 8px 10px;
    }

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

/* Dni z przeszłości — nieaktywne */
.day.past {
    opacity: .5;
    filter: grayscale(40%);
    pointer-events: none; /* wyłącza hover/klik całej komórki */
    cursor: not-allowed;
}

/* Dzień bieżący – delikatne tło + obwódka */
.day.today {
    background: #f3f8ff; /* lekko niebieskie tło */
    border-color: #93c5fd; /* delikatna niebieska ramka */
    box-shadow: 0 0 0 2px #dbeafe inset; /* miękki ring wewnątrz */
}


.month-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 16px;
}

    .month-controls strong {
        font-size: 1.1rem;
        font-weight: 600;
        letter-spacing: .2px;
        min-width: 12ch;
        text-align: center;
    }

    .month-controls .btn {
        appearance: none;
        border: 1px solid #dbe3ea;
        background: #fff;
        padding: .35rem .55rem;
        border-radius: 8px;
        cursor: pointer;
        box-shadow: 0 1px 2px rgba(0,0,0,.05);
    }

        .month-controls .btn:hover {
            background: #f8fafc;
            border-color: #cfd9e2;
        }

        .month-controls .btn:active {
            transform: translateY(1px);
        }


.day.past {
    opacity: .5;
    filter: grayscale(40%);
    pointer-events: none; /* NIC w środku nie reaguje na klik */
    cursor: not-allowed;
}