/* Impulsa Ruralia: Asesorías (advise.php).
   Visual source of truth: the client prototype view ?vista=asesoria
   (.rb-simple-view, .rb-simple-head, .rb-form).
   Loaded from advise.php only, after setup_page. Not part of $THEME->sheets.
   Work Sans, olive #6e7d41, yellow #fdc608, beige #f2e7dd, ink #263619. */

/* The prototype pins these views to light. */
:root {
  color-scheme: light;
}

/* lib.php adds body.impulsa-page; impulsa.css also uses .impulsa-page as a
   content wrapper (max-width 1120 + auto margins), which boxes the whole body.
   Undo that on these two pages so the chrome stays full width. */
body.path-local-impulsa.impulsa-page {
  max-width: none;
  margin: 0;
  background: #fff;
  color: #000;
}

body.path-local-impulsa #page,
body.path-local-impulsa #page-wrapper,
body.path-local-impulsa #topofscroll,
body.path-local-impulsa #region-main {
  background: #fff;
}

/* The prototype has no Moodle page heading band. */
body.path-local-impulsa #page-header {
  display: none;
}

body.path-local-impulsa #region-main {
  padding-block: 0;
  border: 0;
  box-shadow: none;
}

.impulsa-simple {
  max-width: 960px;
  min-height: 55vh;
  margin: 0 auto;
  padding: 38px 0 70px;
  font-family: "Work Sans", Arial, sans-serif;
  line-height: normal;
  color: #000;
}

.impulsa-simple *,
.impulsa-simple *::before,
.impulsa-simple *::after {
  box-sizing: border-box;
}

.impulsa-simple a.impulsa-simple__back {
  color: #4d622c;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.impulsa-simple a.impulsa-simple__back:hover {
  text-decoration: underline;
}

.impulsa-simple__head {
  max-width: 700px;
  margin: 30px 0 27px;
}

.impulsa-simple__head span {
  color: #56683b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.impulsa-simple__head h1 {
  margin: 7px 0 12px;
  color: #263619;
  font-family: "Work Sans", Arial, sans-serif !important;
  font-size: 37px;
  font-weight: 700;
  line-height: 1.16;
}

.impulsa-simple__head p {
  margin: 0;
  color: #4c5547;
  font-size: 16px;
  line-height: 1.55;
}

.impulsa-simple__card {
  border: 1px solid #ded9cc;
  border-radius: 15px;
  background: #fffdfa;
}

/* Advisory card: same shell as the prototype form. */
.impulsa-simple__card--advise {
  display: grid;
  gap: 20px;
  max-width: 800px;
  padding: 28px;
}

.impulsa-simple__label {
  margin: 0;
  color: #263619;
  font-size: 14px;
  font-weight: 700;
}

.impulsa-simple__note {
  margin: 0;
  color: #4c5547;
  font-size: 13px;
  line-height: 1.5;
}

.impulsa-simple a.impulsa-simple__btn,
.impulsa-simple button.impulsa-simple__btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
  padding: 9px 16px;
  border: 1px solid #5c6d36;
  border-radius: 9px;
  background: #5c6d36;
  color: #fff;
  font: 700 14px/1.3 "Work Sans", Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}

.impulsa-simple a.impulsa-simple__btn:hover,
.impulsa-simple button.impulsa-simple__btn:hover {
  background: #48582b;
  color: #fff;
}

.impulsa-simple a.impulsa-simple__btn:focus-visible,
.impulsa-simple button.impulsa-simple__btn:focus-visible {
  outline: 3px solid #fdc608;
  outline-offset: 3px;
}

.impulsa-simple a:focus-visible {
  outline: 3px solid #fdc608;
  outline-offset: 3px;
}

/* Request form (prototype .rb-form): two columns, challenge full width. */
.impulsa-simple button.impulsa-simple__btn {
  cursor: pointer;
  /* The theme uppercases every button; the prototype keeps sentence case. */
  text-transform: none;
  letter-spacing: normal;
}

.impulsa-advise-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.impulsa-advise-form__field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.impulsa-advise-form__field--wide {
  grid-column: 1 / -1;
}

.impulsa-advise-form__field label {
  margin: 0;
  color: #263619;
  font-size: 14px;
  font-weight: 700;
}

.impulsa-advise-form__field input,
.impulsa-advise-form__field select,
.impulsa-advise-form__field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #aab2a2;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: #000;
  font: 400 15px/1.4 "Work Sans", Arial, sans-serif;
}

.impulsa-advise-form__field textarea {
  min-height: 120px;
  resize: vertical;
}

.impulsa-advise-form__field input:focus,
.impulsa-advise-form__field select:focus,
.impulsa-advise-form__field textarea:focus {
  outline: 3px solid #fdc608;
  outline-offset: 1px;
  border-color: #5c6d36;
}

.impulsa-advise-form__field.is-invalid input,
.impulsa-advise-form__field.is-invalid select,
.impulsa-advise-form__field.is-invalid textarea {
  border-color: #b3261e;
}

.impulsa-advise-form__error,
.impulsa-advise-form__summary {
  margin: 0;
  color: #b3261e;
  font-size: 13px;
  font-weight: 600;
}

/* Honeypot for bots: off screen, not display:none (some bots skip hidden inputs). */
.impulsa-advise-form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.impulsa-advise-form__grid:disabled input,
.impulsa-advise-form__grid:disabled select,
.impulsa-advise-form__grid:disabled textarea {
  background: #f4f2ec;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .impulsa-advise-form__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .impulsa-simple {
    padding-inline: 20px;
  }
}

@media (max-width: 560px) {
  .impulsa-simple__head h1 {
    font-size: 30px;
  }

  .impulsa-simple__card--advise {
    padding: 20px;
  }
}
