.papex-wrap {
    font-family: Arial, sans-serif;
}

/* =========================
   FILTER (ГРУППЫ)
========================= */

.papex-group-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.papex-filter-btn {
    padding: 6px 10px;
    border: 2px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    border-radius: 5px;
    transition: 0.2s;
      font-family: 'Roboto';
}

.papex-filter-btn.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

/* =========================
   CALENDAR GRID (DESKTOP)
========================= */

.papex-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.papex-cell {
    min-height: 110px;
    border: 1px solid #e1e1e1;
    padding: 6px;
    background: #fff;
    border-radius: 6px;
    position: relative;
}

.papex-date {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 4px;
    color: #333;
}

/* =========================
   EVENTS
========================= */

.papex-event {
    font-size: 11px;
    margin-top: 4px;
    padding: 5px;
    border-radius: 5px;

    background: rgba(52, 152, 219, 0.12);
    border-left: 6px solid #3498db;

    transition: 0.2s;
}

.papex-event:hover {
    transform: scale(1.01);
}

.papex-time {
    font-weight: bold;
    font-size: 11px;
}

.papex-title {
    font-size: 11px;
    margin-top: 2px;
}

.papex-meta {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 2px;
}

/* =========================
   DOT (индикатор событий)
========================= */

.papex-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3498db;
    margin-top: 4px;
}

/* =========================
   TABLET
========================= */

@media (max-width: 1024px) {

    .papex-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .papex-cell {
        min-height: 120px;
    }
}

/* =========================
   MOBILE (KEY UX CHANGE)
   grid остаётся, но события скрываются
========================= */

@media (max-width: 768px) {

    .papex-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
    }

    .papex-cell {
        min-height: 70px;
        padding: 4px;
    }

    .papex-date {
        font-size: 11px;
        text-align: center;
    }

    /* события скрыты по умолчанию 
    .papex-events {
        display: none;
        margin-top: 6px;
    }
*/
    /* раскрытие */
    .papex-cell.active .papex-events {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        z-index: 10;
        background: #fff;
        border: 1px solid #ddd;
        padding: 6px;
        border-radius: 6px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .papex-dot {
        margin: 4px auto 0 auto;
    }

    .papex-event {
        font-size: 12px;
    }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 420px) {

    .papex-filter-btn {
        font-size: 11px;
        padding: 5px 8px;
    }

    .papex-event {
        font-size: 11px;
    }
}



/* MULTI DOTS */
.papex-dots {
    display: flex;
    gap: 3px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.papex-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* кругляшок из события */
.papex-event {
    
    border-color: rgb(155, 89, 182);
    /* width: 6px; */
    width: 8px;
    height: 8px;
    border-radius: 50%;
    /* border: 0px; */
    border: solid 5px #ff0000;
    
}

.papex-time, .papex-title, .papex-meta {     display: none;}


/* MODAL */
.papex-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.papex-modal.active {
    display: flex;
}

.papex-modal-content {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    min-width: 260px;
    max-width: 90%;
}

.papex-modal-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.papex-close {
    margin-top: 10px;
    padding: 6px 10px;
    cursor: pointer;
}