/*
 * Site2image additions on top of the Dashmin theme.
 * Dashmin itself lives in dashmin.css.
 */

.dm-mast-actions .button_to,
.dm-nav-footer .button_to {
  margin: 0;
}

.dm-mast-actions .button_to {
  display: none;
}

@media (min-width: 992px) {
  .dm-mast-actions .button_to {
    display: inline-flex;
  }
}

.dm-nav-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-user-btn .name {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-token {
  display: block;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--dm-surface-2);
  border: 1px solid var(--dm-border);
  color: var(--dm-heading);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  word-break: break-all;
}

.alert {
  border-radius: 12px;
}

.admin-period-dates input[type="date"] {
  width: 11.5rem;
}

.admin-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.dm-card .table td:last-child {
  white-space: nowrap;
  width: 1%;
}

.admin-actions .button_to {
  margin: 0;
}

.dm-card .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--dm-text);
  --bs-table-border-color: var(--dm-border);
  margin-bottom: 0;
}

.dm-card .table thead th {
  color: var(--dm-text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lang-switch {
  position: relative;
}

.lang-switch > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--dm-border);
  background: transparent;
  color: var(--dm-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch > summary::-webkit-details-marker {
  display: none;
}

.lang-switch-menu {
  position: absolute;
  z-index: 30;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 11rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--dm-border);
  background: var(--dm-surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.lang-switch-menu a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  color: var(--dm-text);
  text-decoration: none;
  font-weight: 600;
}

.lang-switch-menu a[aria-current="true"],
.lang-switch-menu a:hover {
  background: var(--dm-primary-muted);
  color: var(--dm-heading);
}
