/* ===================================================================
   LIA EMS -- forms.css
   Form Grids, Form Fields, Inputs, Selects, Textareas
   =================================================================== */

/* -- FORM GRIDS -- */
.fg {
  display: grid;
  gap: 9px 11px;
  margin-bottom: 10px;
  width: 100%;
  min-width: 0;
}

.fg1 {
  grid-template-columns: 1fr;
}

.fg2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fg3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fg4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fg5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.fg6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.fg21 {
  grid-template-columns: 2fr minmax(0, 1fr);
}

.fg12 {
  grid-template-columns: minmax(0, 1fr) 2fr;
}

.fg13 {
  grid-template-columns: minmax(0, 1fr) 3fr;
}

.fg > * {
  min-width: 0;
}

/* -- GENERIC GRIDS -- */
.g {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  width: 100%;
}

.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.g4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.g21 {
  grid-template-columns: 2fr minmax(0, 1fr);
}

.g13 {
  grid-template-columns: minmax(0, 1fr) 3fr;
}

.g32 {
  grid-template-columns: 3fr minmax(0, 2fr);
}

.g > * {
  min-width: 0;
}

/* -- COLUMN SPANS -- */
.span2 {
  grid-column: span 2;
}

.span3 {
  grid-column: span 3;
}

.span4 {
  grid-column: span 4;
}

/* -- FORM FIELDS -- */
.fl {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fl label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--blue2);
}

.fl label.req::after {
  content: " *";
  color: var(--red);
}

/* -- FORM INPUTS -- */
.fi {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--bd2);
  border-radius: var(--r);
  background: var(--white);
  color: var(--tx);
  font-size: 12px;
  transition: border-color .12s, box-shadow .12s;
  outline: none;
}

.fi:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(68, 114, 196, .15);
}

.fi-ro {
  background: var(--surf);
  color: var(--tx3);
}

textarea.fi {
  resize: vertical;
  min-height: 56px;
}

select.fi {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5'%3E%3Cpath d='M0 0l4.5 5L9 0z' fill='%2394A3B8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
  cursor: pointer;
}

/* -- RESPONSIVE FORM GRIDS -- */
@media (max-width: 1200px) {
  .fg4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fg5,
  .fg6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .fg3,
  .fg4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .g3,
  .g4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
