/* ===== Calendar4Months ===== */

.cal4m-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.cal4m-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.075);
    border-radius: 10px;
    overflow: hidden;
}

.cal4m-view-toggle .btn {
    white-space: normal;
    line-height: 1.1;
}

.cal4m-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(0,0,0,.08);
}

@media (max-width: 576px) {
    .cal4m-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cal4m-view-toggle {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .cal4m-view-toggle .btn {
        width: 100%;
        flex: 0 0 auto;
        border-radius: .375rem !important;
    }
}

/* ===== CalendarMonth ===== */

.cal-month-header {
    padding: 10px 12px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    padding: 10px;
}

.cal-dow {
    text-align: center;
    font-size: .75rem;
    color: #6c757d;
    padding: 2px 0 6px 0;
    user-select: none;
}

.cal-cell {
    position: relative;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 6px;
    min-height: 54px;
    padding: 4px;
    overflow: hidden;
    background: #fff;
}

.cal-empty {
    border: none;
    background: transparent;
    min-height: 54px;
}

.cal-daynum {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: .65rem;
    color: rgba(0,0,0,.55);
    z-index: 3;
}

/* Slightly larger text in cells */
.cal-celltext {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    text-align: center;
    font-size: .82rem;
    line-height: 1.1;
    color: rgba(0,0,0,.75);
    word-break: break-word;
}

.cal-subtext {
    font-size: .72rem;
    color: rgba(0,0,0,.55);
    margin-top: 2px;
}

.cal-text-onfill {
    color: #fff;
}

.cal-text-bold {
    font-weight: 700;
}

.cal-unavailable {
    background: #efefef;
}

/* Page position colors (best => worst) */
.cal-pos-best {
    background: var(--colorLogo);
    color: #fff;
}

.cal-pos-high {
    background: rgba(255, 107, 107, 0.92);
    color: #fff;
}

.cal-pos-avg {
    background: rgba(255, 159, 159, 0.9);
}

.cal-pos-low {
    background: rgba(255, 201, 201, 0.9);
}

.cal-pos-worst {
    background: rgba(255, 230, 230, 0.9);
}

/* Competitor pricing colors (very low => very high) */
.cal-price-vlow {
    background: #ffe6e6;
}

.cal-price-low {
    background: #ffc9c9;
}

.cal-price-avg {
    background: #ff9f9f;
}

.cal-price-high {
    background: #ff6b6b;
    color: #fff;
}

.cal-price-vhigh {
    background: var(--colorLogo);
    color: #fff;
}

/* Area occupancy fill */
.cal-cell-fill {
    background: #fff;
}

.cal-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0%;
    z-index: 1;
    border-radius: 0 0 6px 6px;
    pointer-events: none;
}

.cal-occ-vlow {
    background: rgba(255, 230, 230, 0.9);
}

.cal-occ-low {
    background: rgba(255, 201, 201, 0.9);
}

.cal-occ-avg {
    background: rgba(255, 159, 159, 0.9);
}

.cal-occ-high {
    background: rgba(255, 107, 107, 0.92);
}

.cal-occ-vhigh {
    background: var(--colorLogo);
}

@media (max-width: 576px) {
    .cal-month-grid {
        gap: 2px;
        padding: 8px;
    }

    .cal-cell {
        min-height: 54px;
        padding: 3px;
    }

    .cal-celltext {
        font-size: .78rem;
    }

    .cal-subtext {
        font-size: .7rem;
    }
}

/* ===== CommMapa ===== */

.cal4m-map-wrap {
    height: 260px;
    border: 1px solid rgba(0,0,0,.075);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.cal4m-map-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.cal4m-metric {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
}

.cal4m-metric-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(0,0,0,.65);
}

.cal4m-metric-body {
    min-width: 0;
}

.cal4m-metric-value {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.1;
}

.cal4m-metric-label {
    color: #6c757d;
    font-size: .9rem;
}

.cal4m-info-btn {
    border: 0;
    background: transparent;
    padding: 0;
    color: rgba(0,0,0,.5);
    line-height: 1;
}

.cal4m-info-btn:hover {
    color: rgba(0,0,0,.75);
}

@media (max-width: 576px) {
    .cal4m-map-wrap {
        height: 220px;
    }
}