/* modest-ui - Bundled CSS
 * Generated from index.css and all component styles
 * This file contains all styles in a single file for easy distribution
 */

/* modest-ui - Minimal CSS component library */

/* Base */
:root {
  /* Colors */
  --mdst-color-fg: #000;
  --mdst-color-bg: #fff;
  --mdst-color-border: #000;
  --mdst-color-muted: #666;
  --mdst-color-subtle: #f5f5f5;
  --mdst-color-surface: #f5f5f5;
  --mdst-color-focus: #000;
  --mdst-color-error: #dc2626;
  --mdst-color-success: #16a34a;

  /* Button hover */
  --mdst-button-hover-bg: var(--mdst-color-fg);
  --mdst-button-hover-color: var(--mdst-color-bg);
  --mdst-button-hover-border: var(--mdst-color-fg);

  /* Typography */
  --mdst-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mdst-font-mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --mdst-line-height: 1.5;

  /* Font sizes */
  --mdst-text-xs: 0.75rem;
  --mdst-text-sm: 0.875rem;
  --mdst-text-base: 1rem;
  --mdst-text-lg: 1.125rem;
  --mdst-text-xl: 1.25rem;

  /* Spacing */
  --mdst-space-px: 0.0625rem;
  --mdst-space-1: 0.25rem;
  --mdst-space-2: 0.5rem;
  --mdst-space-3: 0.75rem;
  --mdst-space-4: 1rem;
  --mdst-space-5: 1.25rem;
  --mdst-space-6: 1.5rem;
  --mdst-space-8: 2rem;

  /* Semantic spacing aliases */
  --mdst-space-xs: var(--mdst-space-1);
  --mdst-space-sm: var(--mdst-space-2);
  --mdst-space-md: var(--mdst-space-4);
  --mdst-space-lg: var(--mdst-space-6);
  --mdst-space-xl: var(--mdst-space-8);

  /* Border */
  --mdst-radius: 0;
  --mdst-border-width: 0.0625em;

  /* Transitions */
  --mdst-transition-fast: 50ms ease-out;
  --mdst-transition: 100ms ease-out;
}

/*
 * Minimal reset
 * Only the essentials — no opinions
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}


/* Components */
/* Button */

.mdst-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mdst-space-xs);
  padding: var(--mdst-space-sm) var(--mdst-space-md);
  font-family: inherit;
  font-size: inherit;
  line-height: var(--mdst-line-height);
  color: var(--mdst-color-fg);
  background: var(--mdst-color-bg);
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  cursor: pointer;
  transition:
    background var(--mdst-transition),
    color var(--mdst-transition),
    border-color var(--mdst-transition);
  -webkit-appearance: none;
  appearance: none;
}

.mdst-button:hover {
  background: var(--mdst-button-hover-bg);
  color: var(--mdst-button-hover-color);
  border-color: var(--mdst-button-hover-border);
}

.mdst-button:focus-visible {
  outline: var(--mdst-border-width) solid var(--mdst-color-focus);
  outline-offset: var(--mdst-border-width);
}

.mdst-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mdst-button:disabled:hover {
  background: var(--mdst-color-bg);
  color: var(--mdst-color-fg);
  border-color: var(--mdst-color-border);
}

/* Variants */

.mdst-button--ghost {
  border-color: transparent;
}

.mdst-button--ghost:hover {
  border-color: var(--mdst-button-hover-border);
}

.mdst-button--inverted {
  background: var(--mdst-color-fg);
  color: var(--mdst-color-bg);
}

.mdst-button--inverted:hover {
  background: var(--mdst-color-bg);
  color: var(--mdst-color-fg);
}

/* Sizes */

.mdst-button--sm {
  padding: var(--mdst-space-xs) var(--mdst-space-sm);
  font-size: var(--mdst-text-sm);
}

.mdst-button--lg {
  padding: var(--mdst-space-md) var(--mdst-space-lg);
}

/* Checkbox */

.mdst-checkbox {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: var(--mdst-space-4);
  height: var(--mdst-space-4);
  margin: 0;
  background: var(--mdst-color-bg);
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: 0;
  cursor: pointer;
  position: relative;
  transition: border-color var(--mdst-transition);
}

.mdst-checkbox:checked::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--mdst-color-fg);
}

.mdst-checkbox:hover {
  border-color: var(--mdst-color-muted);
}

.mdst-checkbox:focus-visible {
  outline: var(--mdst-border-width) solid var(--mdst-color-focus);
  outline-offset: var(--mdst-border-width);
}

.mdst-checkbox:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mdst-checkbox:disabled:hover {
  border-color: var(--mdst-color-border);
}

/* Checkbox with label wrapper */

.mdst-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--mdst-space-sm);
  font-size: inherit;
  line-height: var(--mdst-line-height);
  cursor: pointer;
  user-select: none;
}

.mdst-checkbox-label:has(.mdst-checkbox:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Dropdown (Native Select) */

.mdst-dropdown {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: var(--mdst-space-sm) var(--mdst-space-md);
  padding-right: calc(var(--mdst-space-md) + 1.5em);
  font-family: inherit;
  font-size: inherit;
  line-height: var(--mdst-line-height);
  color: var(--mdst-color-fg);
  background-color: var(--mdst-color-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--mdst-space-md) center;
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  outline: none;
  cursor: pointer;
  transition: border-color var(--mdst-transition);
}

.mdst-dropdown:hover {
  border-color: var(--mdst-color-muted);
}

.mdst-dropdown:focus {
  border-color: var(--mdst-color-focus);
}

.mdst-dropdown:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mdst-dropdown:disabled:hover {
  border-color: var(--mdst-color-border);
}

/* Variants */

.mdst-dropdown--ghost {
  border-color: transparent;
  background-color: transparent;
}

.mdst-dropdown--ghost:hover {
  border-color: var(--mdst-color-border);
}

.mdst-dropdown--ghost:focus {
  border-color: var(--mdst-color-focus);
}

/* Sizes */

.mdst-dropdown--sm {
  padding: var(--mdst-space-xs) var(--mdst-space-sm);
  padding-right: calc(var(--mdst-space-sm) + 1.5em);
  font-size: var(--mdst-text-sm);
  background-position: right var(--mdst-space-sm) center;
}

.mdst-dropdown--lg {
  padding: var(--mdst-space-md) var(--mdst-space-lg);
  padding-right: calc(var(--mdst-space-lg) + 1.5em);
  background-position: right var(--mdst-space-lg) center;
}

/* Inline variant (auto-width) */

.mdst-dropdown--inline {
  display: inline-block;
  width: auto;
}

/* Input */

.mdst-input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: var(--mdst-space-sm) var(--mdst-space-md);
  font-family: inherit;
  font-size: inherit;
  line-height: var(--mdst-line-height);
  color: var(--mdst-color-fg);
  background-color: var(--mdst-color-bg);
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  outline: none;
  transition: border-color var(--mdst-transition);
}

.mdst-input::placeholder {
  color: var(--mdst-color-muted);
  opacity: 1;
}

.mdst-input:focus {
  border-color: var(--mdst-color-focus);
}

.mdst-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Textarea variant */
textarea.mdst-input {
  min-height: 6rem;
  resize: vertical;
}

/* Radio */

.mdst-radio {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: var(--mdst-space-4);
  height: var(--mdst-space-4);
  margin: 0;
  background: var(--mdst-color-bg);
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: border-color var(--mdst-transition);
}

.mdst-radio:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--mdst-color-fg);
  border-radius: 50%;
}

.mdst-radio:hover {
  border-color: var(--mdst-color-muted);
}

.mdst-radio:focus-visible {
  outline: var(--mdst-border-width) solid var(--mdst-color-focus);
  outline-offset: var(--mdst-border-width);
}

.mdst-radio:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mdst-radio:disabled:hover {
  border-color: var(--mdst-color-border);
}

/* Radio with label wrapper */

.mdst-radio-label {
  display: inline-flex;
  align-items: center;
  gap: var(--mdst-space-sm);
  font-size: inherit;
  line-height: var(--mdst-line-height);
  cursor: pointer;
  user-select: none;
}

.mdst-radio-label:has(.mdst-radio:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Radio group */

.mdst-radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--mdst-space-sm);
}

.mdst-radio-group--horizontal {
  flex-direction: row;
  gap: var(--mdst-space-md);
}

/*
 * OTP Input
 *
 * Usage:
 * <div class="mdst-otp-input">
 *   <input type="text" maxlength="1" class="mdst-otp-input-digit" inputmode="numeric">
 *   <input type="text" maxlength="1" class="mdst-otp-input-digit" inputmode="numeric">
 *   <input type="text" maxlength="1" class="mdst-otp-input-digit" inputmode="numeric">
 *   <input type="text" maxlength="1" class="mdst-otp-input-digit" inputmode="numeric">
 * </div>
 *
 * With separator:
 * <div class="mdst-otp-input">
 *   <input type="text" maxlength="1" class="mdst-otp-input-digit" inputmode="numeric">
 *   <input type="text" maxlength="1" class="mdst-otp-input-digit" inputmode="numeric">
 *   <span class="mdst-otp-input-separator"></span>
 *   <input type="text" maxlength="1" class="mdst-otp-input-digit" inputmode="numeric">
 *   <input type="text" maxlength="1" class="mdst-otp-input-digit" inputmode="numeric">
 * </div>
 */

.mdst-otp-input {
  display: inline-flex;
  gap: var(--mdst-space-sm);
  align-items: center;
}

.mdst-otp-input-digit {
  width: 1.5em;
  height: 2em;
  padding: 0;
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  background: var(--mdst-color-bg);
  color: var(--mdst-color-fg);
  font-family: var(--mdst-font-mono);
  font-size: 1.25em;
  text-align: center;
  caret-color: var(--mdst-color-fg);
  transition: border-color var(--mdst-transition);
}

.mdst-otp-input-digit:focus {
  outline: none;
  border-color: var(--mdst-color-focus);
}

.mdst-otp-input-digit::placeholder {
  color: var(--mdst-color-muted);
}

.mdst-otp-input-digit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Separator (e.g., dash between groups) */
.mdst-otp-input-separator {
  width: 0.5em;
  height: 0.0625em;
  background: var(--mdst-color-border);
}

/* Filled state - when digit has a value */
.mdst-otp-input-digit:not(:placeholder-shown) {
  border-color: var(--mdst-color-fg);
}

/* Error state */
.mdst-otp-input--error .mdst-otp-input-digit {
  border-color: var(--mdst-color-error, #c00);
}

/* Success state */
.mdst-otp-input--success .mdst-otp-input-digit {
  border-color: var(--mdst-color-success, #0a0);
}

/* Code - Inline code snippets */

.mdst-code {
  font-family: var(--mdst-font-mono);
  font-size: 0.875em;
  background: var(--mdst-color-subtle);
  border: 0.0625em solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  padding: 0.125em 0.375em;
  word-break: break-word;
}

/* Pre — block code/JSON display */

.mdst-pre {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: var(--mdst-space-md);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  font-family: var(--mdst-font-mono);
  font-size: var(--mdst-text-sm);
  line-height: var(--mdst-line-height);
  color: var(--mdst-color-fg);
  background-color: var(--mdst-color-subtle);
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  tab-size: 2;
  -moz-tab-size: 2;
}

.mdst-pre:focus {
  outline: 0.125em solid var(--mdst-color-focus);
  outline-offset: 0.125em;
}

/* Nested code inside pre — reset styles */
.mdst-pre code,
.mdst-pre .mdst-code {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: inherit;
  word-break: break-word;
}

/* Variants */
.mdst-pre--borderless {
  border: none;
}

.mdst-pre--compact {
  padding: var(--mdst-space-sm);
}

/* Allow horizontal scroll if explicitly needed */
.mdst-pre--scroll {
  overflow-x: auto;
  overflow-wrap: normal;
  word-wrap: normal;
  word-break: normal;
  white-space: pre;
}

/* Dialog */

.mdst-dialog {
  padding: 0;
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  background: var(--mdst-color-bg);
  color: var(--mdst-color-fg);
  max-width: min(90vw, 32rem);
  max-height: 90vh;

  /* Center the dialog */
  margin: auto;
  position: fixed;
  inset: 0;
  width: fit-content;
  height: fit-content;
}

.mdst-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

/* Dialog Header */

.mdst-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mdst-space-md);
  padding: var(--mdst-space-md);
  border-bottom: var(--mdst-border-width) solid var(--mdst-color-border);
}

.mdst-dialog-title {
  margin: 0;
  font-size: var(--mdst-text-lg);
  font-weight: 600;
  line-height: var(--mdst-line-height);
}

.mdst-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--mdst-space-xs);
  background: transparent;
  border: none;
  border-radius: var(--mdst-radius);
  cursor: pointer;
  color: var(--mdst-color-muted);
  transition: color var(--mdst-transition);
}

.mdst-dialog-close:hover {
  color: var(--mdst-color-fg);
}

.mdst-dialog-close:focus-visible {
  outline: var(--mdst-border-width) solid var(--mdst-color-focus);
  outline-offset: var(--mdst-border-width);
}

/* Dialog Body */

.mdst-dialog-body {
  padding: var(--mdst-space-md);
  overflow-y: auto;
}

/* Dialog Footer */

.mdst-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--mdst-space-sm);
  padding: var(--mdst-space-md);
  border-top: var(--mdst-border-width) solid var(--mdst-color-border);
}

/* Variants */

.mdst-dialog--sm {
  max-width: min(90vw, 24rem);
}

.mdst-dialog--lg {
  max-width: min(90vw, 48rem);
}

.mdst-dialog--full {
  max-width: 90vw;
  max-height: 90vh;
}

/* Details (Toggle/Disclosure) */

.mdst-details {
  display: relative;
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  background: var(--mdst-color-bg);
}

.mdst-details > summary {
  display: flex;
  align-items: center;
  gap: var(--mdst-space-sm);
  padding: var(--mdst-space-md);
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 500;
  transition: background var(--mdst-transition);
}

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

.mdst-details > summary::before {
  content: "";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: transform var(--mdst-transition);
}

.mdst-details[open] > summary::before {
  transform: rotate(90deg);
}

.mdst-details > summary:hover {
  color: var(--mdst-color-muted);
}

.mdst-details > summary:focus-visible {
  outline: var(--mdst-border-width) solid var(--mdst-color-focus);
  outline-offset: calc(-1 * var(--mdst-border-width));
}

/* Content area - only style when open */
.mdst-details[open]::details-content {
  padding: var(--mdst-space-md);
  border-top: var(--mdst-border-width) solid var(--mdst-color-border);
}

/* Variants */

.mdst-details--borderless {
  border: none;
}

.mdst-details--borderless[open]::details-content {
  border-top: none;
  padding-left: calc(1em + var(--mdst-space-sm));
}

.mdst-details--compact > summary {
  padding: var(--mdst-space-sm) var(--mdst-space-md);
}

.mdst-details--compact[open]::details-content {
  padding: var(--mdst-space-sm) var(--mdst-space-md);
}

/* Section variant - collapsible header style */

.mdst-details--section {
  border: none;
  border-radius: 0;
  background: transparent;
}

.mdst-details--section > summary {
  padding: var(--mdst-space-sm) 0;
  font-size: var(--mdst-text-lg);
  font-weight: 600;
  border-bottom: var(--mdst-border-width) solid var(--mdst-color-border);
}

.mdst-details--section > summary::before {
  order: 1;
  margin-left: auto;
  width: 1.25em;
  height: 1.25em;
}

.mdst-details--section[open] > summary {
  border-bottom-color: transparent;
}

.mdst-details--section[open]::details-content {
  padding: var(--mdst-space-md) 0;
  border-top: none;
  border-bottom: var(--mdst-border-width) solid var(--mdst-color-border);
}

/* Popover */

.mdst-popover {
  padding: var(--mdst-space-md);
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  background: var(--mdst-color-bg);
  color: var(--mdst-color-fg);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);

  /* Default: centered on page */
  margin: auto;
  position: fixed;
  inset: 0;
  width: fit-content;
  height: fit-content;
}

.mdst-popover:popover-open {
  opacity: 1;
}

/* Anchored positioning - use with anchor="" HTML attribute */
.mdst-popover--anchored {
  position: absolute;
  inset: unset;
  margin: 0;
  position-area: bottom;
  margin-top: var(--mdst-space-xs);
}

/* Popover Variants */

.mdst-popover--sm {
  padding: var(--mdst-space-sm);
  font-size: var(--mdst-text-sm);
}

.mdst-popover--lg {
  padding: var(--mdst-space-lg);
  max-width: 24rem;
}

/* Range Slider */

.mdst-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: var(--mdst-space-1);
  background: var(--mdst-color-border);
  border-radius: var(--mdst-space-1);
  box-shadow: none;
  cursor: pointer;
  outline: none;
}

.mdst-range:focus-visible {
  outline: var(--mdst-border-width) solid var(--mdst-color-focus);
  outline-offset: var(--mdst-space-1);
}

.mdst-range:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Webkit (Chrome, Safari, Edge) */

.mdst-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--mdst-space-4);
  height: var(--mdst-space-4);
  box-sizing: border-box;
  background: var(--mdst-color-bg);
  border: calc(var(--mdst-space-px) * 3) solid var(--mdst-color-border);
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  transition: background var(--mdst-transition);
}

.mdst-range:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
}

/* Firefox */

.mdst-range::-moz-range-thumb {
  appearance: none;
  width: var(--mdst-space-4);
  height: var(--mdst-space-4);
  box-sizing: border-box;
  background: var(--mdst-color-bg);
  border: calc(var(--mdst-space-px) * 3) solid var(--mdst-color-border);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--mdst-transition);
}

.mdst-range:disabled::-moz-range-thumb {
  cursor: not-allowed;
}

.mdst-range::-moz-range-track {
  background: transparent;
}

/* Color Picker */

.mdst-color-picker {
  display: inline-flex;
  align-items: center;
  gap: var(--mdst-space-sm);
}

.mdst-color-picker__input {
  -webkit-appearance: none;
  appearance: none;
  width: var(--mdst-space-8);
  height: var(--mdst-space-8);
  padding: 0;
  background: none;
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: 50%;
  cursor: pointer;
  outline: none;
  transition: border-color var(--mdst-transition);
}

.mdst-color-picker__input:focus-visible {
  outline: var(--mdst-border-width) solid var(--mdst-color-focus);
  outline-offset: var(--mdst-border-width);
}

.mdst-color-picker__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Webkit (Chrome, Safari, Edge) */

.mdst-color-picker__input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.mdst-color-picker__input::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Firefox */

.mdst-color-picker__input::-moz-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Text input variant */

.mdst-color-picker__text {
  -webkit-appearance: none;
  appearance: none;
  width: 5rem;
  height: var(--mdst-space-8);
  padding: 0 var(--mdst-space-sm);
  font-family: var(--mdst-font-mono);
  font-size: var(--mdst-text-sm);
  text-transform: uppercase;
  color: var(--mdst-color-fg);
  background: var(--mdst-color-bg);
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  outline: none;
  transition: border-color var(--mdst-transition);
}

.mdst-color-picker__text::placeholder {
  color: var(--mdst-color-muted);
  text-transform: none;
}

.mdst-color-picker__text:focus {
  border-color: var(--mdst-color-focus);
}

.mdst-color-picker__text:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Square variant */

.mdst-color-picker--square .mdst-color-picker__input {
  border-radius: var(--mdst-radius);
}

.mdst-color-picker--square .mdst-color-picker__input::-webkit-color-swatch {
  border-radius: var(--mdst-radius);
}

.mdst-color-picker--square .mdst-color-picker__input::-moz-color-swatch {
  border-radius: var(--mdst-radius);
}

/* Table */

.mdst-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.mdst-table {
  width: 100%;
  border-collapse: collapse;
  font-size: inherit;
}

.mdst-table th {
  text-align: left;
  font-size: var(--mdst-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mdst-color-muted);
  padding: var(--mdst-space-sm) var(--mdst-space-md) var(--mdst-space-sm) 0;
  border-bottom: var(--mdst-border-width) solid var(--mdst-color-border);
}

.mdst-table th:last-child {
  padding-right: 0;
}

.mdst-table td {
  padding: var(--mdst-space-md) var(--mdst-space-md) var(--mdst-space-md) 0;
  vertical-align: middle;
  border-bottom: var(--mdst-border-width) solid var(--mdst-color-subtle);
  /*overflow: hidden;*/
}

.mdst-table td > .mdst-pre {
  overflow-x: auto;
}

.mdst-table td:last-child {
  padding-right: 0;
}

.mdst-table tbody tr:last-child td {
  border-bottom: none;
}

/* Variants */

.mdst-table--bordered {
  border: var(--mdst-border-width) solid var(--mdst-color-border);
}

.mdst-table--bordered th,
.mdst-table--bordered td {
  padding: var(--mdst-space-sm) var(--mdst-space-md);
  border: var(--mdst-border-width) solid var(--mdst-color-border);
}

.mdst-table--striped tbody tr:nth-child(odd) {
  background: var(--mdst-color-subtle);
}

.mdst-table--compact th {
  padding: var(--mdst-space-xs) var(--mdst-space-sm) var(--mdst-space-xs) 0;
}

.mdst-table--compact td {
  padding: var(--mdst-space-sm) var(--mdst-space-sm) var(--mdst-space-sm) 0;
}

.mdst-table--compact th:last-child,
.mdst-table--compact td:last-child {
  padding-right: 0;
}

/* Fixed/Equal column widths */

.mdst-table--fixed {
  table-layout: fixed;
}

/* Stack variant - stacks rows on mobile */

@media (max-width: 480px) {
  .mdst-table--stack thead {
    display: none;
  }

  .mdst-table--stack tbody,
  .mdst-table--stack tr,
  .mdst-table--stack td {
    display: block;
    width: 100%;
  }

  .mdst-table--stack tr {
    padding: var(--mdst-space-md) 0;
    border-bottom: var(--mdst-border-width) solid var(--mdst-color-subtle);
  }

  .mdst-table--stack tbody tr:last-child {
    border-bottom: none;
  }

  .mdst-table--stack td {
    padding: 0;
    border-bottom: none;
  }

  .mdst-table--stack td:first-child {
    margin-bottom: var(--mdst-space-sm);
  }
}

/* Tooltip (Popover-based) */

.mdst-tooltip {
  padding: var(--mdst-space-xs) var(--mdst-space-sm);
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  background: var(--mdst-color-fg);
  color: var(--mdst-color-bg);
  font-size: var(--mdst-text-sm);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
  margin: 0;
  max-width: 16rem;
  text-align: center;

  /* Anchor positioning - use anchor attribute on HTML to link to trigger */
  position-area: bottom;
  margin-top: var(--mdst-space-xs);
}

.mdst-tooltip:popover-open {
  opacity: 1;
}

/* Typography */

.mdst-h1,
.mdst-h2,
.mdst-h3,
.mdst-h4,
.mdst-h5,
.mdst-h6 {
  font-family: var(--mdst-font-sans);
  font-weight: 600;
  line-height: 1.25;
  color: var(--mdst-color-fg);
}

.mdst-h1 {
  font-size: 2.5rem;
}

.mdst-h2 {
  font-size: 2rem;
}

.mdst-h3 {
  font-size: 1.5rem;
}

.mdst-h4 {
  font-size: 1.25rem;
}

.mdst-h5 {
  font-size: 1rem;
}

.mdst-h6 {
  font-size: 0.875rem;
}

/* Paragraph */

.mdst-p {
  font-family: var(--mdst-font-sans);
  font-size: var(--mdst-text-base);
  line-height: var(--mdst-line-height);
  color: var(--mdst-color-fg);
}

.mdst-p--sm {
  font-size: var(--mdst-text-sm);
}

.mdst-p--lg {
  font-size: var(--mdst-text-lg);
}

.mdst-p--muted {
  color: var(--mdst-color-muted);
}

/* Links */

.mdst-a {
  color: var(--mdst-color-fg);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: opacity var(--mdst-transition);
}

.mdst-a:hover {
  opacity: 0.6;
}

.mdst-a:focus-visible {
  outline: var(--mdst-border-width) solid var(--mdst-color-focus);
  outline-offset: var(--mdst-border-width);
}

/* Strong / Bold */

.mdst-strong {
  font-weight: 600;
}

/* Emphasis / Italic */

.mdst-em {
  font-style: italic;
}

/* Small */

.mdst-small {
  font-size: var(--mdst-text-sm);
}

/* Mark / Highlight */

.mdst-mark {
  background-color: var(--mdst-color-subtle);
  padding: 0.1em 0.2em;
}

/* Blockquote */

.mdst-blockquote {
  margin: 0;
  padding-left: var(--mdst-space-md);
  border-left: var(--mdst-space-1) solid var(--mdst-color-border);
  font-style: italic;
  color: var(--mdst-color-muted);
}

/* Horizontal Rule */

.mdst-hr {
  border: none;
  border-top: var(--mdst-border-width) solid var(--mdst-color-border);
  margin: var(--mdst-space-lg) 0;
}

.mdst-hr--flush {
  margin: 0;
}

/* Lists */

.mdst-ul,
.mdst-ol {
  padding-left: var(--mdst-space-lg);
  line-height: var(--mdst-line-height);
}

.mdst-ul {
  list-style-type: disc;
}

.mdst-ol {
  list-style-type: decimal;
}

.mdst-li {
  margin-bottom: var(--mdst-space-xs);
}

.mdst-li:last-child {
  margin-bottom: 0;
}

/* Unstyled list */

.mdst-ul--unstyled {
  list-style: none;
  padding-left: 0;
}

/* Card */

.mdst-card {
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  background: var(--mdst-color-bg);
}

.mdst-card-header {
  padding: var(--mdst-space-md);
  border-bottom: var(--mdst-border-width) solid var(--mdst-color-border);
  font-weight: 600;
}

.mdst-card-body {
  padding: var(--mdst-space-md);
}

.mdst-card-footer {
  padding: var(--mdst-space-md);
  border-top: var(--mdst-border-width) solid var(--mdst-color-border);
}

/* Remove double borders between adjacent sections */

.mdst-card-header + .mdst-card-body {
  border-top: none;
}

.mdst-card-body + .mdst-card-footer {
  border-top: var(--mdst-border-width) solid var(--mdst-color-border);
}

/* Variants */

.mdst-card--borderless {
  border: none;
}

.mdst-card--borderless > .mdst-card-header {
  border-bottom: var(--mdst-border-width) solid var(--mdst-color-border);
}

.mdst-card--borderless > .mdst-card-footer {
  border-top: var(--mdst-border-width) solid var(--mdst-color-border);
}

.mdst-card--interactive {
  transition:
    box-shadow var(--mdst-transition),
    border-color var(--mdst-transition);
  cursor: pointer;
}

.mdst-card--interactive:hover {
  border-color: var(--mdst-color-fg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.mdst-card--interactive:focus-visible {
  outline: var(--mdst-border-width) solid var(--mdst-color-focus);
  outline-offset: var(--mdst-border-width);
}

/* Padding variants */

.mdst-card--compact > .mdst-card-header,
.mdst-card--compact > .mdst-card-body,
.mdst-card--compact > .mdst-card-footer {
  padding: var(--mdst-space-sm);
}

/* Flush — no padding, for embedding raw content like tables or images */

.mdst-card--flush > .mdst-card-body {
  padding: 0;
}

/* Tag */

.mdst-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--mdst-space-xs);
  padding: 0.25em 0.5em;
  font-size: var(--mdst-text-sm);
  line-height: 1;
  border: var(--mdst-border-width) solid var(--mdst-color-border);
  border-radius: var(--mdst-radius);
  background: var(--mdst-color-bg);
  color: var(--mdst-color-fg);
  white-space: nowrap;
  vertical-align: middle;
}

/* Variants */

.mdst-tag--solid {
  background: var(--mdst-color-fg);
  color: var(--mdst-color-bg);
}

.mdst-tag--subtle {
  background: var(--mdst-color-subtle);
  border-color: transparent;
}

.mdst-tag--ghost {
  border-color: transparent;
  background: transparent;
}

/* Status */

.mdst-tag--error {
  border-color: var(--mdst-color-error);
  color: var(--mdst-color-error);
}

.mdst-tag--error.mdst-tag--solid {
  background: var(--mdst-color-error);
  color: var(--mdst-color-bg);
  border-color: var(--mdst-color-error);
}

.mdst-tag--error.mdst-tag--subtle {
  background: color-mix(in srgb, var(--mdst-color-error) 10%, transparent);
  border-color: transparent;
}

.mdst-tag--success {
  border-color: var(--mdst-color-success);
  color: var(--mdst-color-success);
}

.mdst-tag--success.mdst-tag--solid {
  background: var(--mdst-color-success);
  color: var(--mdst-color-bg);
  border-color: var(--mdst-color-success);
}

.mdst-tag--success.mdst-tag--subtle {
  background: color-mix(in srgb, var(--mdst-color-success) 10%, transparent);
  border-color: transparent;
}

.mdst-tag--muted {
  border-color: var(--mdst-color-muted);
  color: var(--mdst-color-muted);
}

.mdst-tag--muted.mdst-tag--solid {
  background: var(--mdst-color-muted);
  color: var(--mdst-color-bg);
  border-color: var(--mdst-color-muted);
}

.mdst-tag--muted.mdst-tag--subtle {
  background: var(--mdst-color-subtle);
  border-color: transparent;
  color: var(--mdst-color-muted);
}

/* Sizes */

.mdst-tag--sm {
  font-size: var(--mdst-text-xs);
  padding: 0.1875em 0.375em;
}

.mdst-tag--lg {
  font-size: var(--mdst-text-base);
  padding: 0.3125em 0.625em;
}

/* Pill shape */

.mdst-tag--pill {
  border-radius: 9999px;
  padding-inline: 0.75em;
}

/* Interactive (dismissible / clickable) */

.mdst-tag--interactive {
  cursor: pointer;
  transition: opacity var(--mdst-transition);
}

.mdst-tag--interactive:hover {
  opacity: 0.75;
}

/* Dismiss button inside a tag */

.mdst-tag-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.6;
  font-size: 1em;
  line-height: 1;
  transition: opacity var(--mdst-transition-fast);
}

.mdst-tag-dismiss:hover {
  opacity: 1;
}

/* Utilities */

/* Screen reader only — visually hidden but accessible */

.mdst-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Text truncation — single-line ellipsis overflow */

.mdst-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Muted text color */

.mdst-muted {
  color: var(--mdst-color-muted);
}

/* Monospace font */

.mdst-mono {
  font-family: var(--mdst-font-mono);
}

