/**
 * Demetz - Prescription info panel
 *
 * @author    JFO
 * @copyright 2026 Opal
 * @license   Proprietary - All rights reserved
 */

/*
 * F8 - "guide" mode of the drawer (panel_guide.tpl, demetzrxinfo-guides.js): a CMS guide page in an <iframe>
 * (?content_only=1). Wider drawer on desktop (tables of the guides), same veil, same head as the panel.
 */
.drx-root[data-drx-mode="guide"] .drx-panel {
  width: 720px;
  max-width: calc(100vw - 48px);
}

.drx-root .drx-guide {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.drx-root .drx-guide__head {
  flex: 0 0 auto;
}

.drx-root .drx-guide__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
}

.drx-root .drx-guide__frame {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.drx-root .drx-guide__foot {
  flex: 0 0 auto;
  padding: 12px 24px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e6e6e6;
  background: #fff;
}

.drx-root a.drx-guide__newtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.drx-root .drx-guide__newtab-icon {
  display: block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

@media (max-width: 579.98px) {
  .drx-root .drx-guide__foot {
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

/* Short viewports: the whole drawer scrolls (demetzrxinfo.css), the guide keeps a usable height */
@media (max-height: 539.98px) {
  .drx-root .drx-guide {
    flex: 0 0 auto;
  }

  .drx-root .drx-guide__body {
    flex: 0 0 auto;
    height: 360px;
  }
}
