/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/*
 * Lexxy list styles - restore list styling that Tailwind's reset removes
 * This ensures bullets and numbers appear in rich text content
 */
.lexxy-content ul,
lexxy-editor ul {
  list-style-type: disc;
  padding-left: 1.5em;
}

.lexxy-content ol,
lexxy-editor ol {
  list-style-type: decimal;
  padding-left: 1.5em;
}

.lexxy-content ul ul,
lexxy-editor ul ul {
  list-style-type: circle;
}

.lexxy-content ul ul ul,
lexxy-editor ul ul ul {
  list-style-type: square;
}

.lexxy-content ol ol,
lexxy-editor ol ol {
  list-style-type: lower-alpha;
}

.lexxy-content ol ol ol,
lexxy-editor ol ol ol {
  list-style-type: lower-roman;
}

/*
 * Photo Grid - iOS-style 3-column layout
 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.photo-grid-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.photo-grid-item:hover img {
  transform: scale(1.05);
}

.photo-grid-item:hover .photo-grid-delete {
  opacity: 1;
}

.photo-grid-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(239, 68, 68, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
  z-index: 10;
}

.photo-grid-delete:hover {
  background: rgba(220, 38, 38, 1);
}

.photo-grid-delete svg {
  width: 14px;
  height: 14px;
  color: white;
}

/*
 * Photo Viewer - Full-screen overlay
 */
.photo-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 100;
  flex-direction: column;
}

.photo-viewer-overlay:not(.hidden) {
  display: flex;
}

.photo-viewer-overlay.hidden {
  display: none;
}

.photo-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  color: white;
}

.photo-viewer-counter {
  font-size: 14px;
  font-weight: 500;
}

.photo-viewer-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.photo-viewer-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.photo-viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.photo-viewer-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.photo-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.photo-viewer-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.photo-viewer-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.photo-viewer-prev {
  left: 16px;
}

.photo-viewer-next {
  right: 16px;
}

/* Hide nav buttons on mobile (use swipe instead) */
@media (max-width: 768px) {
  .photo-viewer-nav {
    display: none;
  }
}
