/* 「営業・相談」ダイアログの AI の提案・会話ハブと案件の状況（読むだけ）・版の表示・下の操作欄とボタン。sales-dialog-form.css のあとに読む */

#billing-app .sec_sales .sales_dialog {
  .ai {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(116, 185, 255, 0.1);
    border-left: 3px solid var(--blue);
    border-radius: 0 6px 6px 0;
    &[hidden] {
      display: none;
    }
    .label {
      margin: 0;
      color: #a8d4ff;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.5em;
    }
    .text {
      margin: 0;
      font-size: 16px;
      line-height: 1.7em;
      white-space: pre-line;
      overflow-wrap: anywhere;
      &:empty {
        display: none;
      }
    }
    .actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      [hidden] {
        display: none;
      }
    }
  }
  .context {
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--sd-line);
    border-radius: 6px;
    summary {
      padding: 2px 0;
      color: var(--sd-label);
      font-size: 14px;
      font-weight: 600;
      line-height: 1.6em;
      cursor: pointer;
    }
    .inner {
      padding-top: 12px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      font-size: 14px;
      line-height: 1.7em;
      overflow-wrap: anywhere;
    }
    .block .ttl {
      margin: 0 0 6px;
      color: #fff;
      font-weight: 700;
    }
    .list {
      margin: 0;
      padding: 0;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
      list-style: none;
      li {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px 10px;
      }
      .when {
        color: var(--sd-hint);
        font-size: 14px;
      }
      .text {
        flex: 1 1 240px;
        min-width: 0;
        white-space: pre-line;
      }
    }
    .use {
      padding: 6px 12px;
      min-height: 32px;
      background: #3a434d;
      color: var(--text);
      font-size: 14px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }
    .state {
      margin: 0;
      color: var(--warning);
    }
    .suggest {
      margin: 0 0 6px;
      color: #a8d4ff;
      white-space: pre-line;
    }
    .dim {
      margin: 0;
      color: var(--sd-hint);
      font-size: 14px;
    }
  }
  .meta {
    margin: 0;
    color: var(--sd-hint);
    font-size: 14px;
    line-height: 1.6em;
    overflow-wrap: anywhere;
  }
  .foot {
    padding: 14px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border);
    @media (max-width: 600px) {
      padding: 12px 16px;
    }
    .bar {
      padding: 10px 12px;
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
      gap: 8px;
      background: rgba(253, 203, 110, 0.12);
      border-radius: 6px;
      &[hidden] {
        display: none;
      }
      .text {
        margin-right: auto;
        color: var(--warning);
        font-size: 14px;
        line-height: 1.6em;
      }
    }
    .actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 10px;
    }
  }
  .btn-primary,
  .btn-secondary {
    padding: 9px 18px;
    min-height: 44px;
    font-size: 16px;
    line-height: 1.5em;
  }
  .ai .btn-secondary {
    min-height: 40px;
    font-size: 14px;
  }
  button:disabled {
    opacity: 0.5;
    cursor: wait;
  }
}
