.cc-webform {
  max-width: 42rem;
  margin-top: 0;
}
.cc-webform .form-item:first-child {
  margin-top: 0;
}
.cc-webform .form-floating {
  margin-bottom: 1.25rem;
}
.cc-webform .form-floating .form-control {
  font-size: 1rem;
  line-height: 1;
  height: calc(3.25rem + calc(var(--bs-border-width) * 2));
  min-height: calc(3.25rem + calc(var(--bs-border-width) * 2));
}
.cc-webform .form-floating > label {
  color: var(--cc-color-text-muted);
  font-weight: 400;
  height: auto;
  font-size: 1rem;
  overflow: visible;
  text-overflow: clip;
}
.cc-webform .form-floating > .form-control:not(:placeholder-shown) ~ label,
.cc-webform .form-floating > .form-control:focus ~ label,
.cc-webform .form-floating > .form-select ~ label {
  background: #fff;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  color: var(--cc-color-text-muted);
  font-size: 0.75rem;
  opacity: 1;
  padding: 0 0.375rem;
  margin-left: 0.75rem;
}
.cc-webform .form-floating > .form-control:not(textarea),
.cc-webform .form-floating > .form-select {
  border-color: var(--cc-color-border, #dee2e6);
  border-radius: 0.375rem;
  color: var(--cc-color-text, #212529);
}
.cc-webform .form-floating > .form-control:not(textarea):focus,
.cc-webform .form-floating > .form-select:focus {
  border-color: var(--psu-beaver-blue, #1e407c);
  box-shadow: 0 0 0 0.2rem rgba(30, 64, 124, 0.15);
  outline: none;
}
.cc-webform .form-floating > .form-control:not(textarea)::placeholder,
.cc-webform .form-floating > .form-select::placeholder {
  color: transparent;
}
.cc-webform .form-floating > .form-control-plaintext:focus,
.cc-webform .form-floating > .form-control-plaintext:not(:placeholder-shown),
.cc-webform .form-floating > .form-control:focus,
.cc-webform .form-floating > .form-control:not(:placeholder-shown) {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.cc-webform .form-floating .form-textarea-wrapper {
  margin: 0;
  padding: 0;
}
.cc-webform .form-floating .form-textarea-wrapper > textarea.form-control {
  min-height: 6rem;
  padding-top: 1rem;
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  padding-bottom: 0.625rem;
  border-color: var(--cc-color-border, #dee2e6);
  border-radius: 0.375rem;
  color: var(--cc-color-text, #212529);
  line-height: 1.5;
  resize: vertical;
}
.cc-webform .form-floating .form-textarea-wrapper > textarea.form-control:focus {
  border-color: var(--psu-beaver-blue, #1e407c);
  box-shadow: 0 0 0 0.2rem rgba(30, 64, 124, 0.15);
  outline: none;
}
.cc-webform .form-floating .form-textarea-wrapper > textarea.form-control::placeholder {
  color: transparent;
}
.cc-webform .form-floating:focus-within:has(.form-textarea-wrapper) > label, .cc-webform .form-floating:has(.form-textarea-wrapper > textarea:not(:placeholder-shown)) > label {
  transform: scale(1) translateY(-0.5rem) translateX(0.15rem);
  background: #fff;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  padding-block: 0;
  margin-left: 1rem;
  font-size: 0.75rem;
  opacity: 1;
}
.cc-webform .form-floating:focus-within:has(.form-textarea-wrapper) > label.form-required, .cc-webform .form-floating:has(.form-textarea-wrapper > textarea:not(:placeholder-shown)) > label.form-required {
  margin-top: -0.25rem;
}
.cc-webform .form-floating > .form-control-plaintext ~ label,
.cc-webform .form-floating > .form-control:focus ~ label,
.cc-webform .form-floating > .form-control:not(:placeholder-shown) ~ label,
.cc-webform .form-floating > .form-select ~ label {
  transform: scale(1) translateY(-0.5rem) translateX(0.15rem);
}
.cc-webform .form-floating > .form-control-plaintext ~ label.form-required,
.cc-webform .form-floating > .form-control:focus ~ label.form-required,
.cc-webform .form-floating > .form-control:not(:placeholder-shown) ~ label.form-required,
.cc-webform .form-floating > .form-select ~ label.form-required {
  margin-top: -0.25rem;
}
.cc-webform .webform-element-description {
  color: var(--cc-color-text-muted);
  font-size: 0.75rem;
  margin-top: -0.875rem;
  margin-bottom: -0.375rem;
  margin-left: 1rem;
  line-height: 1.4;
}
.cc-webform .form-actions,
.cc-webform .webform-actions {
  margin-top: 1.5rem;
  margin-bottom: 0;
  padding-top: 0.25rem;
}
.cc-webform .webform-button--submit {
  min-width: 8rem;
}

.block-webform-block {
  margin-top: 0;
}

.cc-webform .form-required::after {
  content: '*' !important;
  color: var(--cc-color-text-required, --cc-color-text-muted);
  margin-left: 0.25rem;
  margin-right: 0 !important;
}

.form-floating > label.form-required {
  padding-top: 0.5rem;
}

.cc-webform .form-floating > .form-control-plaintext ~ label::after,
.cc-webform .form-floating > .form-control:focus ~ label::after,
.cc-webform .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
.cc-webform .form-floating > .form-select ~ label::after {
  position: static;
}
