@import "root.css";

body:not(.blog) {
  background: #f5f5dc;
}

body.blog #bottom {
  margin-top: 0;
}

/* Layout adjustment when mobile menu is open (index hero/sunrise) */
body.menu-open .sunrise-gradient {
  padding-top: 76px;
}

body.menu-open .hero {
  margin-top: 0;
}

/* Admin editing styles */
[data-editable="true"] {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-editing [data-editable="true"]:hover {
  outline: 2px solid rgba(255, 107, 53, 0.6);
  outline-offset: 4px;
  background: rgba(255, 107, 53, 0.05);
}

.edit-popover {
  position: fixed;
  background: #1a1a2e;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10003 !important;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.edit-popover.show {
  opacity: 1;
  transform: translateY(0);
}

.edit-popover::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1a1a2e;
}

.edit-popover .key-hint {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  font-family: monospace;
  font-size: 11px;
}

/* Editing mode banner */
.editing-mode-banner {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-primary);
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  z-index: 10002;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: none;
}

.admin-editing .editing-mode-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.editing-mode-banner-text {
  flex: 1;
}

.editing-mode-banner-exit {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.editing-mode-banner-exit:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Adjust body padding when banner is visible */
.admin-editing body {
  padding-top: 48px;
}

/* Temporary alert for no-edit permission */
.no-edit-alert {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #dc2626;
  color: white;
  padding: 20px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  z-index: 10003;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.no-edit-alert.show {
  opacity: 1;
}

body > #bottom {
  background: linear-gradient(to bottom, #bbd4ec, #baddff);
  border-top-right-radius: 150px;
  position: relative;
  margin-top: 100px;
}
