/* public/assets/ui/framework/25_offcanvas.css
   KomodUI Offcanvas v0.1
   Mobile menu (overlay + panel) + navigation links.
   Bridges existing IDs/classes in main layout.
*/

/* =========================
   Overlay
   ========================= */

.offcanvas-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: var(--z-offcanvas-overlay, 1150);

  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

/* state helper (JS can toggle this class) */
.offcanvas-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* =========================
   Panel
   ========================= */

.offcanvas-menu {
  position: fixed;
  top: 0;
  right: 0;

  height: 100vh;
  width: min(360px, calc(100vw - 44px));

  background: var(--color-bg-white, #fff);
  border-left: 1px solid var(--color-border, #E5E7EB);
  box-shadow: var(--shadow-lg, 0 20px 25px -5px rgba(0,0,0,.10), 0 10px 10px -5px rgba(0,0,0,.04));

  z-index: var(--z-offcanvas, 1160);

  transform: translateX(102%);
  transition: transform .22s ease;

  display: block; /* you already toggle via inline style; keep safe */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* state helper (JS can toggle this class) */
.offcanvas-menu.is-open {
  transform: translateX(0);
}

/* =========================
   Header
   ========================= */

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 16px;
  border-bottom: 1px solid var(--color-border, #E5E7EB);

  position: sticky;
  top: 0;
  background: var(--color-bg-white, #fff);
  z-index: 1;
}

.offcanvas-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text, #111827);
}

.offcanvas-close {
  border: 0;
  background: transparent;
  color: var(--color-text-muted, #6B7280);

  width: 40px;
  height: 40px;
  border-radius: 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.offcanvas-close:hover {
  background: rgba(0, 0, 0, .04);
  color: var(--color-text, #111827);
}

/* =========================
   Navigation
   ========================= */

.offcanvas-nav {
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.offcanvas-link {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 12px;
  border-radius: 14px;

  text-decoration: none;
  color: var(--color-text, #111827);

  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;

  min-width: 0;
}

.offcanvas-link i {
  font-size: 18px;
  color: var(--color-text-muted, #6B7280);
  flex: 0 0 auto;
}

.offcanvas-link:hover {
  background: rgba(0, 0, 0, .04);
}

.offcanvas-link:active {
  background: rgba(0, 0, 0, .06);
}

.offcanvas-divider {
  height: 1px;
  background: var(--color-border, #E5E7EB);
  margin: 10px 6px;
}

/* =========================
   Auth block (buttons area)
   ========================= */

.offcanvas-auth {
  padding: 8px 6px 2px;
}

/* =========================
   Motion / accessibility
   ========================= */

@media (prefers-reduced-motion: reduce) {
  .offcanvas-overlay,
  .offcanvas-menu {
    transition: none;
  }
}  