/* Staging photos — shared styles (advisor + seller portal) */

.ss-photo-camera-btn {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.ss-photo-camera-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ss-photo-count-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #8b1a2f;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 9px;
  font-weight: 600;
  line-height: 14px;
  text-align: center;
}

.ss-photo-panel {
  background: #fff;
  border-top: 2px solid #8b1a2f;
  padding: 10px 12px 12px;
}

.ss-photo-panel-title {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
}

.ss-photo-panel.is-dragover {
  outline: 2px dashed #8b1a2f;
  outline-offset: -4px;
  background: #fafafa;
}

.ss-photo-drop-hint {
  display: none;
  margin: 0 0 8px;
  font-size: 11px;
  color: #8b1a2f;
  font-style: italic;
  text-align: center;
}

.ss-photo-panel.is-dragover .ss-photo-drop-hint {
  display: block;
}

.ss-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ss-photo-thumb-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ss-photo-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
  border: none;
  padding: 0;
}

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

.ss-photo-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ss-photo-thumb:hover .ss-photo-thumb-overlay,
.ss-photo-thumb:focus-visible .ss-photo-thumb-overlay {
  opacity: 1;
}

.ss-photo-thumb-action {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: #1a1a1a;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ss-photo-thumb-action.ss-photo-delete {
  color: #b71c1c;
}

.ss-photo-caption {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  background: transparent;
  font-size: 10px;
  font-style: italic;
  color: #666;
  padding: 2px 0;
  outline: none;
}

.ss-photo-caption::placeholder {
  color: #aaa;
}

.ss-photo-caption-display {
  margin: 0;
  font-size: 10px;
  font-style: italic;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-photo-uploading {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ss-photo-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-top-color: #8b1a2f;
  border-radius: 50%;
  animation: ss-photo-spin 0.7s linear infinite;
}

@keyframes ss-photo-spin {
  to {
    transform: rotate(360deg);
  }
}

.ss-photo-upload-error {
  font-size: 9px;
  color: #b71c1c;
  margin: 0;
}

.ss-photo-add-btn {
  margin-top: 8px;
  font-size: 11px;
  padding: 4px 10px;
}

.ss-photo-limit-msg {
  margin: 8px 0 0;
  font-size: 11px;
  color: #b71c1c;
}

.ss-photo-hidden-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Lightbox */
.ss-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(26, 26, 26, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.ss-lightbox[hidden] {
  display: none !important;
}

.ss-lightbox-toolbar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.ss-lightbox-toolbar .btn {
  font-size: 12px;
  padding: 6px 12px;
}

.ss-lightbox-toolbar .btn-danger {
  background: #b71c1c;
  color: #fff;
  border: none;
}

.ss-lightbox-meta {
  margin: 0 0 0.5rem;
  font-size: 13px;
  color: #999;
  text-align: center;
}

.ss-lightbox-img {
  max-width: 90vw;
  max-height: 70vh;
  object-fit: contain;
}

.ss-lightbox-caption {
  margin: 0.75rem 0 0;
  max-width: 90vw;
  font-size: 14px;
  font-style: italic;
  color: #fff;
  text-align: center;
}

.ss-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

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

.ss-lightbox-prev {
  left: 1rem;
}

.ss-lightbox-next {
  right: 1rem;
}

/* Portal modal staging photos */
.portal-staging-photos-section {
  margin-bottom: 1.25rem;
}

.portal-staging-photos-section h4 {
  margin: 0 0 0.5rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
}

.portal-staging-photos-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ev-gray, #666);
  font-style: italic;
}
