/* Shared CRM calendar (PsyCrmCalendar) — used in LK and public anketa booking */

.psy-crm-cal-host {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.psy-crm-cal {
    width: 100%;
}

.psy-crm-cal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.psy-crm-cal__title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
}

.psy-crm-cal__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.psy-crm-cal__nav:hover {
    background: var(--psy-primary-soft, rgba(154, 195, 85, 0.18));
    border-color: var(--psy-primary, #9AC355);
}

.psy-crm-cal__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.psy-crm-cal__weekday {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
    padding: 6px 0;
}

.psy-crm-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.psy-crm-cal__day {
    aspect-ratio: 1;
    min-height: 42px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}

.psy-crm-cal__day:active:not(:disabled) {
    transform: scale(0.94);
}

.psy-crm-cal__day.is-disabled,
.psy-crm-cal__day:disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.psy-crm-cal__num {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    color: inherit;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.psy-crm-cal__day.is-muted .psy-crm-cal__num {
    color: #cbd5e1;
}

.psy-crm-cal__day.is-disabled .psy-crm-cal__num,
.psy-crm-cal__day:disabled .psy-crm-cal__num {
    opacity: 0.4;
}

.psy-crm-cal__day.is-today:not(.is-selected) .psy-crm-cal__num {
    box-shadow: inset 0 0 0 2px #38BDF8;
}

.psy-crm-cal__day:hover:not(.is-selected):not(.is-disabled) .psy-crm-cal__num {
    background: var(--psy-primary-soft, rgba(154, 195, 85, 0.18));
}

.psy-crm-cal__day.is-selected .psy-crm-cal__num {
    background: var(--psy-primary, #9AC355);
    color: #fff;
}

.psy-crm-cal__dots {
    position: static;
    display: flex;
    gap: 2px;
    pointer-events: none;
    margin-top: 1px;
}

.psy-crm-cal__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

.psy-crm-cal__dot--pending { background: #FFC107; }
.psy-crm-cal__dot--approved { background: #22C55E; }
.psy-crm-cal__dot--completed { background: #1D4ED8; }
.psy-crm-cal__dot--rejected { background: #EF4444; }

.psy-crm-cal__day.is-selected .psy-crm-cal__dot--pending { background: #ffe082; }
.psy-crm-cal__day.is-selected .psy-crm-cal__dot--approved { background: #86efac; }
.psy-crm-cal__day.is-selected .psy-crm-cal__dot--completed { background: #93c5fd; }
.psy-crm-cal__day.is-selected .psy-crm-cal__dot--rejected { background: #fca5a5; }

.psy-weekends-layout .psy-crm-cal__day.is-selected .psy-crm-cal__num {
    background: #7f1d1d;
    color: #fff;
}

#anketa-booking {
    --psy-primary: var(--color-primary, #9AC355);
    --psy-primary-soft: rgba(154, 195, 85, 0.18);
    width: 100%;
    max-width: 350px;
    box-sizing: border-box;
}

#anketa-booking .anketa-content-right-item {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#anketa-booking .psy-crm-cal-host {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

#anketa-booking .psy-crm-cal,
#anketa-booking .psy-crm-cal__grid,
#anketa-booking .psy-crm-cal__weekdays {
    width: 100%;
}

#anketa-booking .psy-crm-select,
#anketa-booking .psy-crm-select--filter {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#anketa-booking .psy-crm-select__btn {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .psy-crm-cal-host {
        max-width: 100%;
    }

    #anketa-booking {
        max-width: 100%;
    }
}
