/**
 * Digital Jungle - Event Gallery Styles
 * Extends the main styles.css for gallery-specific components
 */

/* ===== Gallery Hero Section ===== */
.gallery-hero {
  background: #000;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
}

.gallery-hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* ===== Filter Tabs ===== */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #333;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  background-color: #1a1a1a;
  color: #999;
}

.filter-btn:hover {
  background-color: #2a2a2a;
  color: #fff;
}

.filter-btn.active {
  background-color: #caff08;
  color: #000;
  border-color: #caff08;
}

.filter-btn .count {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 9999px;
  background-color: rgba(0, 0, 0, 0.1);
}

/* Mobile: smaller filter buttons to fit on one line */
@media (max-width: 640px) {
  .filter-btn {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
  }

  .filter-btn .count {
    margin-left: 0.25rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
  }
}

/* ===== Gallery Grid ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Gallery Items ===== */
.gallery-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  ring: none !important;
  --tw-ring-shadow: none !important;
  --tw-ring-color: transparent !important;
}

.gallery-item img {
  border: 0 !important;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

.gallery-photo {
  aspect-ratio: 6 / 4;
}

.gallery-video {
  aspect-ratio: 16 / 9;
}

.gallery-audio {
  aspect-ratio: 1 / 1;
}

/* ===== Audio Player Styles ===== */
.audio-visualizer {
  pointer-events: none;
}

.audio-bar {
  width: 4px;
  height: 20px;
  background: rgba(202, 255, 8, 0.3);
  border-radius: 2px;
  transform-origin: bottom;
  transition: height 0.1s ease;
}

/* Idle state - subtle animation */
.audio-visualizer .audio-bar {
  animation: audioBarIdle 1.5s ease-in-out infinite;
}

@keyframes audioBarIdle {
  0%, 100% {
    height: 15px;
    opacity: 0.3;
  }
  50% {
    height: 25px;
    opacity: 0.5;
  }
}

/* Playing state - active sound wave animation */
.audio-visualizer.playing .audio-bar {
  background: #caff08;
  animation: audioBarPlaying 0.5s ease-in-out infinite;
}

@keyframes audioBarPlaying {
  0%, 100% {
    height: 20px;
  }
  25% {
    height: 60px;
  }
  50% {
    height: 35px;
  }
  75% {
    height: 80px;
  }
}

/* Stagger animation for each bar */
.audio-visualizer.playing .audio-bar:nth-child(1) { animation-delay: 0s; }
.audio-visualizer.playing .audio-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-visualizer.playing .audio-bar:nth-child(3) { animation-delay: 0.05s; }
.audio-visualizer.playing .audio-bar:nth-child(4) { animation-delay: 0.15s; }
.audio-visualizer.playing .audio-bar:nth-child(5) { animation-delay: 0.02s; }
.audio-visualizer.playing .audio-bar:nth-child(6) { animation-delay: 0.12s; }
.audio-visualizer.playing .audio-bar:nth-child(7) { animation-delay: 0.08s; }
.audio-visualizer.playing .audio-bar:nth-child(8) { animation-delay: 0.18s; }
.audio-visualizer.playing .audio-bar:nth-child(9) { animation-delay: 0.03s; }
.audio-visualizer.playing .audio-bar:nth-child(10) { animation-delay: 0.13s; }
.audio-visualizer.playing .audio-bar:nth-child(11) { animation-delay: 0.07s; }
.audio-visualizer.playing .audio-bar:nth-child(12) { animation-delay: 0.17s; }
.audio-visualizer.playing .audio-bar:nth-child(13) { animation-delay: 0.01s; }
.audio-visualizer.playing .audio-bar:nth-child(14) { animation-delay: 0.11s; }
.audio-visualizer.playing .audio-bar:nth-child(15) { animation-delay: 0.06s; }
.audio-visualizer.playing .audio-bar:nth-child(16) { animation-delay: 0.16s; }
.audio-visualizer.playing .audio-bar:nth-child(17) { animation-delay: 0.04s; }
.audio-visualizer.playing .audio-bar:nth-child(18) { animation-delay: 0.14s; }
.audio-visualizer.playing .audio-bar:nth-child(19) { animation-delay: 0.09s; }
.audio-visualizer.playing .audio-bar:nth-child(20) { animation-delay: 0.19s; }

.audio-play-btn {
  background: transparent;
  border: none;
  cursor: pointer;
}

.audio-progress {
  cursor: pointer;
}

.audio-element {
  display: none;
}

/* Audio iframe player */
.audio-iframe {
  border: none;
  transition: opacity 0.3s ease;
}

.gallery-audio.is-playing .audio-play-btn {
  background: rgba(0, 0, 0, 0.3);
}

.gallery-audio.is-playing .audio-play-btn > div {
  background: rgba(202, 255, 8, 0.9);
}

/* Audio loading spinner */
.audio-loading .animate-spin {
  animation: spin 1s linear infinite;
}

/* ===== Password Modal ===== */
.password-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.password-modal.hidden {
  display: none;
}

.password-modal-content {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.password-modal h2 {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.5rem;
  color: #0f5e20;
  margin-bottom: 1rem;
}

.password-modal p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.password-modal input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.password-modal input[type="password"]:focus {
  outline: none;
  border-color: #caff08;
}

.password-modal button[type="submit"] {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: #caff08;
  color: #0f5e20;
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.password-modal button[type="submit"]:hover {
  background-color: #0f5e20;
  color: white;
}

.password-modal .error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* ===== Lightbox ===== */
#gallery-lightbox {
  backdrop-filter: blur(4px);
}

#gallery-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

/* Mobile lightbox adjustments */
@media (max-width: 640px) {
  .lightbox-counter {
    left: 1rem !important;
    transform: none !important;
    bottom: 1rem !important;
  }

  .lightbox-actions {
    bottom: 1rem !important;
    right: 1rem !important;
  }
}

/* ===== Loading Animation ===== */
.gallery-loading {
  min-height: 300px;
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ===== Skeleton Loading ===== */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-card {
  aspect-ratio: 6 / 4;
  border-radius: 0.5rem;
}

.skeleton-filter {
  height: 38px;
  width: 80px;
  border-radius: 9999px;
}

/* Hide filters initially until loaded */
.gallery-filters:not(.loaded) {
  display: none;
}

.gallery-filters {
  transition: opacity 0.3s ease;
}

.gallery-filters.loaded {
  opacity: 1;
}

/* Lightbox skeleton */
.lightbox-skeleton {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 4/3;
  border-radius: 0.5rem;
}

/* ===== Events Listing Grid ===== */
.events-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
}

@media (min-width: 640px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.event-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.event-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.event-card:hover .event-card-image img {
  transform: scale(1.05);
}

.event-card-content {
  padding: 1.5rem;
}

.event-card-title {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.25rem;
  color: #0f5e20;
  margin-bottom: 0.5rem;
}

.event-card-date {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.event-card-client {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #f3f4f6;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #374151;
}

/* ===== Back to Events Link ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #caff08;
  font-weight: 500;
  transition: color 0.2s ease;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: white;
}

/* ===== Client Portal Header ===== */
.client-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.client-logo {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 1rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ===== Download All Button ===== */
.download-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #0f5e20;
  color: white;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.download-all-btn:hover {
  background-color: #caff08;
  color: #0f5e20;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.empty-state svg {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  color: #d1d5db;
}

/* ===== Video Thumbnail Overlay ===== */
.video-thumbnail-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease;
}

.video-thumbnail-overlay:hover {
  background: rgba(0, 0, 0, 0.6);
}

.video-play-icon {
  width: 4rem;
  height: 4rem;
  background: #caff08;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  box-shadow: inset 0 0 0 4px #0f5e20;
}

.video-thumbnail-overlay:hover .video-play-icon {
  transform: scale(1.1);
}

/* ===== Event Page Footer Logo Override ===== */
/* Reduce footer logo to 50% size for event pages */
.bottom-logo-glitch-wrapper {
  width: 180px;
}

.bottom-logo-glitch {
  width: 180px;
}

.bottom-logo-glitch-wrapper::before,
.bottom-logo-glitch-wrapper::after {
  width: 180px;
}

/* ===== Organizer/Partner Logo Sizes ===== */
/* 50% larger than original (h-12/h-16 -> h-18/h-24) */
.organizer-logo {
  height: 72px; /* Base: 72px (was 48px) */
}

.partner-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .organizer-logo {
    height: 96px; /* MD: 96px (was 64px) */
  }

  .partner-logo {
    width: 160px;
    height: 160px;
  }
}

/* ===== Share Buttons ===== */
.share-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.share-buttons {
  display: inline-flex;
  gap: 0.5rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.share-btn:hover {
  background-color: #caff08;
  color: #0f5e20;
  transform: scale(1.1);
}

/* Small share buttons for hero section */
.share-btn.share-btn-sm {
  width: 24px;
  height: 24px;
  padding: 0;
}

.copy-feedback {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #caff08;
  color: #0f5e20;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 0.5rem;
  animation: fadeIn 0.2s ease;
}

.copy-feedback.hidden {
  display: none;
}

/* ===== Share Dropdown Menu ===== */
.share-dropdown {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.2s ease;
}

.share-dropdown button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #374151;
  transition: all 0.2s ease;
}

.share-dropdown button:hover {
  background-color: #caff08;
  color: #0f5e20;
}

/* ===== Share Toast Notification ===== */
.share-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.75rem 1.5rem;
  background-color: #0f5e20;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Lightbox Share Menu ===== */
.lightbox-share-menu {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-share-menu button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #374151;
  transition: all 0.2s ease;
}

.lightbox-share-menu button:hover {
  background-color: #caff08;
  color: #0f5e20;
}

.lightbox-actions {
  position: relative;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Mobile Responsive Share ===== */
@media (max-width: 640px) {
  .share-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-btn {
    width: 32px;
    height: 32px;
  }

  .share-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* ===== Video Title Overlay ===== */
.video-title-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
  padding: 0.75rem;
  z-index: 10;
}

.video-title {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  display: block;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ===== Pagination ===== */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  padding: 1.5rem 0;
}

.pagination-container.hidden {
  display: none;
}

.pagination-link {
  color: #caff08;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pagination-link:hover {
  color: #fff;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-num {
  min-width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  background-color: #1a1a1a;
  color: #999;
  font-weight: 500;
  border: 2px solid #333;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-num:hover {
  border-color: #caff08;
  color: #caff08;
}

.page-num.active {
  background-color: #caff08;
  border-color: #caff08;
  color: #000;
  font-weight: 600;
}

.page-ellipsis {
  color: #6b7280;
  padding: 0 0.25rem;
}

/* ===== Mobile Responsive Pagination ===== */
@media (max-width: 640px) {
  .pagination-container {
    gap: 0.75rem;
  }

  .page-num {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }
}

/* ===== Slideshow Mode — Animated Mosaic with Roving Hero ===== */
#slideshow-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  overflow: hidden;
}

.mosaic-container {
  position: relative;
  width: 100vw;
  height: 100vh;
}

/* Tiles: absolutely positioned, animated via CSS transitions */
.mosaic-tile {
  position: absolute;
  overflow: hidden;
  border-radius: 4px;
  background: #111;
  transition:
    left 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    top 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    width 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    height 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: left, top, width, height;
}

.mosaic-tile.mosaic-is-hero {
  border-radius: 6px;
  z-index: 2;
}

/* Image layers for crossfade */
.mosaic-img-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.mosaic-img-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.mosaic-next {
  z-index: 2;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}

.mosaic-swapping .mosaic-next {
  opacity: 1;
}

/* Ken Burns — slow zoom/pan variations */
.kenburns-tl .mosaic-current img { animation: kb-tl 22s ease-in-out infinite alternate; }
.kenburns-tr .mosaic-current img { animation: kb-tr 22s ease-in-out infinite alternate; }
.kenburns-bl .mosaic-current img { animation: kb-bl 22s ease-in-out infinite alternate; }
.kenburns-br .mosaic-current img { animation: kb-br 22s ease-in-out infinite alternate; }
.kenburns-center .mosaic-current img { animation: kb-center 22s ease-in-out infinite alternate; }

@keyframes kb-tl {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.12) translate(-2%, -2%); }
}
@keyframes kb-tr {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.12) translate(2%, -2%); }
}
@keyframes kb-bl {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.12) translate(-2%, 2%); }
}
@keyframes kb-br {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.12) translate(2%, 2%); }
}
@keyframes kb-center {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

/* Hero glow — conditional via class */
.mosaic-tile-glow {
  position: absolute;
  inset: -2px;
  border-radius: 8px;
  border: 2px solid transparent;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 1s ease;
}

.mosaic-is-hero .mosaic-tile-glow {
  opacity: 1;
  border-color: rgba(202, 255, 8, 0.3);
  animation: hero-glow 4s ease-in-out infinite;
}

@keyframes hero-glow {
  0%, 100% { border-color: rgba(202, 255, 8, 0.15); box-shadow: 0 0 20px rgba(202, 255, 8, 0.05); }
  50%      { border-color: rgba(202, 255, 8, 0.4); box-shadow: 0 0 40px rgba(202, 255, 8, 0.15); }
}

/* Vignette overlay for depth */
.mosaic-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.5) 100%);
}

/* Special branding tile */
.mosaic-special {
  background: #000;
}

.mosaic-special-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8%;
}

.mosaic-brand-tile {
  justify-content: space-between;
}

.mosaic-brand-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.mosaic-brand-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 2;
  min-height: 0;
}

.mosaic-logo-img {
  width: 75%;
  height: auto;
  max-height: 50%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.mosaic-brand-name {
  color: #fff;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.mosaic-brand-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  margin-top: 4px;
  text-align: center;
  letter-spacing: 0.05em;
}

.mosaic-qr-img {
  flex: 1;
  min-height: 0;
  width: 90%;
  object-fit: contain;
  border-radius: 4px;
}

.mosaic-qr-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.03em;
}

/* Waiting state */
.mosaic-waiting {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2rem;
  font-family: 'Pixelify Sans', sans-serif;
}

/* ===== Share Preview (LinkedIn Post Mockup) ===== */
#share-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.sp-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.sp-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  color: white;
  opacity: 0.7;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}
.sp-close:hover { opacity: 1; }

.sp-linkedin-card {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.sp-card-header {
  display: flex;
  align-items: center;
  padding: 1rem 1rem 0.5rem;
  gap: 0.75rem;
}

.sp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.sp-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.sp-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sp-user-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #191919;
}

.sp-user-sub {
  font-size: 0.75rem;
  color: #666;
}

.sp-linkedin-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.sp-caption-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: white;
  cursor: text;
  min-height: 3em;
  position: relative;
}
.sp-caption-wrap:focus-within {
  border-color: #0077B5;
}
.sp-caption-static {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #191919;
  white-space: pre-wrap;
}
.sp-caption-static:empty::before {
  content: 'Click to edit your post...';
  color: #9ca3af;
}
/* Quill overrides inside share preview */
.sp-caption-wrap .ql-toolbar {
  border: none;
  border-bottom: 1px solid #e5e7eb;
  padding: 4px 8px;
}
.sp-caption-wrap .ql-container {
  border: none;
  font-size: 0.9rem;
  font-family: inherit;
}
.sp-caption-wrap .ql-editor {
  padding: 0.5rem 1rem;
  min-height: 2.5em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #191919 !important;
}
.sp-caption-wrap .ql-editor.ql-blank::before {
  color: #9ca3af;
  font-style: normal;
}
.sp-caption-static {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.sp-linkedin-card {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Mention chips below editor */
.sp-mention-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0.5rem 1rem 0.75rem;
  border-top: 1px solid #f3f4f6;
}
.sp-linkedin-card .sp-mention-chip {
  font-size: 0.65rem !important;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 400 !important;
}
.sp-mention-chip:hover {
  background: #caff0850;
  color: #0f5e20;
}

/* Mention autocomplete dropdown */
.mention-opt {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
}

.mention-opt:hover,
.mention-opt-active {
  background: #f3f4f6;
}

.sp-image-wrap {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
}

.sp-image {
  width: 100%;
  height: auto;
  display: block;
}

.sp-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
}

.sp-actions .sp-publish-btn,
.sp-actions .sp-connect-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 2rem;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.sp-publish-btn {
  background: #0077B5;
  color: white;
}
.sp-publish-btn:hover { background: #005f8f; }
.sp-publish-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.sp-connect-btn {
  background: #0077B5;
  color: white;
}
.sp-connect-btn:hover { background: #005f8f; }

.sp-actions .sp-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  border: 2px solid #e5e7eb;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.sp-download-btn:hover {
  border-color: #0f5e20;
  color: #0f5e20;
}

.sp-actions .sp-print-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  border: 2px solid #0f5e20;
  background: #0f5e20;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.sp-print-btn:hover {
  background: #0a4a18;
  border-color: #0a4a18;
}
.sp-print-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
