/* Ordia canonical Fieldsets source
   This file contains canonical implementation CSS only.
   It must not redefine shared foundation tokens in :root.
*/

.fieldset-stack {
  display: grid;
  gap: 48px;
}

.fieldset-shell {
  background: rgba(255,255,255,0.024);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.fieldset-shell.is-active {
  background: rgba(255,255,255,0.028);
  border-color: rgba(255,255,255,0.16);
}

.fieldset-shell.is-hover .fieldset-header {
  background: rgba(255,255,255,0.014);
}

.fieldset-shell.is-active .fieldset-header {
  background: rgba(255,255,255,0.048);
  border-bottom-color: rgba(255,255,255,0.12);
}

.fieldset-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 1.05rem 1.2rem;
  background: transparent;
  border-bottom: 1px solid transparent;
}

.fieldset-shell.is-active .fieldset-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255,255,255,0.16);
}

.fieldset-ring {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fieldset-ring svg {
  display: block;
  width: 20px;
  height: 20px;
}

.fieldset-ring-track {
  stroke: rgba(255,255,255,0.12);
  stroke-width: 2.5;
  fill: none;
}

.fieldset-ring-progress {
  stroke: #00a388;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
}

.fieldset-ring-tick {
  stroke: #00a388;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.fieldset-header-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.fieldset-kickered-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.18rem 0.5rem;
}

.fieldset-kicker {
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d7d0bb;
}

.fieldset-helper {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: #a9b6bd;
}

.fieldset-heading {
  flex-basis: 100%;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.28;
  color: #d7dee3;
}

.fieldset-shell.is-active .fieldset-heading,
.fieldset-shell.is-open .fieldset-heading,
.fieldset-shell.is-done .fieldset-heading {
  color: #f2eee8;
}

.fieldset-subtext-wrap {
  min-height: 18px;
}

.fieldset-subtext {
  display: block;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: #98a5ad;
}

.fieldset-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.icon-button {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: #98a5ad;
  transition:
    color 120ms ease,
    background-color 120ms ease;
}

.icon-button svg {
  width: 14px;
  height: 14px;
  display: block;
}

.icon-button path {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.is-hover {
  color: #c2ccd2;
  background: rgba(255,255,255,0.055);
}

.icon-button.is-pressed {
  color: #f2eee8;
  background: rgba(255,255,255,0.09);
}

.icon-button.is-disabled {
  color: rgba(152,165,173,0.34);
  background: transparent;
}

.icon-button--collapse svg {
  transform-origin: 50% 50%;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.icon-button--collapse.is-expanded svg {
  transform: rotate(180deg);
}

.fieldset-body {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.fieldset-body-inner {
  padding: 0.95rem 1.2rem 1.2rem;
  display: grid;
  gap: 14px;
}


@media (prefers-reduced-motion: reduce) {
  .icon-button,
  .icon-button svg,
  .icon-button--collapse svg {
    transition: none;
  }
}
