
/* Photo shortcode styles */
.photo-wrapper {
  margin: 1rem 0;
  clear: both;
}

.photo-wrapper.photo-left {
  float: left;
  margin: 0 1.5rem 1rem 0;
  clear: left;
}

.photo-wrapper.photo-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
  clear: right;
}

.photo-wrapper.photo-center {
  text-align: center;
  margin: 2rem auto;
  clear: both;
}

.photo-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-color, #fff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.photo-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 2rem 1rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
  border-radius: 0 0 8px 8px;
  backdrop-filter: blur(4px);
}

/* Lightbox styles */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-container {
  transform: scale(1);
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-caption {
  position: absolute;
  bottom: -3rem;
  left: 0;
  right: 0;
  color: white;
  text-align: center;
  font-size: 1rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
  backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  backdrop-filter: blur(4px);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-counter {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  backdrop-filter: blur(4px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .photo-wrapper.photo-left,
  .photo-wrapper.photo-right {
    float: none;
    margin: 1rem auto;
    text-align: center;
  }

  .lightbox-nav {
    font-size: 1.5rem;
    padding: 0.5rem;
  }

  .lightbox-prev {
    left: 1rem;
  }

  .lightbox-next {
    right: 1rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .photo-container {
    background: var(--bg-color, #1a1a1a);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .photo-container:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
}
