/* public/css/inquiry.css */

/* 詢價頁面橫幅 */
.inquiry-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 57vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  position: relative;
  background-image: url("/public/images/banner.png");
  background-size: cover;
  background-position: top center;
}

.inquiry-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
}

.banner-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.banner-description {
  font-size: 1.2rem;
  opacity: 0.8;
  line-height: 1.6;
}

/* 詢價頁面主容器 */
.inquiry-page {
  background-color: #f8f9fa;
  padding: 6% 13%;
  background: linear-gradient(180deg, #f9f6fc 0%, #f6f5fd 100%);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  min-height: 100vh;
}

.inquiry-container {
  max-width: 100%;
  margin: 0 auto;
}

/* 頁面標題區域 */
.page-title-section {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
  color: #333;
}

.inquiry-highlight {
  color: #b8272e;
}

/* 詢價內容區域 */
.inquiry-content {
  margin-bottom: 2rem;
}

/* 空購物車樣式 */
.empty-cart-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.empty-cart {
  padding: 1rem 2rem;
  border: 1px solid #b8272e;
  border-radius: 1rem;
  margin: 2rem auto;
  width: 100%;
  color: #b8272e;
  text-align: center;
  max-width: 600px;
}

.button-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 1rem 0 2rem;
}

/* 詢價列表樣式 */
.inquiry-list-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 35%;
}

.inquiry-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.add-more-btn {
  align-self: center;
  margin-top: 1.5rem;
}

/* 詢價項目卡片 */
.inquiry-item {
  display: flex;
  align-items: stretch;
  margin-bottom: 0.8rem;
  border: 1px solid #b8272e;
  border-radius: 1.5rem;
  overflow: hidden;
  height: 3.5rem;
  width: 100%;
}

/* 左側分類名稱區域 */
.category-section {
  background-color: white;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  border-right: 6px solid #b8272e;
}

/* 右側數量控制區域 */
.quantity-section {
  flex-grow: 1;
  background-color: white;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 分類名稱文字樣式 */
.category-name {
  font-size: 1rem;
  color: #333;
  margin: 0;
  text-align: center;
}

/* 數量標籤文字 */
.quantity-label {
  font-size: 0.9rem;
  color: #333;
  margin-right: 1rem;
}

/* 數量控制區 */
.quantity-controls {
  display: flex;
  align-items: center;
}

/* 數量輸入框 */
.quantity-input {
  width: 60px;
  height: 30px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 0;
  outline: none;
  font-size: 0.9rem;
  margin: 0 0.5rem;
}

/* 數量加減按鈕 */
.quantity-button {
  width: 30px;
  height: 30px;
  background-color: white;
  color: #333;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: bold;
}

.quantity-button:hover:not(:disabled) {
  background-color: #f5f5f5;
}

/* 動作按鈕 */
.action-button {
  display: inline-block;
  background-color: white;
  color: #222;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: 2px solid #222;
  border-radius: 2rem;
  text-decoration: none;
  margin: 1.5rem 0;
  transition: all 0.2s ease;
  text-align: center;
}

.action-button:hover {
  background-color: #222;
  color: white;
}

/* 詢價資訊提示 */
.inquiry-info-section {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1.5rem;
  width: 100%;
}

.inquiry-info-box {
  margin-bottom: 1.5rem;
  text-align: left;
  width: 100%;
}

.inquiry-info-text {
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.inquiry-form-link {
  color: #b8272e;
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
  margin: 0 0.25rem;
}

.inquiry-form-link:hover {
  text-decoration: none;
}

/* 表單容器 */
.inquiry-form-container {
  background-color: white;
  padding: 2rem;
  border: 1px solid #b8272e;
  border-radius: 2rem;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.15);
  max-width: 900px;
  margin: 0 auto 3rem auto;
}

/* 表單訊息 */
.form-message {
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 14px;
  text-align: center;
}

.form-message.success {
  background-color: #eeffee;
  color: #00aa00;
  border: 1px solid #ccffcc;
}

.form-message.error {
  background-color: #ffeeee;
  color: #cc0000;
  border: 1px solid #ffcccc;
}

/* 表單區塊 */
.form-section {
  margin-bottom: 2rem;
  padding: 3rem;
}

.section-title {
  color: #b8272e;
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
}

/* 表單行和組 */
.form-row {
  margin-bottom: 1.5rem;
}

.form-group {
  width: 100%;
  margin-bottom: 1rem;
}

/* 輸入框樣式 */
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.5rem;
  border: none;
  border-bottom: 1px solid #b8272e;
  font-size: 1rem;
  transition: all 0.3s;
  background-color: transparent;
  box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #b8272e;
  opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-width: 3px;
}

.form-group input:disabled {
  border-bottom-color: #ffcccc;
  background-color: transparent;
}

/* 文字區域樣式 */
.form-group textarea {
  width: 100%;
  min-height: 120px;
  border: none;
  border-radius: 1.5rem;
  padding: 0.75rem 0.5rem;
  resize: vertical;
  background-color: #fafafa;
  box-shadow: 0px 0px 2px 0px #00000040 inset;
}

.form-group textarea:focus {
  outline: none;
  border-bottom-width: 3px;
}

/* 複選框容器 */
.checkbox-container {
  margin-bottom: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 0, 0, 0.2);
}

.checkbox-container:last-child {
  margin-bottom: 0;
}

.checkbox-input-group {
  display: flex;
  align-items: center;
  width: 100%;
}

.checkbox-container input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #b8272e;
}

.checkbox-label {
  cursor: pointer;
  margin-right: 1rem;
  min-width: 100px;
  color: #b8272e;
}

.checkbox-input {
  flex: 1;
  padding: 0.5rem 0.25rem;
  border: none;
  border-bottom: 2px solid #b8272e;
  font-size: 0.9rem;
  transition: all 0.3s;
  background-color: transparent;
}

.checkbox-input::placeholder {
  color: #b8272e;
  opacity: 0.7;
}

.checkbox-input:focus {
  outline: none;
  border-bottom-width: 3px;
}

.checkbox-input:disabled {
  border-bottom-color: #ffcccc;
  background-color: transparent;
}

/* 檔案上傳器 */
.file-uploader {
  margin-bottom: 1rem;
}

.uploader-info {
  font-size: 0.9rem;
  color: #b8272e;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.upload-button-container {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.upload-button {
  display: inline-block;
  background-color: white;
  color: #b8272e;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  border: 1px solid #b8272e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-button:hover {
  background-color: rgba(255, 0, 0, 0.05);
}

.upload-button.disabled {
  border-color: #ffcccc;
  color: #ffcccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.file-error {
  color: #b8272e;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.file-list {
  margin-top: 1rem;
  background-color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 0, 0, 0.2);
}

.file-list-title {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #b8272e;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: white;
  border-radius: 0.3rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.file-info {
  font-size: 0.9rem;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80%;
}

.remove-button {
  background-color: transparent;
  color: #b8272e;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  transition: background-color 0.2s;
}

.remove-button:hover {
  background-color: rgba(255, 0, 0, 0.1);
  text-decoration: underline;
}

/* reCAPTCHA 區域 */
.recaptcha-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.g-recaptcha {
  display: inline-block;
  margin: 1rem 0;
}

.recaptcha-privacy {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #666;
  line-height: 1.4;
}

.recaptcha-privacy a {
  color: #007bff;
  text-decoration: none;
}

.recaptcha-privacy a:hover {
  text-decoration: underline;
}

.recaptcha-error {
  margin: 1rem 0;
  padding: 1rem;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

/* 回應式設計 */
@media (max-width: 768px) {
  .g-recaptcha {
    transform: scale(0.77);
    transform-origin: center;
  }

  .recaptcha-section {
    padding: 1rem;
    margin: 1rem 0;
  }
}

/* 載入狀態 */
.g-recaptcha iframe {
  border-radius: 4px;
}

/* 錯誤狀態 */
.recaptcha-error-highlight {
  border: 2px solid #dc3545 !important;
  border-radius: 4px;
  animation: shake 0.5s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* 提交按鈕 */
.submit-button-container {
  text-align: center;
  margin-top: 2rem;
}

.submit-button {
  background-color: #b8272e;
  color: white;
  border: none;
  padding: 0.8rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-button:hover:not(:disabled) {
  background-color: #a02323;
}

.submit-button:disabled {
  background-color: #ff8080;
  cursor: not-allowed;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .banner-content h1 {
    font-size: 2rem;
  }

  .banner-subtitle {
    font-size: 1.2rem;
  }

  .banner-description {
    font-size: 1rem;
  }

  .inquiry-page {
    padding: 4% 2%;
  }

  .inquiry-list-section {
    width: 100%;
  }

  .inquiry-form-container {
    padding: 1.5rem;
    margin: 0 0.5rem 2rem;
  }

  .form-section {
    padding: 2rem;
  }

  .checkbox-input-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .checkbox-label {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .checkbox-input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .banner-content h1 {
    font-size: 1.5rem;
  }

  .inquiry-page {
    padding: 2% 1%;
  }

  .inquiry-form-container {
    padding: 1rem;
    margin: 0 0.25rem 1rem;
  }

  .form-section {
    padding: 1rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .submit-button {
    padding: 0.7rem 2rem;
    font-size: 1rem;
    width: 100%;
    max-width: 280px;
  }
}
