/* Survey-only controls. Page chrome comes from contact-portal.css. */
.customer-survey-page .corporate-survey-prompt {
  display: none;
}

.customer-survey-page .corporate-sidebar-help-lead {
  margin: 0;
  font-size: 0.9375em;
  line-height: 1.55;
  color: #475569;
}

/*
  Sticky aside: native CSS, not JS/fixed.
  overflow-x:hidden on .contact-portal creates a scroll container and
  prevents sticky from tracking the viewport. clip/visible does not.
*/
.contact-portal.customer-survey-page {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .contact-portal.customer-survey-page {
    overflow-x: visible;
  }
}

.customer-survey-page .contact-portal-page-grid {
  align-items: start;
}

.customer-survey-page .contact-portal-sidebar-col {
  position: sticky;
  top: max(1.25rem, env(safe-area-inset-top, 0px));
  align-self: start;
  z-index: 2;
  width: 100%;
  max-height: calc(100vh - 2.5rem);
  max-height: calc(100dvh - max(1.25rem, env(safe-area-inset-top, 0px)) - 1.25rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

@media (max-width: 991px) {
  .customer-survey-page .contact-portal-sidebar-col {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.csat-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.csat-fieldset {
  border: 0 !important;
  margin: 0 0 20px;
  padding: 0;
  min-width: 0;
}

.csat-fieldset legend.form-label {
  float: none;
  width: 100%;
  margin-bottom: 8px;
}

.csat-scale {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.csat-scale-end {
  font-size: 0.875em;
  color: #64748b;
}

.csat-scale-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.csat-scale-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.contact-portal .csat-scale-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  line-height: 1;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #263c50;
  font-weight: 700;
  font-size: 1em;
}

.csat-scale-option input:focus-visible + span {
  outline: 3px solid #d21242;
  outline-offset: 2px;
}

.csat-scale-option input:checked + span {
  background: #d21242;
  border-color: #d21242;
  color: #ffffff;
}

.csat-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.csat-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 1em;
  color: #263c50;
  min-height: 48px;
}

.csat-choice input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.csat-choice:has(input:checked) {
  border-color: #d21242;
  background: #fffafa;
}

.csat-choice:has(input:focus-visible) {
  outline: 3px solid #d21242;
  outline-offset: 2px;
}

.csat-hint {
  margin: 8px 0 0;
  font-size: 0.875em;
  color: #64748b;
}

.customer-survey-confirm[hidden] {
  display: none;
}

.contact-portal .csat-confirm-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #263c50;
  font-size: 1em;
  font-weight: 400;
  line-height: 1.6;
}

.contact-portal .csat-confirm-box i {
  margin-top: 4px;
  color: #059669;
  flex-shrink: 0;
}

.csat-confirm-box h3 {
  margin: 0 0 8px;
  font-size: 1.25em;
  font-weight: 700;
  color: #263c50;
}

.csat-confirm-box p {
  margin: 0 0 12px;
  color: #475569;
}

.csat-confirm-box p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .csat-scale-end {
    flex-basis: 100%;
  }
}
