@charset "utf-8";

/* ============================================================================
 * File: assets/css/page-contact.css
 * Role: お問合せ・履歴ページ専用スタイル
 * ========================================================================== */

/* ===== ページヒーロー ===== */
.page-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 120px 20px 50px;
  text-align: center;
}
.page-hero h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-hero p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===== コンテナ ===== */
.contact-container,
.history-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}
.breadcrumb {
  margin-bottom: 25px;
  font-size: 0.8rem;
  color: #888;
}
.breadcrumb a {
  color: var(--theme-accent, #c9a84c);
}

/* ===== カード ===== */
.form-card,
.history-card {
  background: #fff;
  border-radius: 16px;
  padding: 35px 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid #eee;
}

/* contact.php 専用 */
.form-intro {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #eee;
}
.form-intro p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.4em;
}
.form-group {
  margin-bottom: 25px;
}
.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: #333;
  margin-bottom: 8px;
}
.form-label .required {
  color: #ef4444;
  margin-left: 4px;
  font-size: 0.7rem;
  background: #fef2f2;
  padding: 2px 6px;
  border-radius: 3px;
}
.form-label .optional {
  color: #888;
  margin-left: 4px;
  font-size: 0.7rem;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
}
.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  background: #fdfdfd;
  display: block;
  font-family: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--theme-accent, #c9a84c);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.1);
  background: #fff;
}
textarea.form-control {
  min-height: 130px;
  resize: none;
  line-height: 1.6;
}
input::placeholder,
textarea::placeholder {
  color: #ccc;
}
.form-submit-area {
  text-align: center;
  margin-top: 30px;
}
.btn-main {
  display: inline-block;
  background: linear-gradient(135deg, var(--theme-accent, #c9a84c), #b8963e);
  color: #fff;
  border: none;
  padding: 16px 50px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
  transition: 0.2s;
  font-family: inherit;
}
.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
}
.error-box {
  background: #fef2f2;
  color: #dc2626;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid #fecaca;
}

/* 完了画面 */
.complete-box {
  text-align: center;
  padding: 50px 0;
}
.complete-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
  animation: float 2s infinite ease-in-out;
}
.complete-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--theme-accent, #c9a84c);
  margin-bottom: 15px;
}
.complete-text {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.8;
}
.history-url-card {
  background: #f8fafb;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin: 25px 0;
  text-align: center;
}
.history-url-box {
  background: #fff;
  border: 2px solid var(--theme-accent, #c9a84c);
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #333;
  margin: 10px 0;
  word-break: break-all;
}
.btn-copy {
  background: var(--theme-accent, #c9a84c);
  color: #fff;
  border: none;
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.2s;
}
.btn-copy:active {
  transform: scale(0.95);
}
.btn-home {
  display: inline-block;
  margin-top: 25px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  padding: 14px 35px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

/* 確認モーダル */
.bs-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  backdrop-filter: blur(4px);
}
.bs-overlay.is-active {
  opacity: 1;
  visibility: visible;
}
.bs-container {
  position: fixed;
  bottom: 16px;
  left: 50%;
  width: calc(100% - 32px);
  max-width: 700px;
  background: #fff;
  border-radius: 20px;
  z-index: 10001;
  height: 80vh;
  transform: translateX(-50%) translateY(calc(100% + 20px));
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  padding: 25px 20px 30px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}
.bs-overlay.is-active .bs-container {
  transform: translateX(-50%) translateY(0);
}
.bs-handle {
  width: 40px;
  height: 5px;
  background: #e0e0e0;
  border-radius: 10px;
  margin: -10px auto 20px;
  flex-shrink: 0;
}
.bs-title {
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #333;
  flex-shrink: 0;
}
.bs-content-scroll {
  flex: 1;
  overflow-y: auto;
}
.bs-data-item {
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}
.bs-data-label {
  font-size: 0.7rem;
  color: #aaa;
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}
.bs-data-value {
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}
.bs-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  flex-shrink: 0;
}
.btn-send {
  background: linear-gradient(135deg, var(--theme-accent, #c9a84c), #b8963e);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-fix {
  background: #f5f5f5;
  color: #888;
  border: none;
  padding: 14px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

/* 下書き復元バッジ */
.draft-badge {
  margin: 0 0 20px;
  border-radius: 12px;
  background: #fffbeb;
  border: 2px dashed #fbbf24;
  padding: 15px;
  display: none;
}
.draft-badge-body {
  display: flex;
  align-items: center;
  gap: 12px;
}
.draft-icon {
  font-size: 1.5rem;
}
.draft-text {
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #92400e;
  font-weight: 600;
}
.draft-clear-btn {
  background: #fbbf24;
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* contact-history.php 専用 */
.page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 5px;
}
.token-badge {
  font-family: monospace;
  font-weight: 700;
  color: #bbb;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 20px;
}
.limit-notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #9a3412;
}
.limit-notice b {
  color: #c2410c;
}
.expired-full {
  text-align: center;
  padding: 50px 20px;
  color: #888;
}
.expired-full h2 {
  margin-bottom: 15px;
  color: #444;
  font-size: 1.2rem;
}
.expired-full p {
  font-size: 0.9rem;
}
.chat-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 15px;
}
.bubble-item {
  max-width: 85%;
  position: relative;
}
.bubble-content {
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.6;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-all;
}
.bubble-meta {
  font-size: 0.65rem;
  color: #aaa;
  margin-top: 5px;
  display: block;
}
.sender-label {
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}
.bubble-left {
  align-self: flex-start;
}
.bubble-left .sender-label {
  color: #64748b;
}
.bubble-left .bubble-content {
  background: #f0f2f5;
  color: #333;
  border-bottom-left-radius: 4px;
}
.bubble-right {
  align-self: flex-end;
}
.bubble-right .sender-label {
  color: var(--theme-accent, #c9a84c);
  text-align: right;
}
.bubble-right .bubble-content {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble-right .bubble-meta {
  text-align: right;
}
.date-separator {
  text-align: center;
  font-size: 0.7rem;
  color: #aaa;
  padding: 5px 0;
}
.date-separator span {
  background: #e5e7eb;
  padding: 3px 12px;
  border-radius: 20px;
}
.wait-msg {
  background: #fffbeb;
  color: #92400e;
  text-align: center;
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #fde68a;
  font-weight: 700;
  margin-top: 25px;
  font-size: 0.9rem;
}
.wait-msg .icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 10px;
}
.reply-form {
  margin-top: 30px;
  border-top: 2px dashed #eee;
  padding-top: 25px;
}
.reply-form h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.reply-form textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  resize: none;
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
  font-family: inherit;
}
.reply-form textarea:focus {
  outline: none;
  border-color: var(--theme-accent, #c9a84c);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}
.btn-submit {
  background: linear-gradient(135deg, var(--theme-accent, #c9a84c), #b8963e);
  color: #fff;
  border: none;
  padding: 14px 35px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
  max-width: 220px;
  transition: 0.2s;
  font-family: inherit;
}
.btn-submit:hover {
  transform: translateY(-2px);
}
.sent-notice {
  background: #ecfdf5;
  color: #065f46;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  border: 1px solid #a7f3d0;
}

@media (max-width: 600px) {
  .form-card,
  .history-card {
    padding: 25px 15px;
  }
  .bs-container {
    height: 88vh;
  }
}
