﻿dialog.side-panel {
    /* Reset dialog's default browser styles */
    border: none;
    padding: 0;
    margin: 0 0 0 auto; /* Align to the right */
    background: white;
    /* Positioning and Size */
    position: fixed; /* showModal makes it fixed, but this is good for clarity */
    top: 0;
    right: 0;
    max-width: 60ch;
    width: 100%;
    
    /* Use viewport height for a guaranteed full-height panel */
    /* First, remove the browser's default height limit */
    max-height: none;
    height: 100vh;
    height: 100dvh;
    
    box-shadow: -4px 0px 15px rgba(0, 0, 0, 0.15);
    /* 1. Initial State: Off-screen to the right. */
    transform: translateX(100%);
    /* 2. Transition: Animate the transform property. */
    transition: transform 0.4s ease-in-out;
}

    dialog.side-panel.is-opening {
        /* Final State: On-screen. */
        transform: translateX(0);
    }

    dialog.side-panel::backdrop {
        background: rgba(0, 0, 0, 0.2);
        opacity: 0;
        transition: opacity 0.4s ease-in-out;
    }

    dialog.side-panel.is-opening::backdrop {
        opacity: 1;
    }


/* Helper styles for panel content (no changes) */
.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

    .side-panel-header h3 {
        margin-bottom: 0;
    }

.side-panel-body {
    padding: 1.5rem;
}
