﻿.bk6-root {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px 12px 20px;
    box-sizing: border-box;
}

.bk6-shell {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 190px);
    border-radius: 28px;
    padding: 18px 18px 20px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 14px 38px rgba(15,23,42,.08);
    overflow: hidden;
    box-sizing: border-box;
}

.bk6-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.bk6-title-group {
    display: flex;
    align-items: baseline;
    gap: 18px;
}

.bk6-month {
    font-weight: 800 !important;
    text-transform: lowercase;
    margin: 0;
}

.bk6-year {
    font-weight: 700 !important;
    opacity: .9;
    margin: 0;
}

.bk6-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bk6-summary {
    margin-bottom: 14px;
}

.bk6-caption {
    opacity: .7;
    font-weight: 600;
}

.bk6-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.bk6-weekday {
    font-size: .9rem;
    font-weight: 700;
    color: rgba(15,23,42,.62);
    padding: 0 6px;
    text-align: left;
}

.bk6-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(120px, 1fr));
    gap: 8px;
    min-height: calc(100vh - 340px);
}

.bk6-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    border-radius: 22px;
    border: 1px solid rgba(15,23,42,.06);
    background: rgba(255,255,255,.98);
    padding: 10px 8px 8px;
    text-align: left;
    transition: transform .08s ease, box-shadow .12s ease, background-color .12s ease;
    min-height: 120px;
    overflow: hidden;
    box-sizing: border-box;
}

    .bk6-cell:hover:not(:disabled) {
        background: rgba(15,23,42,.02);
        box-shadow: 0 6px 18px rgba(15,23,42,.05);
    }

    .bk6-cell:active:not(:disabled) {
        transform: scale(.985);
    }

.bk6-cell--muted {
    opacity: .35;
}

.bk6-cell--today {
    box-shadow: inset 0 0 0 1px rgba(63,83,126,.30);
}

.bk6-cell__top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.bk6-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #2f3742;
    position: relative;
    z-index: 2;
}

.bk6-cell--menu .bk6-day-number {
    background: rgba(59,130,246,.14);
}

.bk6-cell--selected .bk6-day-number {
    background: #3f537e;
    color: #fff;
}

.bk6-cell__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding-top: 10px;
    padding-left: 2px;
}

.bk6-booking-pill {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    align-self: flex-start;
    max-width: calc(100% - 2px);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .bk6-booking-pill .mud-icon-root {
        font-size: 15px !important;
        flex: 0 0 auto;
    }

/* Pill prenotato / ritirato (verde) */
.bk6-booking-pill--booked {
    background: rgba(34, 197, 94, .14);
    border: 1px solid rgba(34, 197, 94, .3);
    color: #166534;
}

/* Pill non ritirato (rossa) */
.bk6-booking-pill--not-collected {
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .3);
    color: #991b1b;
}

/* Pallino colorato nella pill */
.bk6-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.bk6-pill-dot--green {
    background: #22c55e;
}

.bk6-pill-dot--red {
    background: #ef4444;
}

/* Icona menu (coltello e forchetta) */
.bk6-menu-icon {
    display: inline-flex;
    align-items: center;
    color: #1e40af;
    opacity: 0.85;
}

.bk6-menu-icon--past {
    opacity: 0.4;
}

.bk6-menu-icon .mud-icon-root {
    font-size: 16px !important;
}

/* Sfondo cella non ritirata */
.bk6-cell--not-collected {
    border-color: rgba(239, 68, 68, .25);
    background: rgba(239, 68, 68, .04);
}

.bk6-status-tag {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    background: rgba(15,23,42,.06);
    color: rgba(15,23,42,.62);
}

.bk6-cell--disabled .bk6-status-tag {
    background: rgba(239,68,68,.10);
    color: rgba(185,28,28,.8);
}

.bk6-selection-panel {
    margin-top: 14px;
    border-radius: 20px;
    padding: 16px 18px;
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(15,23,42,.06);
}

.bk6-selection-title {
    font-weight: 700 !important;
    text-transform: lowercase;
    margin-bottom: 4px;
}

.bk6-selection-info {
    opacity: .78;
}

@media (max-width: 1100px) {
    .bk6-grid {
        grid-template-rows: repeat(6, minmax(100px, 1fr));
        min-height: auto;
        gap: 6px;
    }

    .bk6-cell {
        min-height: 100px;
        border-radius: 18px;
        padding: 8px 6px;
    }

    .bk6-day-number {
        min-width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }

    .bk6-booking-pill {
        font-size: .74rem;
        padding: 4px 8px;
    }
}

@media (max-width: 768px) {
    .bk6-root {
        padding: 6px 8px 16px;
    }

    .bk6-shell {
        padding: 14px 12px 14px;
        border-radius: 22px;
    }

    .bk6-title-group {
        gap: 10px;
    }

    .bk6-month {
        font-size: 1.8rem !important;
    }

    .bk6-year {
        font-size: 1.2rem !important;
    }

    .bk6-weekday {
        font-size: .8rem;
        padding: 0 4px;
    }

    .bk6-grid {
        grid-template-rows: repeat(6, minmax(88px, 1fr));
        gap: 5px;
    }

    .bk6-cell {
        min-height: 88px;
        border-radius: 16px;
        padding: 7px 5px;
    }

    .bk6-day-number {
        min-width: 30px;
        height: 30px;
        font-size: 1rem;
        padding: 0 10px;
    }

    .bk6-cell__body {
        padding-top: 8px;
        gap: 4px;
    }

    .bk6-booking-pill {
        font-size: .68rem;
        padding: 3px 7px;
    }

        .bk6-booking-pill .mud-icon-root {
            font-size: 13px !important;
        }
}
