/* ─── IMA Experience: Estilos de Alta Performance (Ultra Rápido) ─── */

:root {
  --ima-gold: #D4A843;
  --ima-gold-light: #E8C36A;
  --ima-gold-glow: rgba(212, 168, 67, 0.25);
  --ima-dark-bg: rgba(8, 8, 8, 0.97);
}

/* Otimização Global de Renderização */
.album-gallery a img,
.album-gallery img {
  content-visibility: auto;
  contain-intrinsic-size: 200px 150px;
  will-change: transform;
  transform: translateZ(0);
}

/* ─── 1. Mini-Player de Música Ambiente Flutuante ─── */
.ima-player-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #141414;
  border: 1px solid rgba(212, 168, 67, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  transition: transform 0.2s ease, border-color 0.2s ease;
  max-width: 92vw;
  transform: translateZ(0);
}

.ima-player-widget:hover {
  border-color: var(--ima-gold);
  transform: translateY(-2px);
}

.ima-player-btn-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ima-gold);
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.ima-player-btn-play:hover {
  transform: scale(1.08);
  background: var(--ima-gold-light);
}

.ima-player-info {
  display: flex;
  flex-direction: column;
  min-width: 120px;
  max-width: 200px;
}

.ima-player-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ima-gold);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ima-player-title {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f0f0f0;
}

/* Sound Waves Animation */
.ima-sound-waves {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.ima-sound-wave-bar {
  width: 2px;
  height: 3px;
  background: var(--ima-gold);
  border-radius: 1px;
}

.ima-sound-waves.playing .ima-sound-wave-bar:nth-child(1) { animation: imaWave 0.8s ease-in-out infinite; }
.ima-sound-waves.playing .ima-sound-wave-bar:nth-child(2) { animation: imaWave 1.1s ease-in-out infinite 0.2s; }
.ima-sound-waves.playing .ima-sound-wave-bar:nth-child(3) { animation: imaWave 0.7s ease-in-out infinite 0.4s; }
.ima-sound-waves.playing .ima-sound-wave-bar:nth-child(4) { animation: imaWave 0.9s ease-in-out infinite 0.1s; }

@keyframes imaWave {
  0%, 100% { height: 2px; }
  50% { height: 10px; }
}

.ima-player-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ima-player-volume-slider {
  width: 50px;
  height: 4px;
  -webkit-appearance: none;
  background: #333;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.ima-player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ima-gold);
  cursor: pointer;
}

.ima-player-minimize {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 2px;
  font-size: 13px;
  transition: color 0.15s;
}

.ima-player-minimize:hover {
  color: #fff;
}

.ima-player-minimize.active {
  color: #FCE192;
}

.ima-player-widget.minimized .ima-player-info,
.ima-player-widget.minimized .ima-player-volume-wrap {
  display: none;
}

.ima-player-widget.minimized {
  padding: 6px 10px;
}

/* ─── 2. Visualizador Lightbox de Fotos em Tela Cheia ─── */
.ima-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--ima-dark-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 14px;
  box-sizing: border-box;
}

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

.ima-lightbox-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: #fff;
}

.ima-lightbox-counter {
  font-size: 13px;
  color: var(--ima-gold);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.ima-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ima-lightbox-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.15s;
}

.ima-lightbox-btn:hover {
  background: var(--ima-gold);
  color: #000;
  border-color: var(--ima-gold);
  transform: translateY(-1px);
}

.ima-lightbox-btn-whatsapp {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}

.ima-lightbox-btn-whatsapp:hover {
  background: #20BA5A;
  color: #fff;
  border-color: #20BA5A;
}

.ima-lightbox-btn-facebook {
  background: #1877F2;
  color: #fff;
  border-color: #1877F2;
}
.ima-lightbox-btn-facebook:hover {
  background: #145DBF;
  color: #fff;
  border-color: #145DBF;
}

.ima-lightbox-btn-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  border-color: #cc2366;
}
.ima-lightbox-btn-instagram:hover {
  filter: brightness(1.15);
  color: #fff;
  border-color: #bc1888;
}

.ima-lightbox-btn-copy {
  background: rgba(212, 168, 67, 0.25);
  border-color: rgba(212, 168, 67, 0.6);
  color: #FCE192;
}
.ima-lightbox-btn-copy:hover {
  background: var(--ima-gold);
  color: #000;
}

.ima-lightbox-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.ima-lightbox-close:hover {
  background: #e05545;
}

.ima-lightbox-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  overflow: hidden;
}

.ima-lightbox-img {
  max-width: 95vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9);
  user-select: none;
  will-change: transform;
}

.ima-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(212, 168, 67, 0.4);
  color: var(--ima-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  z-index: 10;
}

.ima-lightbox-arrow:hover {
  background: var(--ima-gold);
  color: #000;
  transform: translateY(-50%) scale(1.1);
}

.ima-lightbox-arrow.prev { left: 12px; }
.ima-lightbox-arrow.next { right: 12px; }

.ima-lightbox-caption {
  text-align: center;
  color: #FCE192;
  font-size: 14px;
  padding: 10px 18px;
  max-width: 800px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 67, 0.35);
  margin-top: 12px;
  line-height: 1.5;
  display: none; /* só aparece quando há legenda real */
}

/* ─── 3. Barra de Busca e Filtros Instantâneos ─── */
.ima-search-container {
  max-width: 550px;
  margin: 15px auto 25px auto;
  padding: 0 15px;
}

.ima-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.ima-search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: #181818;
  border: 1.5px solid rgba(212, 168, 67, 0.35);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.ima-search-input:focus {
  border-color: var(--ima-gold);
  box-shadow: 0 0 14px var(--ima-gold-glow);
  background: #202020;
}

.ima-search-input::placeholder {
  color: #777;
}

.ima-search-icon {
  position: absolute;
  left: 14px;
  color: var(--ima-gold);
  font-size: 14px;
  pointer-events: none;
}

.ima-search-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #777;
  font-size: 14px;
  cursor: pointer;
  display: none;
}

.ima-search-clear:hover {
  color: #fff;
}

.ima-no-results {
  text-align: center;
  padding: 30px 15px;
  color: #888;
  font-size: 15px;
  display: none;
}

/* ─── Barra Social Flutuante ─── */
.ima-social-bar {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9990;
}

.ima-social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.ima-social-btn:hover {
  transform: scale(1.12);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.ima-social-fb { background: #1877F2; }
.ima-social-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.ima-social-yt { background: #FF0000; }
.ima-social-wa { background: #25D366; }
.ima-social-copy { background: #3a3a42; border: 1px solid rgba(212, 168, 67, 0.45); color: #FCE192; }

.ima-share-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(10, 10, 14, 0.95);
  color: #FCE192;
  border: 1px solid rgba(212, 168, 67, 0.5);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

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

@media (max-width: 768px) {
  .ima-player-widget {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    justify-content: space-between;
  }
  .ima-player-volume-wrap {
    display: none;
  }
  .ima-lightbox-actions .ima-lightbox-btn span {
    display: none;
  }
  .ima-lightbox-arrow {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .ima-social-bar {
    left: 8px;
    gap: 6px;
  }
  .ima-social-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}
