/* Photo Gallery Styles for PropPilot */

/* Property Placeholder Styling */
.property-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #F5F5F5;
}

/* Gallery Grid in Property Cards */
.property-image.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  padding: 0;
  width: 200px;
  min-height: 160px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.property-image.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-image.gallery-grid .photo-more {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(13, 92, 99, 0.9);
  color: #e5e5e5;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

/* Photo Lightbox Modal */
.photo-lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.photo-lightbox-overlay.show {
  display: flex;
}

.photo-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.photo-lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  color: #e5e5e5;
}

.photo-lightbox-counter {
  font-size: 14px;
  color: #a8a8a8;
}

.photo-lightbox-close {
  background: transparent;
  border: none;
  color: #e5e5e5;
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-lightbox-close:hover {
  color: var(--color-orange-primary);
}

.photo-lightbox-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.photo-lightbox-main img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.photo-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(13, 92, 99, 0.8);
  border: none;
  color: #e5e5e5;
  font-size: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.photo-nav-btn:hover {
  background: #117a84;
}

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

.photo-nav-prev {
  left: 20px;
}

.photo-nav-next {
  right: 20px;
}

.photo-lightbox-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  justify-content: center;
}

.photo-thumb {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.2s;
}

.photo-thumb:hover, .photo-thumb.active {
  opacity: 1;
  border-color: var(--color-orange-primary);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .property-image.gallery-grid {
    width: 100%;
    min-height: 200px;
  }

  .photo-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .photo-nav-prev {
    left: 10px;
  }

  .photo-nav-next {
    right: 10px;
  }

  .photo-lightbox-thumbs {
    padding: 8px;
  }

  .photo-thumb {
    width: 50px;
    height: 50px;
  }
}

/* Photo Source Badges */
.photo-badge {
  display: inline-block;
  background: rgba(13, 92, 99, 0.9);
  color: #e5e5e5;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  white-space: nowrap;
}

.property-image .photo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  pointer-events: none;
  z-index: 10;
}

.property-image.gallery-grid .photo-badge.google-badge {
  top: 8px;
  left: 8px;
}

.photo-lightbox-counter .photo-badge {
  margin-left: 8px;
  background: rgba(245, 166, 35, 0.9);
  color: var(--color-text-inverse);
}
