/* Shared touch-first surfaces for Dashboard detail views and progressive lists. */
.pezani-drawer {
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: fixed;
    z-index: 2050;
}

.pezani-drawer[hidden] {
    display: none !important;
}

.pezani-drawer__backdrop {
    background: rgba(15, 30, 50, .52);
    inset: 0;
    position: absolute;
}

.pezani-drawer__panel {
    background: #fff;
    border-radius: 1.1rem 1.1rem 0 0;
    box-shadow: 0 -1rem 3rem rgba(15, 30, 50, .2);
    display: flex;
    flex: 0 1 64rem;
    flex-direction: column;
    max-height: min(92vh, 58rem);
    min-height: 0;
    position: relative;
    transform: translateY(1rem);
    transition: transform .2s ease;
    width: min(100%, 64rem);
}

.pezani-drawer.is-open .pezani-drawer__panel {
    transform: translateY(0);
}

.pezani-drawer__handle {
    background: #cdd8e5;
    border-radius: 999px;
    height: .25rem;
    margin: .65rem auto 0;
    width: 2.8rem;
}

[data-pezani-drag-handle] {
    cursor: grab;
    position: relative;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

[data-pezani-drag-handle]::before {
    content: "";
    inset: -0.65rem -1rem;
    position: absolute;
}

[data-pezani-drag-handle]:active { cursor: grabbing; }

.pezani-drawer__header {
    align-items: flex-start;
    border-bottom: 1px solid #e6edf4;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .85rem 1.25rem 1rem;
}

.pezani-drawer__title {
    color: #18253b;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
}

.pezani-drawer__close {
    align-items: center;
    background: #f4f7fa;
    border: 1px solid #dce6ef;
    border-radius: 50%;
    color: #18253b;
    display: inline-flex;
    flex: 0 0 2.65rem;
    height: 2.65rem;
    justify-content: center;
    padding: 0;
    width: 2.65rem;
}

.pezani-drawer__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1.15rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
}

.pezani-drawer__body > :first-child { margin-top: 0; }
.pezani-drawer__body > :last-child { margin-bottom: 0; }

.pezani-drawer-open { overflow: hidden; }

.pezani-list-skeleton {
    display: grid;
    gap: .85rem;
}

.pezani-list-skeleton__row {
    animation: pezani-skeleton-pulse 1.25s ease-in-out infinite;
    background: linear-gradient(90deg, #edf2f7 25%, #f8fafc 50%, #edf2f7 75%);
    background-size: 240% 100%;
    border-radius: .65rem;
    height: 4.6rem;
}

.pezani-progressive-sentinel {
    align-items: center;
    color: #718096;
    display: flex;
    justify-content: center;
    min-height: 3.2rem;
    padding: .5rem;
}

.pezani-progressive-sentinel[hidden] { display: none; }
.pezani-progressive-skeleton { display: inline-flex; gap: .25rem; margin-right: .55rem; vertical-align: middle; }
.pezani-progressive-skeleton span { animation: pezani-skeleton-pulse 1.1s ease-in-out infinite; background: #d8e5f0; border-radius: 999px; display: block; height: .35rem; width: .35rem; }
.pezani-progressive-skeleton span:nth-child(2) { animation-delay: .15s; }
.pezani-progressive-skeleton span:nth-child(3) { animation-delay: .3s; }
.pezani-progressive-label { vertical-align: middle; }

.pezani-progressive-sentinel::before {
    border: 2px solid #d8e5f0;
    border-radius: 50%;
    border-top-color: #0b9be8;
    content: '';
    height: 1.1rem;
    margin-right: .55rem;
    width: 1.1rem;
    animation: pezani-spin .8s linear infinite;
}

@keyframes pezani-skeleton-pulse {
    0%, 100% { opacity: .72; }
    50% { opacity: 1; }
}

@keyframes pezani-spin { to { transform: rotate(360deg); } }

@media (max-width: 575.98px) {
    .pezani-drawer__panel {
        border-radius: 1rem 1rem 0 0;
        max-height: 94vh;
    }

    .pezani-drawer__header { padding-left: 1rem; padding-right: 1rem; }
    .pezani-drawer__body { padding-left: 1rem; padding-right: 1rem; }
}
