/* ================================================
   Find My Photo – Search Page Styles
   ================================================ */
#fmp-search {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 80vh;
  padding: 60px 20px;
  background: #f9fafb;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
}

.fmp-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  padding: 40px;
  max-width: 700px;
  width: 100%;
  text-align: center;
  transition: all 0.3s ease;
}

.fmp-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.fmp-card h2 {
  font-size: 1.8rem;
  color: #0f172a;
  margin-bottom: 8px;
}

.fmp-card p {
  color: #475569;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.fmp-btn {
  display: inline-block;
  background: #0073aa;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
}

.fmp-btn:hover {
  background: #005c88;
}

#fmp-file {
  display: none;
}

#fmp-status {
  font-size: 0.95rem;
  color: #334155;
  margin-top: 1rem;
}

/* ================================================
   Grid Gallery
   ================================================ */
.fmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 24px;
  justify-items: center;
}

.fmp-grid img {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fmp-grid img:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ================================================
   Pagination
   ================================================ */
.fmp-pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.fmp-page {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.fmp-page:hover {
  background: #e2e8f0;
}

.fmp-page.active {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* ================================
   🔍 Lightbox Styling
   ================================ */
.fmp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
  padding: 40px 20px;
}

.fmp-lightbox-img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.fmp-lightbox .fmp-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
  z-index: 10000;
}

.fmp-lightbox .fmp-close:hover {
  opacity: 0.7;
}

.fmp-lightbox-controls {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
  align-items: center;
}

.fmp-lightbox-controls button,
.fmp-lightbox-controls a {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.fmp-lightbox-controls button:hover,
.fmp-lightbox-controls a:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.05);
}

.fmp-lightbox::after {
  content: "Use ← → arrows or Esc to close";
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  margin-top: 12px;
}

/* ================================================
   Privacy + Spinner
   ================================================ */
.fmp-privacy {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 1.5rem;
  line-height: 1.4;
}

/* Overlay Spinner */
.fmp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 500;
}

.fmp-spinner {
  border: 4px solid #e2e8f0;
  border-top-color: #0073aa;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 768px) {
  .fmp-card {
    padding: 24px;
    max-width: 100%;
  }
  .fmp-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .fmp-lightbox-img {
    max-width: 95%;
    max-height: 75vh;
  }
}