/* ENGAGE 0.10.3 feedback: extend the existing learning and navigation components.
   Page widths, headings, cards, fields and buttons inherit directly from app.css. */
@supports (overflow:clip) { html,body { overflow-x:clip; } }

/* Feedback belongs to the regular site navigation. Keep the reminder compact. */
.feedback-banner { background:var(--surface-green,#eff7f2); border-bottom:1px solid var(--line); color:var(--ink); }
.feedback-banner-inner { display:flex; align-items:center; gap:24px; padding-top:9px; padding-bottom:9px; }
.feedback-banner-copy { display:flex; align-items:center; gap:16px; flex:1; min-width:0; }
.feedback-banner-title { flex:0 0 auto; max-width:230px; font-size:13px; font-weight:750; line-height:1.45; }
.feedback-banner-copy p { font-size:12px; line-height:1.55; color:#536c62; margin:0; }
.feedback-banner .btn { gap:10px; flex:0 0 auto; max-width:230px; min-height:44px; padding:10px 14px; font-size:13px; color:var(--green-dark); text-align:center; }
.feedback-banner .btn>span[aria-hidden] { font-size:16px; line-height:1; }
body.feedback-pending .course-side { top:calc(var(--engage-header-height,150px) + 18px); }
body.feedback-pending .admin-mobile-nav { top:var(--engage-header-height,150px); }
body.feedback-pending .module-jump-nav { top:calc(var(--engage-header-height,150px) + var(--engage-admin-nav-height,0px) + 12px); }

/* One native learning-block, with the progress summary in its header. */
.feedback-form,.feedback-submitted-card { min-width:0; }
.feedback-form { scroll-margin-top:calc(var(--engage-header-height,150px) + 20px); }
.feedback-form-head { gap:28px; }
.feedback-form-intro { flex:1; min-width:0; }
.feedback-introduction { font-size:14px; line-height:1.65; color:var(--muted); margin:9px 0 0; }
.feedback-progress-overview { flex:0 0 210px; max-width:100%; padding-left:24px; border-left:1px solid var(--line); }
.feedback-progress-label { display:block; font-size:13px; line-height:1.55; margin:9px 0 13px; }
.feedback-progress-bar { -webkit-appearance:none; appearance:none; display:block; width:100%; height:8px; border:0; border-radius:99px; background:#e7ede9; overflow:hidden; }
.feedback-progress-bar::-webkit-progress-bar { background:#e7ede9; border-radius:99px; }
.feedback-progress-bar::-webkit-progress-value { background:linear-gradient(90deg,var(--green-dark),var(--green),var(--lime)); border-radius:99px; }
.feedback-progress-bar::-moz-progress-bar { background:linear-gradient(90deg,var(--green-dark),var(--green),var(--lime)); border-radius:99px; }
.feedback-required-note { font-size:12px; line-height:1.65; color:var(--muted); margin:21px 0 26px; padding-bottom:22px; border-bottom:1px solid var(--line); }
.feedback-section { min-width:0; }
.feedback-section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:16px; }
.feedback-section-heading>small { flex:0 0 auto; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.feedback-section-description { font-size:14px; line-height:1.6; color:var(--muted); margin:0 0 12px; }
.feedback-scale-note { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px 24px; margin:16px 0 0; padding:12px 14px; border:1px solid var(--line); border-radius:var(--radius-sm,10px); background:var(--surface-soft,#f8faf9); color:#536c62; font-size:12px; line-height:1.55; }
.feedback-scale-note>span { display:flex; align-items:baseline; gap:8px; min-width:0; max-width:100%; }
.feedback-scale-note strong { flex:0 0 auto; color:var(--green-dark); font-weight:750; }

/* Use the quiz answer-option, with its native radio visible at every size. */
.feedback-question { min-width:0; scroll-margin-top:calc(var(--engage-header-height,150px) + 22px); }
.feedback-question legend { width:100%; }
.feedback-rating-options { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.feedback-rating-options .answer-option { align-items:center; justify-content:center; gap:10px; margin:0; min-width:0; min-height:46px; }
.feedback-rating-choice input { position:static; flex:0 0 16px; width:16px; height:16px; margin:0; accent-color:var(--green-dark); cursor:pointer; }
.feedback-rating-value { font-variant-numeric:tabular-nums; }
.feedback-rating-choice input:checked+.feedback-rating-value { color:var(--green-dark); font-weight:750; }
.feedback-rating-choice:focus-within { outline:2px solid var(--green-dark); outline-offset:3px; }
@supports selector(:has(*)) {
  .feedback-rating-choice:has(input:checked) { background:var(--surface-green,#eff7f2); border-color:var(--green-dark); }
}

/* Text fields follow the profile and quiz form typography. */
.feedback-written-section { border-top:1px solid var(--line); margin-top:30px; padding-top:24px; }
.feedback-text-hint { font-size:12px; line-height:1.65; color:var(--muted); margin:0 0 24px; }
.feedback-text-question { margin:28px 0; }
.feedback-text-question>label { display:flex; gap:12px; align-items:flex-start; font-size:16px; font-weight:750; line-height:1.45; margin-bottom:12px; }
.feedback-question-number { display:grid; place-items:center; flex:0 0 28px; height:28px; border-radius:9px; background:#eef7f1; color:var(--green-dark); font-size:12px; line-height:1; font-weight:750; }
.feedback-text-question textarea { display:block; min-height:112px; resize:vertical; scroll-margin-top:calc(var(--engage-header-height,150px) + 22px); }
.feedback-character-count { display:block; color:var(--muted); font-size:11px; text-align:right; margin-top:6px; line-height:1.5; font-variant-numeric:tabular-nums; }
.feedback-has-error textarea,.feedback-has-error .answer-option { border-color:#ad5048; }
.feedback-has-error legend>span,.feedback-has-error .feedback-question-number { background:#fff0ef; color:#9d2d27; }
.feedback-field-error { margin:9px 0 0; font-size:13px; line-height:1.55; color:#9d2d27; }
.feedback-error-summary { scroll-margin-top:calc(var(--engage-header-height,150px) + 20px); }
.feedback-error-summary a { text-decoration:underline; text-underline-offset:2px; }
.feedback-error-summary li+li { margin-top:6px; }

/* Submit and read-only states stay within the same panel. */
.feedback-account-note { font-size:12px; line-height:1.65; color:var(--muted); margin:26px 0 0; }
.feedback-ready-note[hidden] { display:none; }
.feedback-submit-row { align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-top:20px; }
.feedback-form-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; margin-left:auto; }
.feedback-save-status { font-size:12px; line-height:1.55; color:var(--green-dark); max-width:100%; }
.feedback-save-status:empty { display:none; }
.feedback-save-failed { color:#9d2d27; }
.feedback-submitted-card .quiz-head { align-items:flex-start; }
.feedback-submitted-card .status { flex:0 0 auto; }
.feedback-submission-meta { display:flex; flex-wrap:wrap; gap:16px 40px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin:24px 0; padding:18px 0; }
.feedback-submission-meta>div { min-width:0; }
.feedback-submission-meta dt { font-size:12px; color:var(--muted); }
.feedback-submission-meta dd { font-size:14px; margin:5px 0 0; overflow-wrap:anywhere; }
.feedback-answer-list { margin:0; }
.feedback-answer-row { padding:22px 0; border-bottom:1px solid var(--line); }
.feedback-answer-row:last-child { border-bottom:0; padding-bottom:0; }
.feedback-answer-row dt { display:flex; align-items:flex-start; gap:12px; font-size:16px; font-weight:750; line-height:1.45; }
.feedback-answer-row dd { margin:12px 0 0 40px; color:var(--muted); font-size:14px; line-height:1.75; overflow-wrap:anywhere; }
.feedback-answer-row.is-rating { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:20px; }
.feedback-answer-row.is-rating dd { margin:0; }
.feedback-answer-score { display:inline-block; font-size:18px; white-space:nowrap; color:var(--green-dark); }
.feedback-answer-score small { font-size:12px; font-weight:500; }

/* Existing dashboard/profile feedback entries use the standard card proportions. */
.feedback-hub-card { display:flex; align-items:center; gap:24px; padding:22px; margin-bottom:24px; border:1px solid var(--line); border-radius:var(--radius-lg,20px); background:var(--paper,#fff); box-shadow:var(--shadow-sm); }
.feedback-hub-copy { flex:1; min-width:0; }
.feedback-hub-title { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:6px; }
.feedback-hub-title h2 { font-size:22px; line-height:1.3; margin:0; }
.feedback-hub-copy p { color:var(--muted); font-size:14px; line-height:1.6; margin:0; }
.feedback-hub-card>.btn { flex:0 0 auto; gap:10px; max-width:240px; text-align:center; }
.feedback-state { display:inline-flex; align-items:center; padding:6px 10px; border-radius:99px; background:#f1f4f2; color:#536c62; font-size:11px; line-height:1.5; font-weight:750; }
.feedback-state.is-draft { background:#fff4db; color:#906716; }
.feedback-state.is-submitted { background:#e6f6ed; color:var(--green-dark); }
.feedback-profile-card { flex-wrap:wrap; margin:22px 0 0; }

/* The additional navigation item uses the native mobile menu on tablets too. */
@media (min-width:921px) and (max-width:1200px) {
  .feedback-navigation .main-nav { display:none; }
  .feedback-navigation .brand { flex:1; }
  .feedback-navigation .mobile-nav-toggle { display:flex; flex:0 0 42px; }
  .feedback-navigation .mobile-site-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding-top:10px; padding-bottom:12px; border-top:1px solid rgba(23,37,45,.06); }
  .feedback-navigation .mobile-site-nav a { display:flex; align-items:center; justify-content:center; min-height:46px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:#fff; font-size:13px; font-weight:750; color:#3d554c; text-align:center; }
  .feedback-navigation .mobile-site-nav a.active { background:var(--surface-green,#eff7f2); border-color:#c9ddd0; color:var(--green-dark); }
}
@media (max-width:760px) {
  .feedback-banner-copy { display:block; }
  .feedback-banner-copy p { margin-top:2px; }
  .feedback-form-head { flex-direction:column; gap:14px; }
  .feedback-form-head .block-label { display:none; }
  .feedback-form-head .feedback-introduction { margin-top:0; }
  .feedback-progress-overview { flex:auto; width:100%; padding:0; border:0; }
  .feedback-progress-label { margin:0 0 10px; }
}
@media (max-width:620px) {
  .feedback-banner-inner { gap:12px; padding-top:8px; padding-bottom:8px; }
  .feedback-banner-title { font-size:12px; }
  .feedback-banner-copy p { display:none; }
  .feedback-banner .btn { font-size:14px; max-width:150px; padding:10px 12px; }
  .feedback-banner .btn>span[aria-hidden] { display:none; }
  .feedback-required-note { margin-top:14px; padding-bottom:14px; }
  .feedback-scale-note { padding:10px 12px; gap:7px 14px; }
  .feedback-rating-options { gap:7px; }
  .feedback-rating-options .answer-option { gap:6px; padding:10px 4px; min-height:48px; }
  .feedback-rating-choice input { flex-basis:16px; width:16px; height:16px; }
  .feedback-text-question>label,.feedback-answer-row dt { font-size:15.5px; }
  .feedback-text-question { margin:23px 0; }
  .feedback-form-actions { width:100%; flex-direction:column; }
  .feedback-form-actions .btn { width:100%; }
  .feedback-submit-row { align-items:stretch; }
  .feedback-save-status { width:100%; }
  .feedback-answer-row.is-rating { grid-template-columns:1fr; gap:10px; }
  .feedback-answer-row.is-rating dd { margin-left:40px; }
  .feedback-hub-card { flex-direction:column; align-items:stretch; gap:16px; padding:20px; }
  .feedback-hub-card>.btn { max-width:none; width:100%; }
}
@media (prefers-reduced-motion:reduce) { .feedback-rating-choice { transition:none; } }
@media (forced-colors:active) {
  .feedback-rating-choice:focus-within { outline-color:Highlight; }
  .feedback-rating-choice input { accent-color:auto; }
}
@media print {
  .feedback-banner,.feedback-form-actions { display:none!important; }
  .feedback-question,.feedback-text-question,.feedback-answer-row { break-inside:avoid; }
}
