/* ==========================================================================
   Contact Modal Component Styles
   おゆかりVtuberマップ お問い合わせモーダル
   ========================================================================== */

/* --- ヘッダー用「お問い合わせ」ボタン --- */
.btn-header-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.125rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.02em;
}

.btn-header-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
}

.btn-header-contact:active {
  transform: translateY(0);
}

.btn-header-contact svg {
  flex-shrink: 0;
}

/* 個別ハブページ用ナビボタン */
.hub-nav-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.875rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hub-nav-contact-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* --- モーダルオーバーレイ --- */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.contact-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* --- モーダル本体カード --- */
.contact-modal-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(15, 23, 42, 0.05);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem;
  color: #1e293b;
}

.contact-modal-overlay.is-active .contact-modal-card {
  transform: translateY(0) scale(1);
}

/* --- クローズボタン --- */
.contact-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

/* --- ヘッダー --- */
.contact-modal-header {
  margin-bottom: 1.5rem;
  padding-right: 2.5rem;
}

.contact-modal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4f46e5;
  background: #eef2ff;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.contact-modal-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.375rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-modal-lead {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* --- フォーム入力グループ --- */
.contact-form-group {
  margin-bottom: 1.125rem;
}

.contact-form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.375rem;
}

.contact-badge-req {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #ef4444;
  background: #fef2f2;
  padding: 1px 6px;
  border-radius: 4px;
}

.contact-form-input,
.contact-form-select,
.contact-form-textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.contact-form-input:focus,
.contact-form-select:focus,
.contact-form-textarea:focus {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.contact-form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

/* --- 送信ボタン --- */
.btn-contact-submit {
  width: 100%;
  padding: 0.8125rem 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 1.25rem;
}

.btn-contact-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.btn-contact-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* --- 送信中スピナー --- */
.contact-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: contactSpin 0.7s linear infinite;
  display: inline-block;
}

@keyframes contactSpin {
  to { transform: rotate(360deg); }
}

/* --- ハイブリッド直接メールエリア --- */
.contact-direct-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed #e2e8f0;
  text-align: center;
}

.contact-direct-title {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.contact-direct-copybar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.contact-direct-email {
  font-size: 0.8125rem;
  font-family: monospace;
  font-weight: 600;
  color: #1e293b;
}

.btn-copy-email {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-email:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-copy-email.is-copied {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

/* --- 送信完了ステート --- */
.contact-success-state {
  text-align: center;
  padding: 2.5rem 1rem;
}

.contact-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.2);
  animation: contactPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes contactPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.contact-success-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.contact-success-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* レスポンシブ調整 */
@media (max-width: 640px) {
  .contact-modal-card {
    padding: 1.5rem 1.25rem;
  }
  .btn-header-contact span {
    display: inline;
  }
}
