/* ==========================================================================
   CARROSSEL DE REDES SOCIAIS: DIAL COM PROFUNDIDADE 3D — YK CLOSET
   Arquivo: styles/social-carousel.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CONTAINER DO CARROSSEL SOCIAL (FAIXA HORIZONTAL NA TELA PRINCIPAL)
   -------------------------------------------------------------------------- */
.social-dial {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: clamp(66px, 11vh, 88px);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  perspective: 750px; /* Profundidade 3D visual sutil estilo cadeado */
  perspective-origin: center center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y pinch-zoom;
  margin-bottom: clamp(12px, 2vh, 20px);
}

/* Trilho interno deslizante */
.dial-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: pan-y;
}

.dial-track.is-dragging {
  cursor: grabbing;
}

/* --------------------------------------------------------------------------
   2. BOTÃO DE ÍCONE INDIVIDUAL
   -------------------------------------------------------------------------- */
.dial-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--dial-size, 52px);
  height: var(--dial-size, 52px);
  margin-top: calc(var(--dial-size, 52px) / -2);
  margin-left: calc(var(--dial-size, 52px) / -2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(223, 183, 108, 0.45);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 4px 16px rgba(24, 24, 27, 0.06), 0 1px 3px rgba(24, 24, 27, 0.04);
  color: #52525b;
  cursor: pointer;
  transform-origin: center center;
  will-change: transform, opacity, box-shadow;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(223, 183, 108, 0.3);
  outline: none;
  
  /* Transição sincronizada entre posições (720ms curva suave) */
  transition: transform 0.72s cubic-bezier(0.25, 1, 0.35, 1),
              opacity 0.72s ease,
              box-shadow 0.72s ease,
              border-color 0.72s ease,
              background-color 0.72s ease,
              color 0.72s ease;
}

/* Área de toque expandida para facilitar clique/toque em celulares */
.dial-item::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  pointer-events: auto;
}

.dial-item:active {
  transform: translate3d(var(--tx, 0), 0, var(--tz, 0)) scale(0.94);
}

/* Ícone SVG interno */
.dial-icon {
  width: clamp(22px, 3.4vh, 26px);
  height: clamp(22px, 3.4vh, 26px);
  transition: transform 0.35s ease, filter 0.35s ease, color 0.35s ease;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   3. POSICIONAMENTOS ESTÁTICOS INICIAIS (FALLBACK ANTES DO JS)
   -------------------------------------------------------------------------- */
.dial-track:not(.js-initialized) .dial-item[data-slot="0"] {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  z-index: 20;
}

.dial-track:not(.js-initialized) .dial-item[data-slot="-1"] {
  transform: translate3d(calc(-1 * var(--dial-spacing, 64px)), 0, -32px) scale(0.72);
  opacity: 0.70;
  z-index: 16;
}

.dial-track:not(.js-initialized) .dial-item[data-slot="1"] {
  transform: translate3d(calc(1 * var(--dial-spacing, 64px)), 0, -32px) scale(0.72);
  opacity: 0.70;
  z-index: 16;
}

.dial-track:not(.js-initialized) .dial-item[data-slot="-2"] {
  transform: translate3d(calc(-2 * var(--dial-spacing, 64px)), 0, -75px) scale(0.50);
  opacity: 0.32;
  z-index: 12;
}

.dial-track:not(.js-initialized) .dial-item[data-slot="2"] {
  transform: translate3d(calc(2 * var(--dial-spacing, 64px)), 0, -75px) scale(0.50);
  opacity: 0.32;
  z-index: 12;
}

/* --------------------------------------------------------------------------
   4. ÍCONE CENTRAL DESTACADO E BRILHO PERSONALIZADO POR REDE
   -------------------------------------------------------------------------- */
.dial-item.is-center {
  background: #ffffff;
  color: #18181b;
  pointer-events: auto;
}

.dial-item.is-center .dial-icon {
  transform: scale(1.08);
}

/* 1. WhatsApp */
.dial-item--whatsapp.is-center {
  border-color: #25d366;
  box-shadow: 0 0 24px rgba(37, 211, 102, 0.38),
              0 4px 16px rgba(24, 24, 27, 0.08),
              inset 0 0 10px rgba(37, 211, 102, 0.12);
  color: #16a34a;
}

.dial-item--whatsapp.is-center .dial-icon {
  filter: drop-shadow(0 0 5px rgba(37, 211, 102, 0.5));
}

/* 2. Instagram */
.dial-item--instagram.is-center {
  border-color: #e1306c;
  box-shadow: 0 0 24px rgba(225, 48, 108, 0.38),
              0 4px 16px rgba(24, 24, 27, 0.08),
              inset 0 0 10px rgba(225, 48, 108, 0.12);
  color: #e1306c;
}

.dial-item--instagram.is-center .dial-icon {
  filter: drop-shadow(0 0 5px rgba(225, 48, 108, 0.5));
}

/* Hover nos itens do dial */
.dial-item:hover {
  border-color: var(--accent-gold, #c59b4e);
}

.dial-item--whatsapp:hover {
  color: #16a34a;
}

.dial-item--instagram:hover {
  color: #e1306c;
}

/* --------------------------------------------------------------------------
   5. AJUSTES RESPONSIVOS
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .social-dial {
    margin-bottom: 12px;
  }
}

@media (max-height: 640px) {
  .social-dial {
    margin-bottom: 8px;
    height: 64px;
  }
}

/* --------------------------------------------------------------------------
   6. TEMA DARK (TREVO STORE)
   -------------------------------------------------------------------------- */
body:not(.theme-light) .dial-item {
  background: rgba(22, 22, 29, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
  color: #a1a1aa;
}

body:not(.theme-light) .dial-item.is-center {
  background: #181822;
  color: #ffffff;
}

body:not(.theme-light) .dial-item--whatsapp.is-center {
  border-color: #25d366;
  box-shadow: 0 0 24px rgba(37, 211, 102, 0.42),
              0 4px 16px rgba(0, 0, 0, 0.6),
              inset 0 0 10px rgba(37, 211, 102, 0.18);
  color: #22c55e;
}

body:not(.theme-light) .dial-item--whatsapp.is-center .dial-icon {
  filter: drop-shadow(0 0 6px rgba(37, 211, 102, 0.6));
}

body:not(.theme-light) .dial-item--instagram.is-center {
  border-color: #e1306c;
  box-shadow: 0 0 24px rgba(225, 48, 108, 0.42),
              0 4px 16px rgba(0, 0, 0, 0.6),
              inset 0 0 10px rgba(225, 48, 108, 0.18);
  color: #e1306c;
}

body:not(.theme-light) .dial-item--instagram.is-center .dial-icon {
  filter: drop-shadow(0 0 6px rgba(225, 48, 108, 0.6));
}

body:not(.theme-light) .dial-item:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

body:not(.theme-light) .dial-item--whatsapp:hover {
  color: #22c55e;
  border-color: #25d366;
}

body:not(.theme-light) .dial-item--instagram:hover {
  color: #e1306c;
  border-color: #e1306c;
}

