/* File: src/RailScanPro.Web/wwwroot/css/drawers.css */
/* RightRailDrawer shared component (Phase 0 F3, locked Decision 1). */
/* Desktop: slide-in right rail. Tablet/phone: bottom sheet. Photino: in-pane split. */

.right-rail-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 420px;
    max-width: 100vw;
    background: var(--surface-primary, #1e293b);
    border-left: 1px solid var(--border-primary, #334155);
    transform: translateX(100%);
    transition: transform 200ms ease-out;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.right-rail-drawer.is-open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--border-primary, #334155);
}

.drawer-close {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-primary, #334155);
    background: transparent;
    color: var(--text-secondary, #94a3b8);
    font-size: 18px;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
}

.drawer-close:hover {
    color: var(--text-primary, #e2e8f0);
    border-color: var(--border-strong, #475569);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 18px;
}

.drawer-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border-primary, #334155);
}

/* Tablet portrait + phone: bottom sheet */
@media (max-width: 1024px) {
    .right-rail-drawer {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        height: 60vh;
        max-height: 90vh;
        transform: translateY(100%);
        border-left: none;
        border-top: 1px solid var(--border-primary, #334155);
    }

    .right-rail-drawer.is-open {
        transform: translateY(0);
    }
}

/* Photino in-pane: when host signals split-pane via [data-host="photino"] */
[data-host="photino"] .right-rail-drawer {
    position: relative;
    transform: none;
    height: 100%;
    width: 100%;
    border-left: none;
    z-index: auto;
}
