/**
 * Form elements.
 */
:root {
  --bs-focus-shadow: 0 0 0 0.25rem rgb(40 167 69 / 25%)
}

/**
 * Prevent regression due to explicit line-height and font-size applied to these
 * elements in normalize.css 7.0.0.
 */
button:not(.button),
input:not([type="file"],.form-text, .form-textarea) {
  line-height: 1.25em;
}
textarea,
input[type="search"],
input[type="number"],
input[type="email"] {
  line-height: normal;
}
select {
  font-size: 0.8125rem;
  line-height: 1.42902em;
}
details select {
  line-height: 1.20324em;
}

/**
 * When a table row has a single form item, prevent it from adding unnecessary
 * extra spacing. If it has multiple form items, allow spacing between them,
 * overriding Classy.
 */
tr.odd .form-item,
tr.even .form-item {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}
td > .form-item:only-child {
  margin-top: 0;
  margin-bottom: 0;
}
.form-type-checkbox {
  padding: 0;
}
label {
  display: table;
  margin: 0 0 0.1em;
  padding: 0;

  font-size: var(--font-size-h6);
  color: var(--green);
  margin-bottom: 0.5rem;
}
label.error {
  color: var(--red);
}
label[for] {
  cursor: pointer;
}
.form-check-label{
  color: var(--dark);
}
.form-item label.option {
  text-transform: none;
}
.form-item label.option input {
  vertical-align: middle;
}
.form-disabled label {
  color: var(--gray);
}
.form-disabled input.form-date,
.form-disabled input.form-text,
.form-disabled input.form-tel,
.form-disabled input.form-time,
.form-disabled input.form-email,
.form-disabled input.form-url,
.form-disabled input.form-search,
.form-disabled input.form-number,
.form-disabled input.form-color,
.form-disabled input.form-file,
.form-disabled textarea.form-textarea,
.form-disabled select.form-select {
  border-color: #d4d4d4;
  background-color: hsla(0, 0%, 0%, 0.08);
  box-shadow: none;
}
.form-item input.error,
.form-item textarea.error,
.form-item select.error {
  color: #a51b00;
  border-width: 1px;
  border-color: #e62600;
  background-color: hsla(15, 75%, 97%, 1);
  box-shadow: inset 0 5px 5px -5px #b8b8b8;
}
.form-item textarea.error + .cke {
  border-width: 1px;
  border-color: #e62600;
}
.form-item textarea.error + .ck-editor > .ck-editor__main {
  border: 1px solid #e62600;
}
.form-item input.error:focus,
.form-item textarea.error:focus,
.form-item select.error:focus {
  border-color: #e62600;
  outline: 0;
  background-color: #fcf4f2;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px 1px #e62600;
}
.form-required:after {
  width: 7px;
  height: 7px;
  background-size: 7px 7px;
}
.form-item--error-message {
  margin-top: 0.15em;
  color: #e32700;
}
.fieldset-wrapper > .form-item--error-message {
  margin-top: 0;
}
.text-format-wrapper .form-item--error-message {
  margin: 0;
  padding: 0.25em 0.666em 0;
  border: solid #ccc;
  border-width: 0 1px;
}

/* Filter */
ul.tips,
div.description,
.form-item .description {
  margin: 0.2em 0 0 0;
  color: #595959;
  font-size: 0.95em;
}
.form-item .description.error {
  margin-top: 0;
  color: #a51b00;
}

ul.tips li {
  margin: 0.25em 0 0.25em 1.5em; /* LTR */
}
[dir="rtl"] ul.tips li {
  margin: 0.25em 1.5em 0.25em 0;
}
.form-type-radio .description,
.form-type-checkbox .description {
  margin-left: 1.5em; /* LTR */
}
[dir="rtl"] .form-type-radio .description,
[dir="rtl"] .form-type-checkbox .description {
  margin-right: 1.5em;
  margin-left: 0;
}
.form-text,
.form-textarea {
  border-radius: 2px;
  font-size: 1em;
  line-height: normal;
}

input.form-autocomplete,
input.form-text,
input.form-tel,
input.form-email,
input.form-url,
input.form-search,
input.form-number,
input.form-color,
input.form-file,
input.form-date,
input.form-time,
textarea.form-textarea {
  box-sizing: border-box;
  max-width: 100%;
  padding: 0.65rem 1rem;
  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
  transition: border linear 0.2s, box-shadow linear 0.2s;
  color: #595959;
  border: 1px solid #b8b8b8;
  border-top-color: #999;
  border-radius: 2px;
  background: #fcfcfa;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.125);
  font-size: 1em;
}
[dir="rtl"] textarea.form-textarea {
  padding: 0.3em 0.5em 0.3em 0.4em;
}
.form-text:focus,
.form-tel:focus,
.form-email:focus,
.form-url:focus,
.form-search:focus,
.form-number:focus,
.form-color:focus,
.form-file:focus,
.form-textarea:focus,
.form-date:focus,
.form-time:focus {
  border-color: #40b6ff;
  outline: 0;
  background-color: #fff;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px #40b6ff;
}

.confirm-parent,
.password-parent {
  overflow: visible;
  width: auto;
}

.form-item-options-group-info-identifier,
.form-item-pass .description {
  clear: both;
}

.js input.form-autocomplete {
  background-position: calc(100% - 1rem) center;
}

/* Focus */
.form-control:focus,
.form-select:focus,
.btn-check:focus+.btn-primary,
.btn-primary:focus{
  box-shadow: var(--bs-focus-shadow);
}

/**
 * Limits extra long instances of select elements to the max width allowed
 * to avoid breaking layouts.
 */
select {
  max-width: 100%;
}

/**
 * Improve spacing of cancel link.
 */
#edit-cancel {
  margin-left: 10px; /* LTR */
}
[dir="rtl"] #edit-cancel {
  margin-right: 10px;
  margin-left: 0;
}

/* Flat fields */
input.form-autocomplete, input.form-text, input.form-tel, input.form-email, input.form-url, input.form-search, input.form-number, input.form-color, input.form-file, input.form-date, input.form-time, textarea.form-textarea {
  background: none;
  box-shadow: none;
}

/* Input file */
.form-managed-file.input-group > .custom-file {
  margin-bottom: 5px;
  order: 0;
}
.custom-file-input {
  position: relative;
  z-index: 2;
  width: 100%;
  height: calc(1.5em + 1.3rem + 2px);
  margin: 0;
  opacity: 0; }
.custom-file-input:focus ~ .custom-file-label {
  border-color: #0ee7a5;
  -webkit-box-shadow: none;
  box-shadow: none; }
.custom-file-input[disabled] ~ .custom-file-label,
.custom-file-input:disabled ~ .custom-file-label {
  background-color: #F3F6F9; }
.custom-file-input:lang(en) ~ .custom-file-label::after {
  content: "Buscar"; }
.custom-file-input ~ .custom-file-label[data-browse]::after {
  content: attr(data-browse); }

.custom-file-label {
  position: absolute;
  display: block;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: calc(1.5em + 1.3rem + 2px);
  padding: 0.65rem 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #3F4254;
  background-color: #ffffff;
  border: 1px solid #E4E6EF;
  border-radius: 0.42rem;
  -webkit-box-shadow: none;
  box-shadow: none; }
.custom-file-label::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: block;
  height: calc(1.5em + 1.3rem);
  padding: 0.65rem 1rem;
  line-height: 1.5;
  color: #3F4254;
  content: "Buscar";
  background-color: #F3F6F9;
  border-left: inherit;
  border-radius: 0 0.42rem 0.42rem 0; }

.form-managed-file .messages.messages--error {
  color: var(--danger);
  flex: 1 100%;
  order: 2;
  margin-top: 5px;
}
.form-managed-file .ajax-progress.ajax-progress-throbber {
  display: grid;
}

.form-managed-file .file {
  display: flex;
  align-items: center;
  margin-right: 1rem;
}

/* Icons */
.input-group i {
  font-size: 1.3rem;
}

/* FIELDS GROUPS */
fieldset.group-inline {
  margin-bottom: 0 !important;
}
fieldset.group-inline .fieldset-wrapper {
  display: flex;
  flex-wrap: wrap;
}
fieldset.group-inline .fieldset-wrapper .form-wrapper {
  flex: 1 0 0%;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--bs-gutter-x) * .5);
  padding-left: calc(var(--bs-gutter-x) * .5);
  margin-top: var(--bs-gutter-y);
}
fieldset.group-inline .fieldset-wrapper .form-wrapper:first-child {
  padding-left: 0;
}
fieldset.hide-legend > legend {
  display: none;
}

/* Office hours */
.office-hours-slot .form-inline .form-type-select {
  display: inline-block;
}
.office-hours-add-link,
.office-hours-delete-link,
.office-hours-copy-link {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.25rem;
  transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
  color: #009926;
  background-color: #dcedd1;
}
.office-hours-add-link:hover, .office-hours-add-link:focus {
  color: #fbf6f0;
  background-color: #009926;
  border-color: transparent;
  text-decoration: none;
}
.office-hours-delete-link {
  color: #F64E60;
  background-color: #FFE2E5;
  border-color: transparent;
}
.office-hours-delete-link:hover, .office-hours-delete-link:focus {
  color: #ffffff;
  background-color: #F64E60;
  border-color: transparent;
  text-decoration: none;
}
.office-hours-copy-link {
  color: #8950FC;
  background-color: #EEE5FF;
  border-color: transparent;
}
.office-hours-copy-link:hover, .office-hours-copy-link:focus {
  color: #ffffff;
  background-color: #8950FC;
  border-color: transparent;
  text-decoration: none;
}

/* Form tabs */
.horizontal-tabs {
  border: 0;
  border-bottom: 1px solid var(--gray-light);
  padding: 1rem;
  margin-bottom: 2rem;
}

.horizontal-tabs .horizontal-tabs-list {
  background: none;
  border: 0;
}

.horizontal-tabs .horizontal-tab-button {
  border-right: none;
  font-weight: bold;
  background-color: unset;
  margin-right: 1rem;
  padding: 2rem 0.5rem;
}
.horizontal-tabs .horizontal-tab-button a {
  font-weight: bold;
  font-size: 1.1rem;
  color: #B5B5C3;
  padding: 0 !important;
  border-bottom: 4px solid #B5B5C3;
}
.horizontal-tabs .horizontal-tab-button.selected a {
  color: var(--green);
  border-bottom-color: var(--green);
}
.node-contract-edit-form .horizontal-tabs .horizontal-tab-button:first-child {
  width: 130px;
}
.node-contract-edit-form .horizontal-tabs .horizontal-tab-button:last-child {
  width: 244px;
}

/* Form TABLE */
.js .tabledrag-toggle-weight-wrapper {
  display: none;
}
.tabledrag-toggle-weight {
  --bs-btn-font-weight: 600;
  --bs-btn-color: var(--bs-white);
  --bs-btn-bg: var(--bd-violet);
  --bs-btn-border-color: var(--bd-violet);
  --bs-btn-border-radius: .5rem;
  --bs-btn-hover-color: var(--bs-white);
  --bs-btn-hover-bg: #{shade-color($bd-violet, 10%)};
  --bs-btn-hover-border-color: #{shade-color($bd-violet, 10%)};
  --bs-focus-shadow: var(--bd-violet-rgb);
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: #{shade-color($bd-violet, 20%)};
  --bs-btn-active-border-color: #{shade-color($bd-violet, 20%)};
}

form .field-multiple-table thead tr,
form .field-multiple-table thead tr th {
  background: none;
  padding: 0;
  font-size: var(--font-size-h4);
}
form .field-multiple-table thead tr th {
  background: none;
  padding: 0;
  color: var(--green);
  border-bottom: 1px solid var(--green);
}
form .field-multiple-table thead tr th.field-label .label {
  background: none;
  color: var(--green);
  border: 0;
  width: auto;
  height: auto;
}
form .field-multiple-table thead tr th h4 {
  font-weight: normal;
  font-size: var(--font-size-h6);
}
form .field-multiple-table fieldset {
  margin-bottom: 0 !important;
}
form .field-multiple-table td {
  border-bottom: 1px solid var(--gray-light);
}
form .field-multiple-table .field-multiple-drag {
  padding-right: 0;
}
form .field-multiple-table .field-multiple-drag a .handle {
  box-sizing: unset;
}

.field--widget-paragraphs .table-responsive {
  overflow: hidden;
}

/* Paragraph */
.field--widget-paragraphs table thead tr th h4 {
  float: left;
  margin-top: 12.5px;
}
.js .field--widget-paragraphs table thead tr th .paragraphs-actions {
  margin-right: 0;
}
.field--widget-paragraphs table tbody tr.draggable td {
  border-bottom: 1px solid #EBEDF3;
}
.field--widget-paragraphs table tbody tr:last-child td {
  margin-bottom: 0;
}
.js .paragraph-top,
.js .paragraph-top .mb-3,
.field--widget-paragraphs table tbody tr td > * > .form-wrapper,
.field--widget-paragraphs table tbody tr:last-child td > .ajax-new-content > * > .form-wrapper,
.field--widget-paragraphs table tbody tr:last-child td .form-wrapper .paragraphs-subform {
  margin-bottom: 0 !important;
}

/* Address field */
.field--type-address .address-container-inline {
  display: flex;
  gap: 1rem;
}

.field--type-address .address-container-inline .js-form-item {
  flex: 1 1 0;
}

/* Details field */
details.js-form-wrapper.form-wrapper > summary {
  font-size: 1.5rem;
}

/* Contact field */
.field--name-field-contacts .paragraphs-subform {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.field--name-field-contacts .paragraphs-subform .paragraphs-content {
  flex: 2;
  margin: 0 !important;
}
.field--name-field-contacts .paragraphs-subform .field--name-field-name {
  flex: 1 1 100%;
}
.field--name-field-contacts .paragraphs-subform .field--name-field-phone {
  flex: 1;
}

/* File field */
.field--widget-file-generic .form-managed-file {
  display: flex;
  gap: 1rem;
}
.field--widget-file-generic .form-managed-file > * {
  flex: 1;
}
.field--widget-file-generic .form-managed-file .form-type-textfield {
  flex: 30;
}
.field--widget-file-generic .form-managed-file .button {
  height: fit-content;
  align-self: center;
  margin-bottom: 0.5rem;
}

.field--widget-entity-reference-paragraphs  .paragraph-type-top {
  padding-bottom: 0.5rem;
  color: var(--green);
  border-bottom: 1px solid var(--green);
}

.field--widget-entity-reference-paragraphs  .paragraph-type-top .paragraph-type-title {
  display: block;
  flex-basis: unset;
  font-weight: normal;
  font-size: var(--font-size-h6);
  margin-bottom: 0 !important;
  align-self: end;
}

/* form select */
.form-select {
  padding: 0.65rem 2.25rem 0.65rem 0.75rem;
}

/* Geolocation */
.field--widget-geofield-latlon .fieldset-wrapper {
  display: flex;
  gap: 1rem;
}

/* Moderation state */
.field--name-moderation-state {
  border: 1px solid var(--green);
  border-left: 1px solid var(--green);
  border-radius: 5px;
  padding: 1rem;
  background-color: var(--gray-light);
}

/* Contract edit form */
.field--name-field-workers .paragraphs-subform {
  display: flex;
  flex-wrap: wrap;
}
.field--name-field-workers .field--name-field-fullname {
  flex: 2;
}
.node-contract-edit-form .field--name-field-workers .field--name-field-dni {
  margin-left: 1rem;
}
.field--name-field-workers .field--name-field-recibido-plan-contingencia {
  flex: 1 1 100%;
}

.node-contract-edit-form .field--name-field-extra-documentation .draggable td:first-child {
  display: flex;
  gap: 1rem;
}
.node-contract-edit-form .field--name-field-extra-documentation .draggable td:first-child .tabledrag-handle {
  align-self: center;
}
.node-contract-edit-form .field--name-field-extra-documentation .draggable td:first-child .tabledrag-handle .handle {
  width: 20px;
  height: 23px;
  background-position-x: 0;
  background-position-y: 8px;
}

/* CT edit form */
.field--name-field-risk-info-card-single .field--name-field-risk-information-file .form-item-field-risk-info-card-single-0-subform-field-risk-information-file-0 > label {
  display: none;
}


/**
 User Form
 */
.user-form {
  background-color: var(--white);
  background-clip: border-box;
  border-radius: 0.25rem;
  padding: 2rem;
}

#edit-role-change {
  display: block;
}
#edit-role-change .checkbox-inline {
  display: block;
}
.password-suggestions {
  border: 1px solid var(--warning);
  border-left: 5px solid var(--warning);
  border-radius: 5px;
  padding: 1rem;
}
.field--name-user-picture .image-widget-data {
  position: relative;
}


/* Form acta_de_reunion_trimestral_firma */
.node-form.node-acta-de-reunion-trimestral-firma-form #edit-field-atr-ref-wrapper,
.node-form.node-acta-de-reunion-trimestral-firma-form #edit-field-atr-signed-ec-wrapper {
  display: none;
}
