/* シシマイツールズ 共通スタイル */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=WDXL+Lubrifont+JP+N&display=swap');

/* ============================================
   Bulma CSS変数オーバーライド
   ============================================ */
:root {
  /* アクセントカラー: #f59e0b (HSL: 38deg, 92%, 50%) */
  --bulma-primary-h: 38deg;
  --bulma-primary-s: 92%;
  --bulma-primary-l: 50%;

  /* リンクカラーもアクセントカラーに統一（タブ、セレクト矢印、aタグ等） */
  --bulma-link-h: 38deg;
  --bulma-link-s: 92%;
  --bulma-link-l: 50%;

  /* フォントスタック */
  --bulma-family-primary: system-ui, -apple-system, "Noto Sans JP", sans-serif;

  /* 角丸 */
  --bulma-radius: 0.5rem;

  /* テキストカラー */
  --bulma-text-strong: #1f2937;
}

/* ============================================
   サイト名用フォント
   ============================================ */
.site-title {
  font-family: "WDXL Lubrifont JP N", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* ============================================
   レイアウト
   ============================================ */

/* コンテンツ最大幅 */
.container.is-narrow {
  max-width: 672px;
}

.container.is-medium-width {
  max-width: 960px;
}

/* Sticky footer */
html, body {
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}

body > .footer {
  margin-top: auto;
  padding-bottom: 3rem;
}

/* ============================================
   カードコンポーネント（トップページツール一覧）
   ============================================ */
a.card {
  display: block;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: inherit;
}

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

a.card .icon.is-accent {
  color: #f59e0b;
  font-size: 1.5rem;
}

/* ============================================
   フォーム要素
   ============================================ */

/* フォーカス時のアクセントカラー */
.input:focus,
.textarea:focus,
.select select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 0.125em rgba(245, 158, 11, 0.25);
}

/* ============================================
   折りたたみセクション（<details>）
   ============================================ */

/* すべてのdetails summaryの基本スタイル */
details > summary {
  list-style: none;
  cursor: pointer;
}

details > summary::-webkit-details-marker {
  display: none;
}

details.box {
  padding: 0;
}

details.box > summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

details.box > summary::after {
  content: "";
  margin-left: auto;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

details.box[open] > summary::after {
  transform: rotate(45deg);
}

details.box > summary:hover {
  background-color: #f9fafb;
}

details.box > .details-content {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #f0f0f0;
}

/* ============================================
   出力エリア
   ============================================ */
.output-area {
  background-color: #1f2937;
  color: #e5e7eb;
  font-family: monospace;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-all;
}


/* ============================================
   ユーティリティクラス
   ============================================ */

/* Flexbox gap（Bulma v1にはgapヘルパーがないため独自定義） */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Flex item min-width（truncate対策） */
.min-w-0 { min-width: 0; }

/* 表示制御 */
.hidden {
  display: none !important;
}

/* テキスト省略 */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ワードブレーク */
.break-all { word-break: break-all; }

/* アクセントカラーテキスト */
.has-text-accent { color: #f59e0b; }

/* セクション区切り */
.has-border-top-light { border-top: 1px solid #f0f0f0; }

/* ============================================
   HTMLチェッカー 結果表示
   ============================================ */
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.check-item:last-child {
  border-bottom: none;
}

.check-item-content {
  flex: 1;
  min-width: 0;
}

/* ドラッグ&ドロップ ハイライト */
.is-drop-active {
  background-color: #fffbeb;
  border-color: #f59e0b;
}

/* ============================================
   htpasswdジェネレーター
   ============================================ */
.password-display {
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
  word-break: break-all;
}

/* 一括生成 ユーザー行 */
@media (max-width: 768px) {
  .multi-user-row .field.is-grouped {
    flex-wrap: wrap;
  }
  .multi-user-row .control.is-expanded {
    width: 100%;
    flex-basis: 100%;
  }
}

/* ============================================
   サイトマップ生成 URL一覧
   ============================================ */
.scrollable-list {
  max-height: 20rem;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.url-row:hover {
  background-color: #f9fafb;
}

/* ============================================
   入力幅制御ユーティリティ
   ============================================ */
.control-width-5 {
  width: 5rem;
}

.control-width-8 {
  width: 8rem;
}

/* ============================================
   コードハイライト（notification内）
   ============================================ */
.code-inline {
  background: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.code-block {
  display: block;
  margin-top: 0.5rem;
  background: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* ============================================
   ファイル入力（HTMLチェッカー用）
   ============================================ */
.file-input-styled {
  display: block;
  width: 100%;
  font-size: 0.875rem;
  color: #6b7280;
  cursor: pointer;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.file-input-styled::file-selector-button {
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: #fffbeb;
  color: #b45309;
  cursor: pointer;
}

.file-input-styled::file-selector-button:hover {
  background-color: #fef3c7;
}

/* ============================================
   SNSプレビュー（OGPメタタグ生成用）
   ============================================ */
.sns-preview-card {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
  max-width: 28rem;
}

.sns-preview-card.is-twitter {
  border-radius: 1rem;
}

.sns-preview-image-placeholder {
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 2rem;
}

.sns-preview-image-placeholder.is-large {
  height: 10rem;
}

.sns-preview-image-placeholder.is-square {
  width: 6rem;
  height: 6rem;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ============================================
   シェアボタン
   ============================================ */

/* PC用: サイド固定 */
.share-side {
  position: fixed;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 50;
}

@media (min-width: 1024px) {
  .share-side { display: flex; }
}

/* スマホ用: インライン表示 */
.share-inline {
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 1024px) {
  .share-inline { display: none; }
}

.share-inline-label {
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 0.75rem;
  text-align: center;
}

.share-inline-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* 共通ボタン */
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  border-radius: 9999px;
  transition: transform 0.2s, background-color 0.2s;
}

.share-btn:hover {
  color: #fff;
  transform: scale(1.1);
}

/* PC用: 丸ボタン */
.share-btn-circle {
  width: 2.5rem;
  height: 2.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 1.125rem;
}

/* スマホ用: ピルボタン */
.share-btn-pill {
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  font-size: 0.875rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.share-btn-pill:hover {
  transform: scale(1.05);
}

/* SNS別カラー */
.share-btn-twitter { background-color: #000; }
.share-btn-twitter:hover { background-color: #1f2937; }
.share-btn-facebook { background-color: #1877F2; }
.share-btn-facebook:hover { background-color: #166FE5; }
.share-btn-line { background-color: #06C755; }
.share-btn-line:hover { background-color: #05B34C; }

