/* 「営業・相談」ダイアログの入力欄（項目名・入力・選択肢・補足・エラー・チェック・長い文の欄の「拡大して編集」）。sales-dialog.css のあとに読む */

#billing-app .sec_sales .sales_dialog {
  .body.is_expanded {
    > :not(.is_expanded):not(.message) {
      display: none;
    }
    .is_expanded textarea {
      min-height: 56vh;
    }
  }
  .field {
    margin: 0;
    padding: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    line-height: 1.6em;
    border: none;
    > label,
    legend {
      padding: 0;
      color: var(--sd-label);
      font-size: 14px;
      font-weight: 600;
      line-height: 1.5em;
    }
    legend {
      margin-bottom: 6px;
    }
    input[type="text"],
    input[type="search"],
    input[type="date"],
    select,
    textarea {
      padding: 9px 12px;
      width: 100%;
      min-height: 44px;
      background: var(--bg);
      color: var(--text);
      font-family: inherit;
      font-size: 16px;
      line-height: 1.5em;
      border: 1px solid var(--sd-line);
      border-radius: 6px;
      &::placeholder {
        color: var(--sd-placeholder);
        opacity: 1;
      }
      &:focus {
        border-color: var(--accent);
        outline: 2px solid var(--sd-focus);
        outline-offset: 1px;
      }
      &[aria-invalid="true"] {
        border-color: var(--danger);
      }
      &:disabled {
        color: var(--sd-hint);
        opacity: 1;
      }
      &[hidden] {
        display: none;
      }
    }
    input[type="date"]::-webkit-calendar-picker-indicator {
      cursor: pointer;
    }
    textarea {
      line-height: 1.7em;
      resize: vertical;
    }
    textarea[data-autosize] {
      overflow-y: hidden;
      resize: none;
    }
    &.has_expand {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: end;
      gap: 6px 12px;
      > :not(label):not(.expand) {
        grid-column: 1 / -1;
      }
    }
    .expand {
      padding: 6px 12px;
      min-height: 36px;
      background: none;
      color: var(--sd-label);
      font-family: inherit;
      font-size: 14px;
      line-height: 1.5em;
      border: 1px solid var(--sd-line);
      border-radius: 6px;
      cursor: pointer;
      @media (hover: hover) {
        &:hover {
          border-color: var(--sd-focus);
        }
      }
      &[aria-expanded="true"] {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
      }
    }
    .choice {
      padding: 4px 0;
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text);
      font-size: 16px;
      line-height: 1.5em;
      cursor: pointer;
      input {
        margin: 0;
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        accent-color: var(--accent);
      }
    }
    .hint {
      margin: 0;
      color: var(--sd-hint);
      font-size: 14px;
      line-height: 1.6em;
    }
    .error {
      margin: 0;
      color: #ffb4a1;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.6em;
      &:empty {
        display: none;
      }
    }
  }
  .check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.5em;
    cursor: pointer;
    &[hidden] {
      display: none;
    }
    input {
      margin: 0;
      width: 18px;
      height: 18px;
      flex-shrink: 0;
      accent-color: var(--accent);
    }
  }
}
