/* ================================
   Gazolab – Common Tool UI Core
   ※ 全ツールに共通する土台部分のみ
================================ */

/* --- Card --- */
.gz-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.5rem;
}

/* --- Dropzone --- */
.gz-dropzone {
  border: 2px dashed #bcbcbc;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  color: #999;
  background: #fafafa;
  transition: 0.2s;
  cursor: pointer;
  margin-bottom:15px;
}
.gz-dropzone:hover {
  border-color: #007aff;
  color: #007aff;
}

/* --- File meta --- */
.gz-filemeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.gz-file-name {
  font-size: .9rem;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Link button --- */
.gz-link-button {
  border: none;
  background: none;
  color: #007aff;
  font-size: .9rem;
  cursor: pointer;
  padding: 0;
}
.gz-link-button:hover { text-decoration: underline; }

/* --- Settings card --- */
.gz-settings-card {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.gz-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.gz-settings-label {
  font-size: .95rem;
  font-weight: 500;
}
.gz-settings-control {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .6rem;
}

/* --- Buttons --- */
.gz-primary-btn {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: .5rem 1.4rem;
  margin-top:15px;
  background: #007aff;
  color: #fff;
  font-size: .9rem;
  font-weight: 500;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.gz-primary-btn:hover:not(:disabled) {
  background: #005fd1;
  box-shadow: 0 8px 18px rgba(37,99,235,0.25);
}
.gz-primary-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* --- Result stats --- */
.gz-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  font-size: .9rem;
}

/* --- 2カラム全体レイアウト（全ツール共通） --- */
.gz-tool-wrap {
  display: grid;
  grid-template-columns: minmax(0,1.9fr) minmax(0,1.2fr);
  gap: 1.6rem;
  align-items: flex-start;
}
@media (max-width: 900px) {
  .gz-tool-wrap {
    grid-template-columns: 1fr;
  }
}

/* --- Preview --- */
.gz-preview-frame {
  margin-top:1.2rem;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#gzPreview img {
  max-width:100%;
  display:block;
  margin:0 auto;
}

.gz-download-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 170px;
}

.gz-primary-btn {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.4rem;
  background-color: #007aff;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.gz-primary-btn:hover:not(:disabled) {
  background-color: #005fd1;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.gz-primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* --- Stats bar (optimizer 共通 UI なので残す) --- */
.gz-result { flex: 1; font-size:.85rem; }
.gz-bar-row { display:flex; align-items:center; gap:.3rem; margin-bottom:.25rem; }
.gz-bar-label { min-width: 80px; flex: 0 0 auto; color:#4b5563; }
.gz-bar { flex:1; height:6px; background:#e5e7eb; border-radius:4px; overflow:hidden; }
.gz-bar-inner { height:100%; border-radius:4px; background:#10b981; width:0; transition:width .25s ease; }
.gz-bar-size { min-width:70px; text-align:right; color:#111827; }

/* --- Responsive 共通 --- */
@media (max-width:768px) {
  .gz-card { padding:1.2rem; }
  .gz-settings-row { flex-direction:row; align-items:flex-start; }
  .gz-stats-row { flex-direction:column; align-items:flex-start; gap:.8rem; }
  .gz-compare-card, .gz-settings-card {
    max-width:100%; margin-left:0; margin-right:0;
  }
}

/* ================================
   Features Section（共通UI）
   Gazolab 各ツール共通の下部 Feature カード
================================ */

/* セクション外枠 */
.gz-feature-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.gz-feature-section .gz-section-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 2x2 グリッドレイアウト */
.gz-feature-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.2rem;
  justify-items: center;  /* 各カード自体を横方向の中央寄せに */
}

@media (max-width: 768px) {
  .gz-feature-grid-2x2 {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
}

/* Feature アイテム本体 */
.gz-feature-item {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 280px;       /* カード自体の最大幅を制限して中央寄せ */
}

/* Feature のアイコン画像 */
.gz-feature-item img {
  width: 100%;
  height: auto;
  margin: 0 0 1.2rem 0;
  display: block;
  border-radius: 12px;
  object-fit: contain;
}

/* タイトル */
.gz-feature-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: #111827;
}

/* テキスト */
.gz-feature-text {
  font-size: .95rem;
  line-height: 1.55;
  color: #4b5563;
}

@media (max-width: 768px) {
  .gz-feature-item {
    max-width: 240px;     /* スマホ時はカード幅を少しだけ小さく */
  }
}

/* =========================
   ファイルサイズ表示ブロック
========================= */

.tool-size-info {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: 0.85rem;
  color: #4b5563;
}

.tool-size-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.tool-size-row + .tool-size-row {
  margin-top: 0.2rem;
}

.tool-size-row--delta {
  margin-top: 0.3rem;
}

.tool-size-label {
  font-weight: 500;
  color: #374151;
}

.tool-size-value {
  font-variant-numeric: tabular-nums;
}

.tool-size-value--processed {
  font-weight: 600;
}

/* 増減のハイライト表示 */
.tool-size-delta {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

/* サイズが増えた場合 */
.tool-size-delta--larger {
  color: #b45309;
  background: #fffbeb;
  border-color: #facc15;
}

/* サイズが減った場合 */
.tool-size-delta--smaller {
  color: #065f46;
  background: #ecfdf5;
  border-color: #34d399;
}

/* 理由説明テキスト（「修正したのにサイズが増えてる？」対策） */
.tool-size-note {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #6b7280;
}
.gz-diff-description {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #4b5563;
  line-height: 1.45;
}


/* =========================
   プライバシー説明ブロック
========================= */

.tool-privacy-note {
  margin-top: 1.2rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  font-size: 0.85rem;
  color: #4338ca;
  line-height: 1.5;
}

.tool-privacy-note strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}
