/* Admin Mode Indicator */
.admin-mode {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ff6b6b;
  color: white;
  padding: 0.5rem;
  text-align: center;
  z-index: 10000;
  font-weight: bold;
}

.admin-mode button {
  background: white;
  color: #ff6b6b;
  border: none;
  padding: 0.25rem 1rem;
  margin-left: 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.admin-mode button:hover {
  background: #f0f0f0;
}

/* Adjust header padding for admin bar */
body.admin-mode-active header {
  padding-top: 6rem;
}

/* Login Modal */
.login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10001;
  align-items: center;
  justify-content: center;
}

.login-modal.active,
.login-modal[style*="flex"] {
  display: flex !important;
}

.login-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
}

.login-modal-content input {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.login-modal-content button {
  width: 100%;
  padding: 0.75rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5rem;
}

.login-modal-content button:hover {
  background: #0056b3;
}

.login-modal-content .btn-secondary {
  background: #6c757d;
  margin-top: 0.5rem;
}

.login-modal-content .btn-secondary:hover {
  background: #545b62;
}

/* Editable text styles */
body.admin-mode-active [contenteditable="true"] {
  outline: 2px dashed #4dabf7;
  outline-offset: 2px;
  cursor: text;
  position: relative;
}

body.admin-mode-active [contenteditable="true"]:hover::after {
  content: " (Click to edit)";
  font-size: 0.8em;
  color: #4dabf7;
  font-style: italic;
}

body.admin-mode-active [contenteditable="true"]:focus {
  outline-color: #339af0;
  background: rgba(77, 171, 247, 0.1);
}

body.admin-mode-active [contenteditable="true"]:focus::after {
  display: none;
}

/* Save button for editable fields (only in admin mode) */
body.admin-mode-active .save-text-btn {
  position: absolute;
  top: -35px;
  right: 0;
  background: #51cf66;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  display: none;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body.admin-mode-active .save-text-btn:hover {
  background: #40c057;
}

body.admin-mode-active .save-text-btn.show {
  display: block;
}

body.admin-mode-active .editable-wrapper {
  position: relative;
}

/* Add photo button (only in admin mode) */
body.admin-mode-active .add-photo-btn {
  width: 100%;
  min-height: 200px;
  border: 3px dashed #ccc;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #f8f9fa;
  transition: all 0.3s;
  margin: 2rem 0;
  font-size: 2rem;
  color: #666;
}

body.admin-mode-active .add-photo-btn:hover {
  border-color: #4dabf7;
  background: #e7f5ff;
  color: #4dabf7;
}

/* Image delete button (only in admin mode) */
body.admin-mode-active .img-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

body.admin-mode-active .img-wrapper:hover .delete-img-btn {
  display: block !important;
}

body.admin-mode-active .delete-img-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: none;
  font-size: 18px;
  line-height: 1;
  z-index: 10;
  font-weight: bold;
}

body.admin-mode-active .delete-img-btn:hover {
  background: #dc3545;
}

/* Showcase image editable indicator */
body.admin-mode-active .showcase-image {
  position: relative;
}

body.admin-mode-active .showcase-image img {
  cursor: pointer;
  transition: all 0.3s;
}

body.admin-mode-active .showcase-image img:hover {
  outline: 3px solid #4dabf7;
  outline-offset: 3px;
}

body.admin-mode-active .showcase-image::after {
  content: "📷 Click to change image";
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 5;
}

body.admin-mode-active .showcase-image:hover::after {
  opacity: 1;
}

/* Save Indicator (only in admin mode) */
body.admin-mode-active .save-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #51cf66;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: none;
  z-index: 10001;
}

body.admin-mode-active .save-indicator.show {
  display: block;
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Upload Modal */
.upload-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10002;
  align-items: center;
  justify-content: center;
}

.upload-modal.active,
.upload-modal[style*="flex"] {
  display: flex !important;
}

.upload-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
}

.upload-modal-content input,
.upload-modal-content textarea {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.upload-modal-content button {
  padding: 0.75rem 1.5rem;
  margin: 0.5rem 0.5rem 0.5rem 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.upload-modal-content .btn-primary {
  background: #007bff;
  color: white;
}

.upload-modal-content .btn-primary:hover {
  background: #0056b3;
}

.upload-modal-content .btn-secondary {
  background: #6c757d;
  color: white;
}

.upload-modal-content .btn-secondary:hover {
  background: #545b62;
}

