/**
 * SBV Mobile UX 0.10.7
 * Disclosure controls + framed utility actions for touch interfaces.
 */

/* Only the dedicated disclosure icon may rotate. Never transform menu text. */
.sbv-mobile-nav__details > summary .sbv-mobile-nav__label,
.sbv-mobile-nav__details > summary .sbv-mobile-nav__label > span {
  transform: none !important;
}

.sbv-mobile-nav__details > summary {
  gap: 1rem;
}

.sbv-mobile-nav__chevron {
  flex: 0 0 auto;
  width: .78rem;
  height: .78rem;
  margin-inline: auto .2rem;
  border-right: 2px solid var(--sbv-text-muted);
  border-bottom: 2px solid var(--sbv-text-muted);
  transform: rotate(45deg);
  transition: transform var(--sbv-transition-fast) ease, border-color var(--sbv-transition-fast) ease;
}

.sbv-mobile-nav__details[open] > summary > .sbv-mobile-nav__chevron {
  transform: rotate(-135deg);
}

.sbv-mobile-nav__details > summary:hover .sbv-mobile-nav__chevron,
.sbv-mobile-nav__details > summary:focus-visible .sbv-mobile-nav__chevron {
  border-color: var(--sbv-blue-action);
}

/* Utility actions are controls, not inline text links. */
.sbv-mobile-utility-group {
  display: grid;
  gap: .65rem;
  margin-top: .35rem;
}

.sbv-mobile-utility-group__label {
  margin: 0;
  color: var(--sbv-text-muted);
  font-size: var(--sbv-text-xs);
  font-weight: var(--sbv-weight-bold);
  line-height: 1.4;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.sbv-mobile-utility {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: .65rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.sbv-mobile-utility__item,
.sbv-mobile-utility > li {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.sbv-mobile-utility__link {
  display: flex !important;
  min-height: 3.25rem;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: .8rem 1rem;
  border: 1px solid var(--sbv-border-strong);
  border-radius: var(--sbv-radius-sm);
  background: var(--sbv-surface);
  color: var(--sbv-ink) !important;
  font-family: var(--sbv-font-primary) !important;
  font-size: var(--sbv-text-sm) !important;
  font-weight: var(--sbv-weight-semibold) !important;
  line-height: 1.35;
  text-decoration: none !important;
  text-underline-offset: .16em;
  transition: background-color var(--sbv-transition-fast) ease, border-color var(--sbv-transition-fast) ease, color var(--sbv-transition-fast) ease, transform var(--sbv-transition-fast) ease;
}

.sbv-mobile-utility__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sbv-mobile-utility__arrow {
  flex: 0 0 auto;
  color: var(--sbv-blue);
  font-size: 1.08rem;
  line-height: 1;
}

.sbv-mobile-utility__link:hover {
  border-color: var(--sbv-blue);
  background: var(--sbv-blue-50);
  color: var(--sbv-blue-dark) !important;
}

.sbv-mobile-utility__link:active {
  background: var(--sbv-blue-100);
  transform: translateY(1px);
}

.sbv-mobile-utility__link:focus-visible {
  outline: 3px solid var(--sbv-focus);
  outline-offset: 3px;
  border-color: var(--sbv-blue-dark);
}

/* On larger touch/tablet drawers, two columns reduce vertical travel. */
@media (min-width: 36rem) and (max-width: 64rem) {
  .sbv-mobile-utility {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sbv-mobile-utility__item:first-child {
    grid-column: 1 / -1;
  }
}

/* On phones, keep every direct action full-width and comfortably tappable. */
@media (max-width: 35.999rem) {
  .sbv-mobile-drawer__actions {
    gap: 1.15rem;
  }
  .sbv-mobile-utility__link {
    min-height: 3.375rem;
    padding: .85rem 1rem;
    font-size: 1rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sbv-mobile-nav__chevron,
  .sbv-mobile-utility__link {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .sbv-mobile-utility__link {
    border: 1px solid ButtonText;
  }
  .sbv-mobile-nav__chevron {
    border-color: ButtonText;
  }
}
