/* Shared form structure across menu and analysis. */

.vk-form-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: var(--vk-form-page-pad-top) var(--vk-form-page-pad-x) var(--vk-form-page-pad-bottom);
  box-sizing: border-box;
}

.vk-form-card {
  position: relative;
  width: min(var(--vk-form-card-width), 100%);
  min-width: 0;
  display: grid;
  align-content: start;
  gap: var(--vk-form-card-gap);
  padding: var(--vk-form-card-padding);
  border: 1px solid var(--vk-paper-depth-inset-bg);
  border-radius: var(--vk-form-card-radius);
  background: var(--vk-app-surface-panel);
  box-shadow: var(--vk-shadow-form-card);
  box-sizing: border-box;
}

.vk-form-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--vk-space-section);
  min-height: var(--vk-form-control-height);
}

.vk-form-title {
  margin: 0;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: var(--vk-font-title-lg);
  line-height: var(--vk-line-compact);
  font-weight: var(--vk-weight-bold);
  color: var(--vk-text-primary);
}

.vk-form-hint {
  margin: 0;
  color: var(--vk-text-secondary);
  font-family: var(--font-ui);
  font-size: var(--vk-font-body);
  line-height: var(--vk-line-readable);
  white-space: pre-line;
}

.vk-form-hint-block {
  min-height: calc(var(--vk-font-body) * var(--vk-line-readable) * 3);
  display: flex;
  align-items: center;
  padding: 0 var(--vk-space-micro);
  box-sizing: border-box;
}

.vk-form-hint-block .vk-form-hint {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vk-form-section,
.vk-form-block,
.vk-form-fields,
.new-variation-section,
.new-variation-form-block,
.new-variation-fields {
  display: grid;
  gap: var(--vk-form-block-gap);
}

.vk-form-section,
.new-variation-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.vk-form-block + .vk-form-block,
.new-variation-form-block + .new-variation-form-block,
.new-variation-form-block--selection + .new-variation-form-block--actions {
  margin-top: var(--vk-form-block-spaced-gap);
  padding-top: 0;
}

.vk-form-block--actions,
.new-variation-form-block--actions {
  gap: var(--vk-form-actions-gap);
}

.vk-form-block[hidden],
.vk-form-block.is-hidden,
.vk-form-fields[hidden],
.vk-form-fields.is-hidden,
.vk-form-section[hidden],
.vk-form-section.is-hidden,
.new-variation-fields.is-hidden,
.new-variation-form-block.is-hidden,
.new-variation-section.is-hidden {
  display: none !important;
}

.vk-form-field {
  min-width: 0;
  display: grid;
  gap: var(--vk-form-field-gap);
}

.vk-form-label {
  font-family: var(--font-ui);
  font-size: var(--vk-form-label-font-size);
  line-height: var(--vk-form-label-line-height);
  font-weight: var(--vk-weight-medium);
  color: var(--vk-paper-lift-button-text);
}
