/* =========================
   MODAL BACKDROP
   ========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(34, 34, 34, 0.35); /* soft dim */
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* =========================
   MODAL BOX
   ========================= */

.modal-box {
  background-color: var(--bg-card);
  width: 92%;
  max-width: 360px;  
  padding: 20px;     
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
   overflow: hidden; 
}


.modal-box.large {
  max-width: 560px;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================
   MODAL HEADER
   ========================= */

.modal-header {
  margin-bottom: 20px;
}

.modal-header h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* =========================
   FORM ELEMENTS
   ========================= */

.modal-box label {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.modal-box input,
.modal-box select,
.modal-box textarea {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background-color: var(--bg-muted);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.modal-box textarea {
  min-height: 100px;
  resize: vertical;
}

/* =========================
   ACTION BUTTONS
   ========================= */

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* =========================
   STAR RATING
   ========================= */

.star-rating {
  display: flex;
  gap: 10px;
  font-size: 26px;
  cursor: pointer;
}

.star-rating span {
  color: #d8d2c7;
  transition: transform 0.15s ease, color 0.15s ease;
}

.star-rating span:hover {
  transform: scale(1.15);
  color: var(--accent);
}

.star-rating span.active {
  color: var(--accent);
}

/* =========================
   BOOK PREVIEW (COMPLETE MODAL)
   ========================= */

.book-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.book-preview h4 {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.book-preview p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* =========================
   CLOSE STATE
   ========================= */

.modal.hidden {
  display: none;
}

/* =========================
   COMPLETE MODAL BOOK COVER
   ========================= */

#complete-book-cover {
  width: 90px;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  background-color: #e5e5e5;

}

@media (max-width: 480px) {
  .modal-box,
  .modal-box.large {
    max-width: 92%;
    padding: 16px;
  }
}


.modal-box label {
  margin-bottom: 8px;
}

.modal-actions {
  margin-top: 14px;
}
.modal-box {
  background-color: var(--bg-card);
  width: 90%;
  max-width: 340px;   /* 👈 smaller & clean */
  padding: 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-box.large {
  max-width: 420px;
}





