/*
Theme Name: BoekControle.nl
Theme URI: https://boekcontrole.nl
Author: WebsiteExpert.nl
Description: WordPress theme for managing correction reports in Islamic books
Version: 1.0.7
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-slide-down {
  animation: slideDown 0.3s ease both;
}

/* Stagger delays */
.stagger-1 {
  animation-delay: 0ms;
}

.stagger-2 {
  animation-delay: 70ms;
}

.stagger-3 {
  animation-delay: 140ms;
}

.stagger-4 {
  animation-delay: 210ms;
}

.stagger-5 {
  animation-delay: 280ms;
}

.stagger-6 {
  animation-delay: 350ms;
}

.stagger-7 {
  animation-delay: 420ms;
}

.stagger-8 {
  animation-delay: 490ms;
}

.stagger-9 {
  animation-delay: 560ms;
}

/* ── Slide content (new book fields) ── */
.slide-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease,
    margin 0.4s ease,
    padding 0.4s ease;
  margin-top: 0;
}

.slide-content.is-open {
  max-height: 20rem;
  opacity: 1;
  margin-top: 1rem;
}

/* ── Upload zone ── */
.upload-zone.is-dragover {
  border-color: #10b981 !important;
  background-color: #ecfdf5 !important;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox.is-open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0.5rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

/* ── Custom select ── */
.custom-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* ── Radio pill buttons ── */
.type-radio:checked+label {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.type-radio-inhoudelijk:checked+label {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
}

.type-radio-typo:checked+label {
  border-color: #f59e0b !important;
  background-color: #fef3c7 !important;
  color: #b45309 !important;
}

.type-radio-misvertaling:checked+label {
  border-color: #8b5cf6 !important;
  background-color: #f5f3ff !important;
  color: #6d28d9 !important;
}

/* ── JS-toggled visibility ── */
.upload-preview {
  display: none;
}

.upload-preview.is-visible {
  display: block;
}

/* ── Multi-image preview grid ── */
.bc-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}

.bc-preview-item {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  aspect-ratio: 1;
  transition: border-color 0.2s;
}

.bc-preview-item:hover {
  border-color: #10b981;
}

.bc-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bc-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.bc-preview-item:hover .bc-preview-remove {
  opacity: 1;
}

.bc-preview-remove:hover {
  background: rgba(239, 68, 68, 0.9);
}

.search-clear {
  display: none;
}

.search-clear.is-visible {
  display: flex;
}

.no-results {
  display: none;
}

.no-results.is-visible {
  display: block;
}

.mobile-nav {
  display: none;
}

.mobile-nav.is-open {
  display: block;
  animation: slideDown 0.25s ease both;
}

/* ── Gradient accent line ── */
.gradient-accent {
  height: 3px;
  background: linear-gradient(90deg, #059669, #f59e0b, #059669);
}

/* ── Hero decorative pattern ── */
.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Book card hover glow ── */
.book-card {
  position: relative;
}

.book-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 8px 30px rgba(5, 150, 105, 0.12);
  pointer-events: none;
}

.book-card:hover::after {
  opacity: 1;
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}