/**
 * HamlyERP
 * Copyright (c) 2026 Nolwa Private Limited. All rights reserved.
 * Proprietary and confidential. Unauthorised copying, modification or distribution of this file is prohibited.
 */
/* One phone bottom bar for everyone (UIUX-RULES-v1 rule 45, U2 K7): Home · Apps · + · Alerts · Me below 640 px, in the
   sidebar and the Apps menu style alike. The gold "+" (gold as a fill, never as text: rule 37) opens the quick-action
   sheet. Logical properties only, so Arabic mirrors by the page direction. Tokens only (rule 46). */

body.df-app-v2 { --phone-bar-h: 64px; }
.df-phone-bar, .df-quick { display: none; }

@media (max-width: 639.98px) {
  body.df-app-v2 .df-main { padding-block-end: calc(var(--phone-bar-h) + env(safe-area-inset-bottom, 0px)); }
  body.df-app-v2 .df-sb { inset-block-end: calc(var(--phone-bar-h) + env(safe-area-inset-bottom, 0px)); }

  .df-phone-bar { display: flex; justify-content: space-around; align-items: stretch; position: fixed; inset-inline: 0; inset-block-end: 0;
    min-block-size: var(--phone-bar-h); padding-block-end: env(safe-area-inset-bottom, 0px); background: var(--ui-surface);
    border-block-start: var(--bw) solid var(--ui-line); box-shadow: var(--ui-shadow-bar); z-index: var(--z-savebar); }
  .df-phone-bar > a, .df-phone-bar > button { flex: 1 1 0; min-inline-size: 44px; min-block-size: 44px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: var(--sp-3); border: 0; background: none; padding: var(--sp-6) 0; font: inherit;
    font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--ui-muted); text-decoration: none; cursor: pointer; }
  .df-phone-bar > a:hover, .df-phone-bar > button:hover { color: var(--ui-ink); text-decoration: none; }
  .df-phone-bar > .is-on { color: var(--ui-brand-ink); font-weight: var(--fw-semibold); }
  .df-phone-bar > :focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-lg); }

  /* the "+": a gold disc lifted half out of the bar; its name comes from aria-label */
  .df-phone-bar > .df-phone-plus { justify-content: flex-start; }
  .df-phone-plus-dot { display: grid; place-items: center; inline-size: 52px; block-size: 52px; margin-block-start: calc(-1 * var(--sp-18));
    border-radius: var(--r-pill); background: var(--ui-gold); color: var(--ui-on-gold); box-shadow: var(--ui-shadow-pop);
    border: 3px solid var(--ui-surface); transition: transform var(--dur-fast) ease-out; }
  .df-phone-plus[aria-expanded="true"] .df-phone-plus-dot { transform: rotate(45deg); }

  /* quick-action sheet, above the bar */
  .df-quick:not([hidden]) { display: block; position: fixed; inset: 0; background: var(--ui-scrim); z-index: var(--z-drawer); }
  .df-quick-sheet { position: absolute; inset-inline: 0; inset-block-end: 0; max-block-size: 75vh; overflow-y: auto; background: var(--ui-surface);
    border-start-start-radius: var(--r-3xl); border-start-end-radius: var(--r-3xl); box-shadow: var(--ui-shadow-modal);
    padding: var(--sp-12) var(--sp-16) calc(var(--phone-bar-h) + env(safe-area-inset-bottom, 0px) + var(--sp-12));
    animation: df-quick-up var(--dur-slow) ease-out; }
  .df-quick-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-12); margin-block-end: var(--sp-8); }
  .df-quick-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--ui-heading); }
  .df-quick-x { display: grid; place-items: center; inline-size: 44px; block-size: 44px; border: 0; border-radius: var(--r-pill); background: none;
    color: var(--ui-muted); cursor: pointer; }
  .df-quick-x:focus-visible, .df-quick-list a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
  .df-quick-list { list-style: none; margin: 0; padding: 0; }
  .df-quick-list a { display: flex; align-items: center; gap: var(--sp-12); min-block-size: 48px; padding: 0 var(--sp-8); border-radius: var(--r-lg);
    color: var(--ui-ink); font-weight: var(--fw-medium); text-decoration: none; }
  .df-quick-list a:hover { background: var(--ui-hl); text-decoration: none; color: var(--ui-ink); }
  .df-quick-list a > svg { color: var(--ui-brand-ink); flex: none; }
  .df-quick-none { margin: var(--sp-8) 0; color: var(--ui-muted); }
}

@keyframes df-quick-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .df-quick-sheet { animation: none; } .df-phone-plus-dot { transition: none; } }
@media print { .df-phone-bar, .df-quick { display: none !important; } }
