/*
Theme Name:   Radar Awards
Template:     hello-elementor
*/

body {
  min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
  flex-direction: column;
  display: flex;
}

body > footer {
  margin-top: auto;
}

body > header {
  box-shadow: 0 3px 6px rgba(0,0,0, 0.16);
}

@media (min-width: 1024px) {
  .category-grid.elementor-grid-4 > div > div > div:nth-of-type(4n+1)::after {
    --linewidth: 5px;

    margin-top: calc(var(--grid-row-gap,30px)/2 - var(--linewidth)/2);
    border-bottom: var(--linewidth) solid #EDEDED;
    position: absolute;
    content: "";
    width: 100%;
  }

  .category-grid.elementor-grid-5 > div > div > div:nth-of-type(5n+1)::after {
    --linewidth: 5px;

    margin-top: calc(var(--grid-row-gap,30px)/2 - var(--linewidth)/2);
    border-bottom: var(--linewidth) solid #EDEDED;
    position: absolute;
    content: "";
    width: 100%;
  }
}

@media (max-width: 1023px) {
  .category-grid.elementor-grid-tablet-2 > div > div > div:nth-of-type(2n+1)::after {
    --linewidth: 5px;

    margin-top: calc(var(--grid-row-gap,30px)/2 - var(--linewidth)/2);
    border-bottom: var(--linewidth) solid #EDEDED;
    position: absolute;
    content: "";
    width: 100%;
  }
}

@media (max-width: 767px) {
  .category-grid > div > div > div:nth-of-type(1n+1)::after {
    --linewidth: 5px;

    margin-top: calc(var(--grid-row-gap,30px)/2 - var(--linewidth)/2);
    border-bottom: var(--linewidth) solid #EDEDED;
    position: absolute;
    content: "";
    width: 100%;
  }
}

#entry_form button {
  text-transform: uppercase;
  flex-basis: initial;
}

.entry-header {
  display: grid;
  grid-template-columns: 1fr 250px;
}

.entry-header img {
  grid-column: 2;
  grid-row: span 2;
}

[data-name="contact_details"], [data-name="project_details"] {
  & .acf-fields {
    border: none !important;
  }
  & .acf-field {
    grid-template-columns: 1fr 3fr;
    padding: 0 !important;
    display: grid;
    gap: 0;
  }
  & .acf-field-textarea {
    grid-template-columns: 1fr;
    align-items: start;
  }
  & .acf-field :is(input, textarea) {
    border-radius: 0;
    background: none;
    padding: 0 !important;
    border: none !important;
  }
  & .acf-label {
    margin: 0 !important;
    display: flex;
    align-items: center;
  }
  & .acf-label label {
    font-weight: bold !important;
    text-transform: uppercase;
    line-height: 1;
    padding: 0;
    margin: 0 !important;
  }
  & > .acf-label > label {
    margin: 1rem 0 !important;
  }
  & .acf-field > :is(.acf-label, .acf-input) {
    background-color: #EDEDED;
    padding: 0.5rem !important;
  }
  & p.description.description {
    grid-column: 1 / -1;
    display: none;
  }
  & .description.moved.moved {
    display: block;
  }
  & .acf-fields::after  {
    display: none;
  }
}

p.description.description.description {
  margin: 0.5rem 0 0 0;
  color: inherit;
}

[data-name="contact_details"] {
  & .acf-fields {
    grid-template-rows: repeat(5, auto);
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    gap: 1rem 4rem;
    display: grid;
  }
}

[data-name="project_details"] {
  & .acf-fields {
    flex-direction: column;
    display: flex;
    gap: 1rem;
  }
}

dialog[open] {
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 3px 6px rgba(0,0,0, 0.16);
  border: 1px solid #E0E1E3;
  display: grid;
  padding: 1rem;
  gap: 1rem;
}

dialog > * {
  padding: 0;
  margin: 0 !important;
}

dialog > :is(h1, div) {
  grid-column: span 2;
}

dialog h1 {
  border-bottom: 5px solid;
  padding-bottom: 0.5em;
}

dialog button {
  text-transform: uppercase;
  font-weight: bold;
  border-radius: 0;
}

::backdrop {
 background-color: black;
 opacity: 0.7;
}

.acf-field .acf-error-message {
  position: absolute;
  right: 0;
  top: 0;
}
.acf-required {
  color: #cc2727;
}
.acf-field.acf-error {
  border: 2px solid #cc2727 !important;
}

.chars {
  text-align: right;
  font-size: 12px;
  color: grey;
}

h2 a {
  word-wrap: initial !important;
}