/*
==========================================================
 SENTRASKY
 Forms
 Version: 1.0.0
==========================================================
*/

/*
==========================================================
 FORM BASE
==========================================================
*/

.form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

/*
==========================================================
 INPUTS
==========================================================
*/

.form input,
.form textarea,
.form select {
  width: 100%;

  border: 1px solid var(--panel-border);
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.045);

  color: var(--text);

  outline: none;

  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.form input,
.form select {
  min-height: 54px;

  padding: 0 18px;
}

.form textarea {
  min-height: 150px;

  padding: 16px 18px;

  resize: vertical;
}

.form input::placeholder,
.form textarea::placeholder {
  color: rgba(167, 180, 198, 0.72);
}

/*
==========================================================
 FOCUS
==========================================================
*/

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: rgba(46, 230, 214, 0.62);

  background: rgba(255, 255, 255, 0.065);

  box-shadow:
    0 0 0 4px rgba(46, 230, 214, 0.08);
}

/*
==========================================================
 SELECT
==========================================================
*/

.form select {
  appearance: none;
  -webkit-appearance: none;

  cursor: pointer;
}

.form-select-wrap {
  position: relative;
}

.form-select-wrap::after {
  content: "";

  position: absolute;
  right: 18px;
  top: 50%;

  width: 8px;
  height: 8px;

  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);

  transform: translateY(-65%) rotate(45deg);

  pointer-events: none;
}

/*
==========================================================
 CHECKBOX / RADIO
==========================================================
*/

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  color: var(--muted);

  font-size: 0.95rem;
}

.form-check input {
  width: 18px;
  height: 18px;
  min-height: auto;

  margin-top: 4px;

  accent-color: var(--accent);
}

/*
==========================================================
 FORM FOOTER
==========================================================
*/

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;

  margin-top: 10px;
}

.form-note {
  color: var(--muted);

  font-size: 0.9rem;
}

/*
==========================================================
 STATES
==========================================================
*/

.form input.is-error,
.form textarea.is-error,
.form select.is-error {
  border-color: rgba(255, 95, 126, 0.75);
}

.form input.is-success,
.form textarea.is-success,
.form select.is-success {
  border-color: rgba(56, 214, 122, 0.75);
}

.form-message {
  font-size: 0.88rem;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

/*
==========================================================
 RESPONSIVE
==========================================================
*/

@media (max-width: 760px) {

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

}