.appointments-menu {
    position: relative;
}

.appointments-menu > .appointments-dropdown {
    position: absolute;
    top: 100%;
    inset-inline-end: 0;
    inset-inline-start: auto;
    left: auto !important;
    right: auto !important;
    margin-top: 0.5rem;
    float: none;
}

.appointments-dropdown {
    width: min(26rem, calc(100vw - 1.5rem));
    min-width: 0;
    max-width: calc(100vw - 1.5rem);
}

body > .appointments-dropdown.appointments-dropdown-open {
    display: block !important;
    z-index: 10050 !important;
}

.header-mini-calendar {
    font-size: 13px;
}

.header-mini-calendar .hmc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.header-mini-calendar .hmc-header button {
    background: transparent;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: #374151;
}

.header-mini-calendar .hmc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.header-mini-calendar .hmc-dow {
    font-weight: 600;
    color: #6b7280;
    padding: 4px 0;
}

.header-mini-calendar .hmc-day {
    padding: 8px 4px 12px;
    min-height: 2.35rem;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    color: #374151;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.header-mini-calendar .hmc-day:hover {
    background: #f3f4f6;
}

.header-mini-calendar .hmc-day.is-today {
    border: 2px solid #3c8dbc;
}

.header-mini-calendar .hmc-day.is-selected {
    background: #3c8dbc;
    color: #fff;
}

.header-mini-calendar .hmc-day.has-events {
    background: #ecfdf5;
    color: #166534;
    font-weight: 700;
}

.header-mini-calendar .hmc-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    min-width: 14px;
    max-width: 22px;
    height: 4px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.35);
}

.header-mini-calendar .hmc-day.is-selected.has-events {
    background: #3c8dbc;
    color: #fff;
}

.header-mini-calendar .hmc-day.is-selected.has-events::after {
    background: #bbf7d0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.header-mini-calendar .hmc-day.is-muted.has-events {
    background: #f0fdf4;
    color: #4ade80;
}

.header-mini-calendar .hmc-day.is-muted.has-events::after {
    background: #86efac;
}

.header-mini-calendar .hmc-day.is-muted {
    color: #d1d5db;
}

.appointments-dropdown .appointment-item {
    border-inline-start: 3px solid #28a745;
    padding-inline-start: 10px;
}

#home_appointments_widget .header-mini-calendar {
    font-size: 14px;
}

#home_appointments_widget .header-mini-calendar .hmc-day {
    padding: 8px 4px 14px;
    min-height: 2.5rem;
}

#home_appointments_widget .header-mini-calendar .hmc-day.has-events::after {
    height: 5px;
    min-width: 18px;
    max-width: 26px;
    background: #16a34a;
}

#home_appointments_widget .header-mini-calendar .hmc-day.is-selected.has-events::after {
    height: 5px;
    background: #dcfce7;
}

#home_appointments_widget .header-mini-calendar .hmc-event-count {
    position: absolute;
    top: 2px;
    inset-inline-end: 2px;
    font-size: 9px;
    line-height: 1.2;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 6px;
    background: #16a34a;
    color: #fff;
    pointer-events: none;
    z-index: 1;
}

#home_appointments_widget .header-mini-calendar .hmc-day.is-selected .hmc-event-count {
    background: #fff;
    color: #2563eb;
}

#home_appointments_widget .header-mini-calendar .hmc-day.is-muted .hmc-event-count {
    background: #86efac;
    color: #166534;
}

#home_appointments_widget #home_appointments_table td {
    vertical-align: middle !important;
}

#home_appointments_widget .home-appointment-actions {
    white-space: nowrap;
}
