/**
 * @file
 * JR Admin form styling.
 */

.layout-region-node-secondary {
  width: 100%;
}

.layout__region--first-above {
  width: 50%;
}

.layout-region-node-main,
.layout-region-node-footer {
  width: 100%;
}

.field--name-tasting-note-vintage {
  width: 100px;
}

.field--name-tasting-note-drink-date-to,
.field--name-tasting-note-drink-date-extra,
.field--name-tasting-note-vintage,
.field--name-tasting-note-colour,
.field--name-tasting-note-author,
.field--name-tasting-note-lwin11,
.field--name-tasting-note-lwin7,
.field--name-tasting-note-sparkling,
.field--name-tasting-note-alcohol,
.field--name-tasting-note-article-group,
.field--name-tasting-note-article-group-order {
  float: left;
  margin-right: 20px;
}

.inline-tasting-note .field--name-status {
  float: left;
  width: 100%;
  clear: both;
}

.js-form-item-tasting-note-author.form-item,
.js-form-item-tasting-note-article.form-item {
  margin-top: 0px;
  width: 200px;
}

.field--name-tasting-note-article-group,
.field--name-tasting-note-article-group-order {
  width: 10%;
}

.field--name-tasting-note-article-group,
.field--name-tasting-note-article-group-order {
  width: 10%;
}

.field--name-tasting-note-article.field--widget-select2-entity-reference {
  width: 35%;
}

.js-form-item-tasting-note-article.form-item {
  width: 100%;
}

.select2-container {
  z-index: 0;
}

/* Fix for select2 dropdown not showing in a dialog*/
.ui-widget-overlay ~ .select2-container,
.panels-ipe-tabs-open .select2-container{
  z-index: 1300;
}

.field--name-tasting-note-score,
.field--name-tasting-note-stockist,
.field--name-tasting-note-article,
.field--name-tasting-note-date-tasted,
.field--name-tasting-note-stockist {
  float: left;
  clear: both;
  margin-right: 10px;
}

.field--name-tasting-note-date-tasted,
.field--name-tasting-note-author {
  margin-top: 0.75rem;
}
.field--name-tasting-note-date-tasted .form-item,
.field--name-tasting-note-author .form-item{
  margin-top: 0 !important;
}

.field--name-tasting-note-drink-date-from {
  float: left;
  margin-right: 20px;
}

.field--type-entity-reference.field--name-tasting-note-grape-variety.field--widget-autocomplete-deluxe {
  max-width: 395px;
}

.ui-autocomplete .ui-menu-item a:hover {
  color: black !important;
  text-decoration: underline !important;
}

.node-tasting-note-form .layout-region-node-secondary,
.page-node-type-tasting-note .layout-region-node-secondary {
  display: none;
}

#edit-tasting-note-note-0-format {
  display: none;
}

#edit-tasting-note-grape-variety--description {
  display: none;
}

.layout-region-node-footer .layout-region-node-footer__content {
  border-top: 0px;
}


.inline-tasting-note .field--name-tasting-note-note,
.inline-tasting-note .field--type-wine-technical-details {
  float: left;
  clear: both;
  width: 100%;
}

.inline-tasting-note .filter-wrapper {
  display: none;
}

.inline-tasting-note .form-submit {
  float: left;
}

.entity-browser-tasting-notes-form .eb-tabs {
  display: none;
}

.entity-browser-tasting-notes-form .filter-wrapper {
  display: none;
}

#edit-inline-entity-form-tasting-note-grape-variety--description {
  display: none;
}

tr.ief-row-entity input.article-group {
  max-width: 100px;
}

tr.ief-row-entity input.article-group-order {
  max-width: 100px;
  background: grey;
}

input.form-number.readonly-field {
  background: grey;
}

/*input.form-text.readonly-field {*/
/*  background: grey;*/
/*}*/

tr.jr-wine-white .inline-entity-form-node-auto_entitylabel a {
  color: #7fb4a3;
  font-weight: bold;
  font-style: normal;
}

tr.jr-wine-rose .inline-entity-form-node-auto_entitylabel a {
  color: #ec7090;
  font-weight: bold;
  font-style: normal;
}

tr.jr-wine-red .inline-entity-form-node-auto_entitylabel a {
  color: #bb576a;
  font-weight: bold;
  font-style: normal;
}

tr.jr-wine-white .inline-entity-form-node-auto_entitylabel {
  color: #7fb4a3;
  font-weight: bold;
  font-style: italic;
}

tr.jr-wine-rose .inline-entity-form-node-auto_entitylabel {
  color: #ec7090;
  font-weight: bold;
  font-style: italic;
}

tr.jr-wine-red .inline-entity-form-node-auto_entitylabel {
  color: #bb576a;
  font-weight: bold;
  font-style: italic;
}


.ui-menu.ui-widget.ui-widget-content.ui-autocomplete.ui-front {
  max-height: 300px;
  overflow-y: scroll;
}

.tasting-note-entity-reference-wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  width: 100%;
  margin-bottom: 15px;
}

.tasting-note-entity-reference-main-field {
  flex: 1;
  margin-right: 10px;
  min-width: 200px; /* Ensure the main field doesn't get too small */
}

.tasting-note-entity-reference-group,
.tasting-note-entity-reference-order {
  max-width: 80px;
  margin-right: 10px;
}

/* Make the input fields in the small wrappers match their container width */
.tasting-note-entity-reference-group input,
.tasting-note-entity-reference-order input {
  width: 100%;
}

/* Handle label alignment */
.tasting-note-entity-reference-wrapper label {
  display: block;
  font-size: 0.9em;
}

/* For tighter spacing */
.tasting-note-entity-reference-wrapper .form-item {
  margin: 0;
}

@media screen and (min-width: 768px) {
  #edit-group-wine-label-images>.details-wrapper,
  #edit-group-basic-info>.fieldset-wrapper,
  #edit-technical-details-wrapper>details>.details-wrapper,
  #edit-technical-details-wrapper>fieldset>.fieldset-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
  }
  #edit-technical-details-wrapper>details>.details-wrapper>.seven-details__description,
  #edit-technical-details-wrapper>fieldset>.fieldset-wrapper>.description {
    grid-column: 1 / -1;
  }
}

#edit-technical-details-wrapper fieldset.subgroup>legend {
  text-transform: none
}

#edit-technical-details-wrapper fieldset.subgroup>.fieldset-wrapper {
  display: grid;
  gap: 1rem;
}

@media screen and (min-width: 576px) {
  #edit-technical-details-wrapper fieldset.subgroup>.fieldset-wrapper {
    grid-template-columns: 1fr 1fr
  }
}

#edit-technical-details-wrapper fieldset.subgroup>.fieldset-wrapper>.description {
  grid-column: 1/-1;
  margin-top: 0
}

.price-limit-row {
  display: flex;
  gap: 1rem;
}
