/* 
 * PadniSi Design System - Overlays
 * --------------------------------
 * Offcanvas panels, modals, and backdrops.
 */

/* --- Offcanvas Base (Bootstrap Override or Custom) --- */
.padnisi-offcanvas {
    background: white;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 1200;
}

/* Premium Variant (Item Editor) */
.padnisi-offcanvas.padnisi-offcanvas-premium {
    z-index: 1200 !important;
}

.padnisi-offcanvas-premium .padnisi-offcanvas-header {
    background: var(--secondary-dark);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.padnisi-offcanvas-premium .padnisi-offcanvas-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.padnisi-offcanvas-premium .padnisi-btn-close {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 8px;
    transition: all 0.2s ease;
    width: 30px;
    height: 30px;
    opacity: 1;
    filter: invert(1) brightness(2);
    background-size: 10px;
}

.padnisi-offcanvas-premium .padnisi-btn-close:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.padnisi-offcanvas-body {
    background-color: var(--light);
    padding: var(--spacing-offcanvas-body);
    font-family: var(--font-body);
    overflow-y: auto;
    height: calc(100% - 60px);
    /* Adjust based on header height */
}

/* Sections inside Offcanvas */
.form-section {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-card);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--secondary-dark);
    transition: transform 0.2s, box-shadow 0.2s;
}

.form-section:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.form-section-title {
    color: var(--secondary-dark);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-light);
}

/* Floating Action Bar */
.offcanvas-actions {
    margin-top: 1.5rem;
    padding-top: 16px;
    border-top: 1px solid var(--gray-light);
    background: white;
    position: sticky;
    bottom: -16px;
    /* offset padding */
    margin: 0 -16px -16px -16px;
    /* full width */
    padding: 16px;
    z-index: 10;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.03);
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: space-between;
}

/* Backdrops */
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}