/* =========================================================
   VEDA CENTER Jyotish App v2.0 — UI スタイル
   ========================================================= */

/* ── ベース ──────────────────────────────────────────── */
.vcj-app {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic Pro', sans-serif;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 8px 40px;
  color: #2c2c2c;
  line-height: 1.75;
}

/* ── タブ ─────────────────────────────────────────────── */
.vcj-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
  border-bottom: 2px solid #d4a853;
  padding-bottom: 2px;
}

.vcj-tab {
  padding: 9px 18px;
  border: 1px solid #d4a853;
  border-bottom: none;
  background: #fdf8f0;
  color: #6b5020;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: background 0.2s, color 0.2s;
}
.vcj-tab:hover {
  background: #fdf0d8;
}
.vcj-tab.is-active {
  background: #d4a853;
  color: #fff;
  border-color: #d4a853;
}

/* ── パネル ──────────────────────────────────────────── */
.vcj-panel {
  display: none;
  background: #fff;
  border: 1px solid #e8d5a3;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 28px 24px;
}
.vcj-panel.is-active {
  display: block;
}

/* ── 認証カード ──────────────────────────────────────── */
.vcj-auth-card {
  background: #fffaf0;
  border: 1px solid #e8d5a3;
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 24px;
}
.vcj-auth-title {
  margin: 0 0 10px;
  font-size: 17px;
  color: #7a4f00;
}
.vcj-auth-desc {
  margin: 0 0 16px;
  font-size: 14px;
  color: #666;
}
.vcj-auth-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}
.vcj-auth-form .vcj-input {
  flex: 1;
  min-width: 180px;
}
.vcj-auth-error {
  width: 100%;
  color: #c0392b;
  font-size: 13px;
  margin-top: 6px;
}
.vcj-auth-link {
  margin: 12px 0 0;
  font-size: 13px;
  color: #888;
}
.vcj-auth-link a {
  color: #d4a853;
}

/* ── フォームラップ（ロック時） ─────────────────────── */
.vcj-form-wrap.vcj-locked {
  opacity: 0.3;
  pointer-events: none;
  user-select: none;
}

/* ── お知らせバー ─────────────────────────────────────── */
.vcj-notice {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.vcj-notice--free     { background: #f0f8e8; border-left: 4px solid #6db33f; color: #2d5a00; }
.vcj-notice--standard { background: #e8f0ff; border-left: 4px solid #4a7fd4; color: #1a3a6e; }
.vcj-notice--premium  { background: #f5e8ff; border-left: 4px solid #9b59b6; color: #4a0066; }
.vcj-notice--pro      { background: #fff4e0; border-left: 4px solid #d4a853; color: #6b3d00; }
.vcj-notice a { color: inherit; font-weight: 600; }

/* ── フィールド ──────────────────────────────────────── */
.vcj-field {
  margin-bottom: 18px;
}
.vcj-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #444;
}
.vcj-input,
.vcj-form select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  background: #fafafa;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.vcj-input:focus,
.vcj-form select:focus {
  outline: none;
  border-color: #d4a853;
  background: #fff;
}
.vcj-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.6;
  background: #fafafa;
  box-sizing: border-box;
  resize: vertical;
  transition: border-color 0.2s;
}
.vcj-textarea:focus {
  outline: none;
  border-color: #d4a853;
  background: #fff;
}

/* ── インライン行 ─────────────────────────────────────── */
.vcj-inline-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.vcj-inline-row .vcj-input {
  flex: 1;
  min-width: 140px;
}

/* ── ヘルプテキスト ──────────────────────────────────── */
.vcj-help {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}

/* ── ボタン ──────────────────────────────────────────── */
.vcj-btn {
  display: inline-block;
  padding: 10px 22px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.vcj-btn:active { transform: scale(0.98); }

.vcj-btn--primary {
  background: #d4a853;
  color: #fff;
  width: 100%;
  padding: 13px;
  font-size: 15px;
  margin-top: 6px;
}
.vcj-btn--primary:hover { background: #c0923f; }

.vcj-btn--auth {
  background: #4a7fd4;
  color: #fff;
}
.vcj-btn--auth:hover { background: #3a6fc4; }

.vcj-btn--sm {
  padding: 7px 14px;
  font-size: 13px;
  background: #f0ebe0;
  color: #6b5020;
  border: 1px solid #d4a853;
  margin-top: 8px;
}
.vcj-btn--sm:hover { background: #e8dfc8; }

.vcj-btn--autofill {
  background: #e8f0e0;
  color: #3d6b00;
  border: 1px solid #8dc06e;
}

.vcj-btn--followup {
  background: #e8edf8;
  color: #2a4a8e;
  border: 1px solid #4a7fd4;
  margin-top: 8px;
}

.vcj-btn--upsell {
  display: block;
  background: #d4a853;
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 5px;
  margin-top: 14px;
  font-weight: 600;
  text-decoration: none;
}
.vcj-btn--upsell:hover { background: #c0923f; color: #fff; text-decoration: none; }

/* ── エラー表示 ──────────────────────────────────────── */
.vcj-error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 8px;
  min-height: 1em;
}

/* ── ローディング ─────────────────────────────────────── */
.vcj-loading {
  display: none;
  text-align: center;
  padding: 24px;
  color: #888;
  font-size: 14px;
}
.vcj-loading::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid #e8d5a3;
  border-top-color: #d4a853;
  border-radius: 50%;
  animation: vcj-spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}
@keyframes vcj-spin { to { transform: rotate(360deg); } }

/* ── 結果表示 ─────────────────────────────────────────── */
.vcj-result {
  margin-top: 24px;
}
.vcj-result-box {
  background: #fffaf2;
  border: 1px solid #e8d5a3;
  border-radius: 8px;
  padding: 22px 24px;
  line-height: 1.85;
  font-size: 14.5px;
  white-space: pre-wrap;
  word-break: break-word;
}
.vcj-result-meta {
  font-size: 12px;
  color: #aaa;
  margin-top: 8px;
  text-align: right;
}
.vcj-remaining {
  font-size: 13px;
  color: #888;
  margin-top: 6px;
  text-align: right;
}

/* ── アップセルバナー ─────────────────────────────────── */
.vcj-upsell {
  margin-top: 24px;
  background: linear-gradient(135deg, #fffaf0, #fdf0d8);
  border: 1px solid #e8c060;
  border-radius: 8px;
  padding: 20px 22px;
}
.vcj-upsell__title {
  font-size: 16px;
  font-weight: 700;
  color: #7a4f00;
  margin: 0 0 14px;
}
.vcj-upsell__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 6px;
}
.vcj-upsell__table th,
.vcj-upsell__table td {
  padding: 8px 10px;
  border: 1px solid #e8d0a0;
  text-align: left;
}
.vcj-upsell__table thead {
  background: #f8e8b0;
}

/* ── 追加質問エリア ──────────────────────────────────── */
.vcj-followup {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed #e0d0a8;
}
.vcj-followup label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #555;
}

/* ── ユーティリティ ──────────────────────────────────── */
.vcj-hidden { display: none !important; }
.vcj-tab-link { color: #d4a853; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ── レスポンシブ ─────────────────────────────────────── */
@media (max-width: 600px) {
  .vcj-panel { padding: 20px 14px; }
  .vcj-tabs  { gap: 4px; }
  .vcj-tab   { padding: 8px 12px; font-size: 13px; }
  .vcj-auth-form { flex-direction: column; }
  .vcj-auth-form .vcj-input,
  .vcj-auth-form .vcj-btn--auth { width: 100%; }
  .vcj-upsell__table { font-size: 12px; }
  .vcj-upsell__table th,
  .vcj-upsell__table td { padding: 6px 7px; }
}
