/**
 * ============================================
 * MayaUI — Shared Web UI Library
 * ============================================
 *
 * @product    MayaUI
 * @module     Responsive Modal
 * @file       responsive-modal.css
 * @version    1.0.0
 * @since      2026-04-12
 * @modified   2026-04-12
 *
 * @company    Kohli Media LLP
 * @author     Dr. Sahil Kohli
 * @copyright  2026 Kohli Media LLP. All rights reserved.
 *
 * @website    https://mayasim.in/ui
 * @email      admin@kohli.tel
 *
 * UI LIBRARY ASSET — SHARED DISTRIBUTION FILE
 * ============================================
 * Reusable responsive modal shell:
 * - Desktop: centered dialog
 * - Mobile: bottom sheet
 * - Fixed header/footer with scrollable body
 * ============================================
 *
 * Quick HTML structure example:
 *
 * <div id="demoBackdrop" class="rm-backdrop"></div>
 * <section id="demoSheet" class="rm-sheet">
 *   <div class="rm-shell">
 *     <div class="rm-head">...</div>
 *     <div class="rm-body">...</div>
 *     <div class="rm-foot">...</div>
 *   </div>
 * </section>
 *
 * Add rm-handle for mobile drag-handle style:
 * <div class="rm-handle"></div>
 * ============================================
 */
.rm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    z-index: 70;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.rm-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}
.rm-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    background: #fff;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    transform: translateY(102%);
    transition: transform 0.28s ease, opacity 0.2s ease;
    max-height: 92vh;
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}
.rm-sheet.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.rm-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: inherit;
}
.rm-head {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}
.rm-body {
    overflow: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}
.rm-foot {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
}
.rm-handle {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #d1d5db;
}
@media (min-width: 1024px) {
    .rm-sheet {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        width: min(980px, 92vw);
        border-radius: 1rem;
        transform: translate(-50%, -46%) scale(0.98);
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
        max-height: 88vh;
    }
    .rm-sheet.is-open {
        transform: translate(-50%, -50%) scale(1);
    }
    .rm-handle {
        display: none;
    }
}
