/* ============================
   ADMIN – SHOP OGLASI (SHOP)
   ============================ */

/* Gornji panel s gumbom "Dodaj oglas" */
.admin-panel {
  text-align: center;
  margin: 20px 0 24px;
}

.add-btn {
  background: var(--accent, #a74e9b);
  color: #100f0f;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 17px;
  cursor: pointer;
  font-weight: 600;
}

.add-btn:hover {
  filter: brightness(1.05);
}

/* Admin modal za dodavanje/uređivanje oglasa */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* ako u JS-u koristiš .open / .show – oba podržana */
.modal.open,
.modal.show {
  display: flex;
}

.modal-content {
  background: #ffffff;                     /* čista bijela pozadina */
  padding: 20px;
  border-radius: 18px;
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

#modalClose {
  position: absolute;
  top: 8px;
  right: 10px;
  background: #f44336;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  cursor: pointer;
}

/* galerija preview slika u admin modalu */
.preview-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.preview-item {
  position: relative;
  display: inline-block;
}

.preview-item img,
.preview-item video {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ccc;
  display: block;
}

.remove-btn {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 22px;
  height: 22px;
  line-height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(167, 78, 155, .9);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* zvjezdice za TOP/novo/akcija u admin modalu */
.star-btn {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffffd9;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  transition: transform .15s ease;
}

.star-btn:hover {
  transform: scale(1.08);
}

.star-btn.active {
  background: #ffe082;
  border-color: #f4b400;
}

.star-index {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: #a74e9b;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 12px;
  display: none;
}

.star-btn.active + .star-index {
  display: inline-block;
}

/* mali red s checkboxima Top/Novo/Akcija u modalu */
.featured-row {
  display: flex;
  gap: 18px;
  margin-top: 6px;
  align-items: center;
}

.featured-row label {
  margin-top: 0;
  font-weight: 500;
}

/* EDIT/DELETE plutajući gumbi na kartici */
.edit-toggle {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: #a74e9b;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform .25s ease, background .25s ease;
  z-index: 10;
}

.edit-toggle:hover {
  transform: scale(1.15);
  background: #b65fb3;
}

.card-actions {
  position: absolute;
  bottom: 60px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 11;
}

.card-actions.show {
  opacity: 1;
  pointer-events: auto;
}

.edit-btn,
.delete-btn {
  padding: 8px;
  font-size: .85rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.edit-btn {
  background: #ffc107;
  color: #333;
}

.delete-btn {
  background: #f44336;
  color: #fff;
}

/* Admin gumb za "oslobodi rezervaciju" (unutar kartice) */
.unlock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.45rem 0.75rem;
  margin-top: 0.25rem;
  background: linear-gradient(135deg, #9b2bb8, #d54c89);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  position: static;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.unlock-btn::before {
  content: "🔑";
  margin-right: 0.35rem;
  font-size: 1rem;
}

.unlock-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.22);
}

.unlock-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}


/* ============================
   ADMIN – RECENZIJE (PAGE)
   ============================ */

/* cijela admin traka na vrhu recenzije stranice */
.reviews-admin-bar {
  max-width: 650px;
  margin: 0 auto 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* gumb i form u istom stupcu */
  gap: 0.75rem;
}

/* gumb "+ Dodaj sliku recenzije" */
.reviews-admin-btn {
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 999px;
  border: none;
  background: #f6d5ff;
  color: #5a206b;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.reviews-admin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

/* form za upload slike – po defaultu skriven (klasa .hidden) */
.reviews-admin-form {
  margin-top: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.reviews-admin-form.hidden {
  display: none;
}

.reviews-admin-form label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.reviews-admin-form select,
.reviews-admin-form input[type="file"] {
  font-size: 0.85rem;
}

.reviews-admin-submit,
.reviews-admin-cancel {
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.reviews-admin-submit {
  background: #ffe28f;
  color: #624200;
}

.reviews-admin-cancel {
  background: #eee;
  color: #444;
}

.reviews-admin-status {
  font-size: 0.8rem;
  color: #666;
}

/* X gumbić za brisanje slike recenzije (samo admin) */
.review-image-card {
  position: relative;
}

.review-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: #333;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.review-delete-btn:hover {
  background: #ffdddd;
  color: #b00020;
}
