/* URICO Contact Form - 全面改修版 */

/* ========================================
   A. フローティングバー（固定表示）
   ======================================== */
#buyer-selection-bar,
#floating-bar,
.urico-floating-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 99999 !important;
  background: linear-gradient(135deg, #1a237e, #283593);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

#buyer-selection-bar.visible,
#floating-bar.visible,
.urico-floating-bar.visible {
  transform: translateY(0);
}

.floating-bar-content,
.buyer-selection-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.selected-count-text,
.buyer-selection-count {
  color: white;
  font-size: 16px;
  font-weight: bold;
}

.btn-inquiry {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-inquiry {
  background: #FF6F00;
  color: white;
}

.btn-inquiry:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  #buyer-selection-bar,
  #floating-bar,
  .urico-floating-bar {
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
  }

  .floating-bar-content,
  .buyer-selection-bar-inner {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .btn-inquiry {
    width: 100%;
    padding: 12px 20px;
  }
}

/* ========================================
   B. 補足セクション（デザイン崩壊修正）
   ======================================== */
.buyer-supplement-modern {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
}

.buyer-supplement-modern h3 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #1a237e;
}

.three-column-grid,
.supplement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.supplement-item {
  background: white;
  border-radius: 8px;
  padding: 16px;
}

.supplement-item h4 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #1a237e;
}

.supplement-item p {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

/* SVGアイコンのサイズ制限 */
.notice-icon svg,
.supplement-icon svg,
.buyer-supplement-modern svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  flex-shrink: 0;
  display: block;
}

@media (max-width: 768px) {
  .three-column-grid,
  .supplement-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   C. モーダル
   ======================================== */
.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.modal-close-btn:hover {
  color: #000;
}

.modal-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #1a237e;
}

.form-section {
  margin-bottom: 24px;
}

.form-section h3 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #1a237e;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1a237e;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group.required label::after {
  content: " *";
  color: #d32f2f;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
}

.selected-buyers-preview {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.selected-buyer-item {
  background: white;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.selected-buyer-item:last-child {
  margin-bottom: 0;
}

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: #1a237e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.submit-btn:hover {
  background: #283593;
}

.submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.success-message,
.error-message {
  text-align: center;
  padding: 32px;
}

.success-message h3,
.error-message h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
}

.success-message p,
.error-message p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .contact-modal-content {
    width: 95%;
    padding: 24px 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   D. buyer-card のチェックボックス
   ======================================== */
.buyer-card {
  position: relative;
  cursor: pointer;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px 16px 16px 48px; /* 左側にスペース確保 */
  transition: all 0.2s ease;
  background: white;
  margin-bottom: 12px;
}

.buyer-card:hover {
  border-color: #1976d2;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.buyer-card.selected {
  border-left: 5px solid #1976d2;
  background: #e3f2fd;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
}

.buyer-card input[type="checkbox"],
.buyer-card .buyer-checkbox {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #1976d2;
}

@media (max-width: 768px) {
  .buyer-card {
    padding: 14px 14px 14px 50px;
  }

  .buyer-card input[type="checkbox"],
  .buyer-card .buyer-checkbox {
    width: 28px;
    height: 28px;
    top: 14px;
    left: 14px;
  }
}

/* ========================================
   E. 全選択/全解除ボタン（削除済み）
   ======================================== */
/* 全選択・全解除ボタンは削除しました（売主にとって迷惑なため不要） */

/* ========================================
   F. buyer-info-explainer（高品質リデザイン）
   ======================================== */
.buyer-info-explainer {
  max-width: 800px;
  margin: 40px auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ヘッダー部分 */
.explainer-header,
.buyer-info-explainer .header {
  background: linear-gradient(135deg, #1a56db 0%, #1e3a5f 100%);
  color: white;
  padding: 40px;
  text-align: center;
}

.explainer-header h2,
.buyer-info-explainer .header h2 {
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.explainer-header .highlight,
.buyer-info-explainer .header .highlight {
  color: #ffd700;
  font-weight: bold;
}

.explainer-header p,
.buyer-info-explainer .header p {
  font-size: 16px;
  margin: 0;
  opacity: 0.95;
}

/* フロー図 */
.flow-diagram {
  padding: 40px;
  background: #f8f9fa;
}

.flow-diagram h3 {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 24px 0;
  text-align: center;
  color: #1a1a1a;
}

.flow-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.flow-box {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.flow-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flow-box.highlight {
  background: #e3f2fd;
  border-color: #1976d2;
}

.flow-box.urico {
  background: #e8f5e9;
  border-color: #4caf50;
}

.flow-box h4 {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 8px 0;
  color: #1a1a1a;
}

.flow-box p {
  font-size: 14px;
  margin: 0;
  color: #555;
  line-height: 1.5;
}

/* 矢印 */
.flow-arrow {
  text-align: center;
  font-size: 24px;
  color: #1976d2;
  margin: 16px 0;
}

/* 業界の現状・URICOの取り組み */
.industry-issue,
.urico-approach {
  padding: 32px 40px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.industry-issue {
  background: #f5f5f5;
}

.urico-approach {
  background: #e3f2fd;
}

.industry-issue .icon,
.urico-approach .icon {
  flex-shrink: 0;
  font-size: 48px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.industry-issue .content,
.urico-approach .content {
  flex: 1;
}

.industry-issue h3,
.urico-approach h3 {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 8px 0;
  color: #1a1a1a;
}

.industry-issue p,
.urico-approach p {
  font-size: 15px;
  margin: 0;
  color: #555;
  line-height: 1.6;
}

/* メリットセクション */
.benefits {
  background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
  color: white;
  padding: 40px;
  border-radius: 0 0 16px 16px;
}

.benefits h3 {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 20px 0;
  text-align: center;
}

.benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.benefits li::before {
  content: '✓';
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .buyer-info-explainer {
    margin: 24px 16px;
    border-radius: 12px;
  }

  .explainer-header,
  .buyer-info-explainer .header {
    padding: 24px 20px;
  }

  .explainer-header h2,
  .buyer-info-explainer .header h2 {
    font-size: 20px;
  }

  .explainer-header p,
  .buyer-info-explainer .header p {
    font-size: 14px;
  }

  .flow-diagram {
    padding: 24px 20px;
  }

  .flow-boxes {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .flow-box {
    padding: 20px 16px;
  }

  .industry-issue,
  .urico-approach {
    padding: 24px 20px;
    flex-direction: column;
    text-align: center;
  }

  .benefits {
    padding: 24px 20px;
    border-radius: 0 0 12px 12px;
  }

  .benefits ul {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .benefits li {
    font-size: 14px;
  }
}
