/* Focused spacing corrections measured against the captured HERO screens.
   Load after hero-shell.css and hero-app.css. */

.dashboard-grid {
  align-items: start;
  gap: 20px 28px;
}

.dashboard-tile {
  height: 270px;
  min-height: 270px;
  max-height: 270px;
}

.dashboard-tile:nth-child(-n + 3) {
  height: 300px;
  min-height: 300px;
  max-height: 300px;
}

.dashboard-tile h2,
.dashboard-tile .tile-title {
  margin-top: 7px;
}

.dashboard-tile .tile-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 94px;
}

.dashboard-tile .tile-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 5px;
  padding-top: 8px;
  margin-top: auto;
}

.modal:has(form[data-entity="contacts"]) {
  border-radius: 0;
  font-size: 13px;
}

.modal:has(form[data-entity="contacts"]) .modal-header {
  height: 56px;
  min-height: 56px;
  padding: 0 0 0 15px;
}

.modal:has(form[data-entity="contacts"]) .modal-header h2 {
  color: #555;
  font-size: 18px;
  font-weight: 300;
}

.modal:has(form[data-entity="contacts"]) .modal-close {
  width: 55px;
  height: 55px;
  flex: 0 0 55px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #b4b5b4;
  color: #fff;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.modal form[data-entity="contacts"] > .modal-body {
  padding: 16px 15px 20px;
}

.modal form[data-entity="contacts"] .field {
  gap: 4px;
  margin: 0;
  font-size: 13px;
}

.modal form[data-entity="contacts"] .field label {
  margin: 0;
}

.modal form[data-entity="contacts"] .field > label:not(.btn) {
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}

.modal form[data-entity="contacts"] .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.modal form[data-entity="contacts"] .field select {
  height: 34px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #e2e2e2;
  border-radius: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

.modal form[data-entity="contacts"] .file-button {
  justify-content: center;
  height: 34px;
  min-height: 34px;
  width: 100%;
  margin: 0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 20px;
}

.modal form[data-entity="contacts"] .segmented {
  width: 188px;
  max-width: 100%;
  height: 32px;
  padding: 3px;
  border-radius: 6px;
  background: #e4e6e7;
}

.modal form[data-entity="contacts"] .segmented label {
  flex: 1 1 auto;
  height: 26px;
  margin: 0;
  line-height: 20px;
}

.modal form[data-entity="contacts"] .segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 26px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.modal form[data-entity="contacts"] .segmented input[value="Person"] + span::before,
.modal form[data-entity="contacts"] .segmented input[value="Firma"] + span::before {
  font-family: HeroRegular;
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
}

.modal form[data-entity="contacts"] .segmented input[value="Person"] + span::before {
  content: "\f007";
}

.modal form[data-entity="contacts"] .segmented input[value="Firma"] + span::before {
  content: "\f1ad";
}

.modal form[data-entity="contacts"] .segmented input:checked + span {
  background: #006b4e;
  color: #fff;
  box-shadow: none;
  font-weight: 600;
}

.modal form[data-entity="contacts"] .tabs {
  min-height: 39px;
  margin-top: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.modal form[data-entity="contacts"] .tabs::-webkit-scrollbar {
  display: none;
}

.modal form[data-entity="contacts"] .tabs button {
  height: 39px;
  min-height: 39px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.modal form[data-entity="contacts"] .tabs button.active {
  padding-top: 7px;
}

.modal form[data-entity="contacts"] .form-tab {
  padding-top: 11px;
}

.modal form[data-entity="contacts"] .field.checkbox-field {
  height: 56px;
  padding-top: 22px;
  gap: 4px;
  font-size: 12px;
  line-height: 18px;
}

.modal form[data-entity="contacts"] .field.checkbox-field input {
  width: 13px;
  height: 13px;
  min-height: 13px;
  flex: 0 0 13px;
  margin: 0;
}

.modal:has(form[data-entity="contacts"]) .modal-footer {
  min-height: 65px;
  padding: 15px;
  gap: 8px;
  border-radius: 0;
}

.modal:has(form[data-entity="contacts"]) .modal-footer .btn {
  min-height: 34px;
  min-width: 0;
  padding: 6px 13px;
  font-size: 14px;
}

@media (min-width: 721px) {
  .modal form[data-entity="contacts"] > .modal-body > .reference-grid,
  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] > .reference-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 8px;
  }

  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="category"]) {
    grid-column: 1 / span 4 !important;
  }

  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="type"]) {
    grid-column: 5 / span 5 !important;
  }

  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="vcard"]),
  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="customerNumber"]),
  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="position"]) {
    grid-column: 10 / span 3 !important;
  }

  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="title"]) {
    grid-column: 1 / span 2 !important;
    margin-top: 14px;
  }

  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="titleCustom"]) {
    grid-column: 3 / span 2 !important;
    margin-top: 14px;
  }

  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="customerNumber"]) {
    margin-top: 14px;
  }

  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="firstName"]) {
    grid-column: 1 / span 4 !important;
  }

  .modal form[data-entity="contacts"] > .modal-body > .reference-grid > .field:has([name="lastName"]) {
    grid-column: 5 / span 4 !important;
  }

  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] > .reference-grid {
    row-gap: 6px;
  }

  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] .field:has([name="email"]) {
    grid-row: 1 !important;
    grid-column: 1 / span 4 !important;
  }

  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] .field:has([name="invoiceRecipient"]) {
    grid-row: 1 !important;
    grid-column: 5 / span 4 !important;
  }

  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] .field:has([name="reachability"]),
  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] .field:has([name="phoneHome"]),
  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] .field:has([name="phoneFax"]) {
    grid-column: 1 / span 4 !important;
  }

  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] .field:has([name="source"]),
  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] .field:has([name="phoneMobile"]),
  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] .field:has([name="birthDate"]) {
    grid-column: 5 / span 4 !important;
  }

  .modal form[data-entity="contacts"] [data-form-panel="contact-details"] .field:has([name="website"]) {
    grid-column: 9 / span 4 !important;
  }
}

@media (max-width: 720px) {
  .dashboard-tile .tile-actions {
    flex-wrap: wrap;
  }

  .modal form[data-entity="contacts"] .field.checkbox-field {
    height: auto;
    padding-top: 0;
  }
}

@media(min-width:721px){.modal form[data-entity=contacts][data-company=true]>.modal-body>.reference-grid>.field:has([name=company]){grid-column:1/span 4!important;margin-top:14px}.modal form[data-entity=contacts][data-company=true]>.modal-body>.reference-grid>.field:has([name=legalForm]){grid-column:5/span 4!important;margin-top:14px}.modal form[data-entity=contacts][data-company=true] [data-form-panel=people]>.reference-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:8px 32px}.modal form[data-entity=contacts][data-company=true] [data-form-panel=people] .field:has([name=title]){grid-column:1/span 2!important}.modal form[data-entity=contacts][data-company=true] [data-form-panel=people] .field:has([name=titleCustom]){grid-column:3/span 2!important}.modal form[data-entity=contacts][data-company=true] [data-form-panel=people] .field:has([name=customerNumber]),.modal form[data-entity=contacts][data-company=true] [data-form-panel=people] .field:has([name=position]){grid-column:10/span 3!important}.modal form[data-entity=contacts][data-company=true] [data-form-panel=people] .field:has([name=firstName]){grid-column:1/span 4!important}.modal form[data-entity=contacts][data-company=true] [data-form-panel=people] .field:has([name=lastName]){grid-column:5/span 4!important}}
