/* Isolate the calendar from CRM table and form rules. */
.crm-app .crm-calendar {
    width: 320px;
    min-width: 0;
    max-width: calc(100vw - 24px);
    padding: 12px;
    border: 1px solid var(--crm-line, #e7e8eb);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(24 27 35 / 10%);
    color: var(--crm-ink, #25272d);
    font: 400 12px/1.5 Estedad, sans-serif;
}
.crm-app .crm-calendar * { box-sizing: border-box; color: inherit; }
.crm-app .crm-calendar button {
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-shadow: none;
    box-shadow: none;
}
.crm-app .crm-calendar button:focus-visible { outline: 2px solid #5e6ad2; outline-offset: -2px; }
.crm-app .crm-calendar button:hover { background: #f5f6f6; color: #25272d; }
.crm-app .crm-calendar svg { width: 16px; height: 16px; pointer-events: none; vertical-align: middle; }
.crm-app .crm-calendar .datepicker-navigator { display: flex; align-items: center; direction: ltr; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #e7e8eb; }
.crm-app .crm-calendar .datepicker-navigator .pwt-btn { float: none; margin: 0; height: 36px; line-height: 36px; width: 36px; flex-shrink: 0; font-weight: 500; }
.crm-app .crm-calendar .datepicker-navigator .pwt-btn-switch { flex: 1; width: auto; }
.crm-app .crm-calendar .month-grid-box { margin: 8px 0; min-height: 0; }
.crm-app .crm-calendar .header-row { height: 28px; }
.crm-app .crm-calendar .header-row-cell { width: calc(100% / 7); height: 28px; line-height: 28px; font-size: 11px; font-weight: 400; color: #686d78; }
.crm-app .crm-calendar table { width: 100%; min-width: 0; margin: 0; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.crm-app .crm-calendar tr, .crm-app .crm-calendar th, .crm-app .crm-calendar td { border: 0; background: transparent; text-align: center; }
.crm-app .crm-calendar tr:hover td { background: transparent; }
.crm-app .crm-calendar .table-days td { height: 36px; padding: 2px; width: calc(100% / 7); font-weight: 400; }
.crm-app .crm-calendar .crm-calendar-day { display: block; width: 100%; height: 32px; line-height: 32px; }
.crm-app .crm-calendar .crm-calendar-day.other-month { color: #8a8f98; }
.crm-app .crm-calendar .table-days td.today .crm-calendar-day { box-shadow: inset 0 0 0 1px #5e6ad2; color: #4c56ad; }
.crm-app .crm-calendar .table-days td.selected .crm-calendar-day,
.crm-app .crm-calendar .month-item.selected,
.crm-app .crm-calendar .year-item.selected { background: #5e6ad2; color: #fff; text-shadow: none; }
.crm-app .crm-calendar button:disabled { color: #8a8f98; opacity: .5; cursor: default; background: transparent; }
.crm-app .crm-calendar .datepicker-month-view .month-item,
.crm-app .crm-calendar .datepicker-year-view .year-item { height: 40px; line-height: 40px; margin: 4px 0; }
.crm-app .crm-calendar .datepicker-time-view { display: flex; align-items: center; justify-content: center; direction: ltr; height: auto; padding: 8px 0; border-top: 1px solid #e7e8eb; background: #f7f8f8; border-radius: 8px; }
.crm-app .crm-calendar .datepicker-time-view > .time-segment { float: none; width: 64px; height: auto; background: transparent; }
.crm-app .crm-calendar .datepicker-time-view .up-btn,
.crm-app .crm-calendar .datepicker-time-view .down-btn { display: block; width: 100%; height: 28px; line-height: 28px; opacity: 1; }
.crm-app .crm-calendar .datepicker-time-view input { display: block; width: 100%; height: 28px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; font: 500 14px/28px Estedad, sans-serif; color: #25272d; -webkit-text-fill-color: #25272d; opacity: 1; box-shadow: none; }
.crm-app .crm-calendar .datepicker-time-view > .divider { float: none; width: 20px; height: auto; padding: 0; line-height: 28px; }
.crm-app .crm-calendar .datepicker-time-view > .second-divider,
.crm-app .crm-calendar .datepicker-time-view > .meridian-divider { display: none; }
.crm-app .crm-calendar .datepicker-time-view .divider span { height: auto; line-height: 28px; }
.crm-app .crm-calendar .toolbox { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e7e8eb; direction: rtl; }
.crm-app .crm-calendar .toolbox button { float: none; margin: 0; padding: 0 12px; height: 32px; line-height: 32px; font-size: 12px; font-weight: 500; }
.crm-app .crm-calendar .toolbox .pwt-btn-submit { background: #5e6ad2; color: #fff; }
.crm-app .crm-calendar .toolbox .pwt-btn-submit:hover { background: #505dbd; }
@media (max-width: 600px) {
    .crm-app .datepicker-container.pwt-mobile-view { background: rgb(24 27 35 / 20%); }
    .crm-app .datepicker-container.pwt-mobile-view .crm-calendar { width: calc(100% - 24px); max-width: 360px; height: auto; max-height: calc(100dvh - 24px); overflow-y: auto; top: auto; left: 50%; right: auto; transform: translateX(-50%); bottom: 12px; border-radius: 12px; padding: 12px; }
    .crm-app .crm-calendar .table-days td { height: 44px; }
    .crm-app .crm-calendar .crm-calendar-day { height: 40px; line-height: 40px; }
    .crm-app .crm-calendar .datepicker-navigator .pwt-btn,
    .crm-app .crm-calendar .toolbox button { height: 44px; line-height: 44px; }
    .crm-app .crm-calendar .datepicker-time-view .up-btn,
    .crm-app .crm-calendar .datepicker-time-view .down-btn { height: 44px; line-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .crm-app .datepicker-container, .crm-app .crm-calendar * { transition: none; }
}
