/* Get a Quote 组件 — 设计基准 340×490；HTML: src/partials/quote.html；脚本: js/quote-modal.js
 *
 * 页面接入：引入本文件 + quote-modal.js，在按钮上写 data-quote-dialog-open 即可。
 */

.quote-dialog-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 300;
  padding: 0;
  margin: 0;
  background: rgba(0, 21, 41, 0.42);
  box-sizing: border-box;
}

.quote-dialog-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 301;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  pointer-events: auto;
}

.quote-modal {
  width: 340px;
  height: 490px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.quote-modal__header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.quote-modal__header-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.quote-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 72px;
  text-align: center;
}

.quote-brand__logo {
  display: block;
  width: 72px;
  height: auto;
  max-height: 88px;
  object-fit: contain;
}

.quote-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #001529;
  flex: 1;
  min-width: 0;
}

.quote-modal__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.quote-modal__close-icon {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.quote-modal__close:hover {
  background: #f5f5f5;
}

.quote-modal__close:hover .quote-modal__close-icon {
  opacity: 0.85;
}

.quote-modal__close:focus-visible {
  outline: 2px solid #0077c8;
  outline-offset: 2px;
}

.quote-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 11px;
}

.quote-form__field {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.quote-form__field--grow {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.quote-form__input,
.quote-form__textarea {
  width: 100%;
  margin: 0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  color: #001529;
  background: #fff;
  box-sizing: border-box;
}

.quote-form__input::placeholder,
.quote-form__textarea::placeholder {
  color: #a8a8a8;
}

.quote-form__input {
  height: 38px;
  padding: 0 12px;
}

.quote-form__textarea {
  flex: 1;
  min-height: 100px;
  padding: 10px 12px;
  resize: none;
  line-height: 1.45;
}

.quote-form__input:focus,
.quote-form__textarea:focus {
  outline: none;
  border-color: #0077c8;
  box-shadow: 0 0 0 1px #0077c8;
}

.quote-form__actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  padding-top: 4px;
}

.quote-form__submit {
  width: 180px;
  height: 42px;
  margin: 0;
  padding: 0 20px;
  border: none;
  border-radius: 50px;
  background: #001529;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.quote-form__submit:hover {
  background: #002a4a;
}

.quote-form__submit:focus-visible {
  outline: 2px solid #0077c8;
  outline-offset: 3px;
}

.quote-form__submit:active {
  background: #001018;
}

/* —— Quote 组件外壳：挂载于 body，与 .quote-modal 内容区配合任意页面调用 —— */
.quote-dialog-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 300;
  padding: 0;
  margin: 0;
  background: rgba(0, 21, 41, 0.42);
  box-sizing: border-box;
}

.quote-dialog-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 301;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  pointer-events: auto;
}
