/* =============================================
   Web Images Downloader — Tool-specific Styles
   ============================================= */

/* ── Gallery Grid ── */
.img-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.img-gallery-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
}
.img-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

/* Thumbnail */
.img-thumb-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-alt);
}
.img-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.img-gallery-item:hover .img-thumb-wrap img {
  transform: scale(1.07);
}

/* Image Overlay */
.img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.25s;
}
.img-gallery-item:hover .img-overlay {
  opacity: 1;
}

/* Action Buttons */
.img-action-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.img-action-btn:hover {
  transform: scale(1.12);
}
.img-action-btn.copy-btn:hover {
  background: var(--primary);
  color: #fff;
}
.img-action-btn.dl-btn:hover {
  background: #06d6a0;
  color: #fff;
}

/* Caption */
.img-caption {
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--border);
}
.img-caption i {
  color: var(--primary);
  flex-shrink: 0;
}

/* ── ZIP Download Button ── */
.btn-zip-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #06d6a0, #059669);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
  white-space: nowrap;
}
.btn-zip-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 214, 160, 0.35);
}

/* ── ZIP Progress Bar ── */
.zip-progress {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.zip-progress-track {
  height: 7px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}
.zip-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #06d6a0);
  border-radius: 10px;
  transition: width 0.3s;
}
#zipStatus {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Toast ── */
.img-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--card-bg);
  border-left: 4px solid #06d6a0;
  border-radius: 50px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateX(360px);
  transition: transform 0.3s;
  z-index: 3000;
}
.img-toast.show {
  transform: translateX(0);
}
.img-toast i {
  color: #06d6a0;
  font-size: 1.1rem;
}

/* ── Feature Cards ── */
.img-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.img-feature-card {
  text-align: center;
  padding: 40px 28px 36px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}
.img-feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.img-feature-icon {
  width: 76px;
  height: 76px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.14),
    rgba(37, 99, 235, 0.06)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  transition: background var(--transition);
}
.img-feature-card:hover .img-feature-icon {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.22),
    rgba(37, 99, 235, 0.12)
  );
}
.img-feature-icon i {
  font-size: 1.9rem;
  color: var(--primary);
}
.img-feature-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.img-feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .img-gallery {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
