﻿/* WebP to JPG Converter — AllOmnitools Styles */

.ad-slot,.ad-leaderboard,.ad-in-article,.ad-anchor,.ad-placeholder,[class*='ad-slot']{display:none!important;width:0!important;height:0!important;margin:0!important;padding:0!important;}

/* ── Hero ── */
.tool-hero {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  color: #fff;
}
.tool-hero h1 { font-size: 2.25rem; font-weight: 800; color: #fff !important; line-height: 1.25; margin-bottom: 0.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.tool-hero p { color: rgba(255,255,255,0.88); font-size: 1.05rem; max-width: 580px; margin: 0 auto; }
.tool-badge { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3); border-radius: 50px; padding: 0.35rem 0.95rem; font-size: 0.8rem; color: #fff; margin-bottom: 1rem; font-weight: 600; }

/* ── Layout ── */
.tool-page { max-width: 900px; margin: 0 auto; padding: 2.5rem 1.5rem; }

/* ── Card ── */
.calc-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 18px; padding: 2.25rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.calc-card h2 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.calc-card h2 i { color: #0ea5e9; }

/* ── Form fields ── */
.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.field-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-field input[type="number"],
.form-field select {
  width: 100%; background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 0.75rem 1rem; font-size: 0.95rem; color: var(--text); font-family: 'Inter', sans-serif;
  outline: none; box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.form-field input[type="number"]:focus,
.form-field select:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12); }
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; cursor: pointer;
}

/* ── Grid ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ── Convert button ── */
.calc-btn {
  width: 100%; background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff; border: none; border-radius: 12px; padding: 0.9rem 1.5rem;
  font-size: 1rem; font-weight: 700; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center;
  justify-content: center; gap: 0.5rem; margin-top: 0.75rem;
}
.calc-btn:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(14,165,233,0.3); }
.calc-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Progress bar ── */
.progress-wrap { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 1rem; }
.progress-fill { width: 0%; height: 100%; background: linear-gradient(90deg, #0ea5e9, #6366f1); border-radius: 999px; transition: width 0.3s ease; }

/* ===== Drop Zone ===== */
#dropZone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg);
  margin-bottom: 1rem;
}
#dropZone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
#dropZone:hover, #dropZone.drag-over { border-color: #0ea5e9; background: rgba(14,165,233,0.04); }

/* ===== File List ===== */
.file-list {
  margin-top: 0.75rem;
  max-height: 280px;
  overflow-y: auto;
}
.file-list-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 40px;
  font-size: 0.85rem;
}
.file-item span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  word-break: break-word;
}
.remove-file-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  transition: background 0.15s;
}
.remove-file-btn:hover {
  background: #fee2e2;
}

/* ===== Results Grid ===== */
#results {
  margin-top: 1rem;
}
.results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.result-card {
  flex: 1 1 200px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.75rem;
  transition: transform 0.1s;
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.result-card p {
  margin-bottom: 0.25rem;
}
.download-single {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 2rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}
.download-single:hover {
  opacity: 0.92;
}
.zip-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
html[data-theme="dark"] .zip-download-btn {
  background: #334155;
  color: #f1f5f9;
}
.zip-download-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== Progress Bar ===== */
.progress-custom {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
  border-radius: 999px;
}

/* ===== Status Messages ===== */
#statusMsg .notification {
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: 40px;
}

/* ===== Primary Button Override (Bulma is-primary) ===== */
.button.is-primary,
#convertBtn {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border: none;
  font-weight: 700;
  transition: all 0.2s;
  color: #fff;
}
.button.is-primary:hover:not(:disabled),
#convertBtn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}
.button.is-primary:disabled,
#convertBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Related tools ===== */
.related-tools-section { margin: 2rem 0 0.5rem; }
.related-tools-section h2 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem; border: none !important; padding: 0 !important; }
.related-tools-section h2 i { color: #0ea5e9; }
.related-tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 700px) { .related-tools-grid { grid-template-columns: 1fr; } }

/* ===== Tool Card (Related Tools) ===== */
.tool-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -12px rgba(0, 0, 0, 0.15);
}
.icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 60px;
  margin-bottom: 0.75rem;
}
.tool-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.tool-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Content Sections (FAQ, Tips, Guide) ===== */
.content-section .box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 1rem;
}
.content-section .box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.content-section .box p {
  font-size: 0.85rem;
  margin-bottom: 0;
}
ul.related-list {
  list-style: none;
  padding-left: 0;
}
ul.related-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
ul.related-list li:last-child {
  border-bottom: none;
}
ul.related-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
ul.related-list a:hover {
  color: var(--primary);
}
ul.related-list a::before {
  content: "→";
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* ===== Headings (consistent with reference) ===== */
.content-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 2rem 0 0.75rem;
  border-left: 3px solid var(--primary);
  padding-left: 0.75rem;
}
.content-section p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ===== Steps Box ===== */
.steps-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  counter-reset: steps;
}
.steps-box li {
  list-style: none;
  padding: 0.5rem 0 0.5rem 2.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}
.steps-box li:last-child { border-bottom: none; }
.steps-box li::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 24px;
  text-align: center;
}

/* ===== Feature pills ===== */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
}
.feature-pill {
  background: var(--primary-light);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.feature-pill strong {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.feature-pill p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ===== FAQ items ===== */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.85rem;
}
.faq-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.faq-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .file-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .result-card {
    flex: 1 1 100%;
  }
}

/* ── Footer ── */
#footer-root { background: #000000; margin-top: 3rem; }
.site-footer { background: #000000 !important; color: #94a3b8 !important; }
.site-footer a { color: #94a3b8 !important; }
.site-footer a:hover { color: #fff !important; }
