/* ═══════════════════════════════════════════════════════════════════
   social-grid.css  —  Social Media Quick-Select Grid
   ═══════════════════════════════════════════════════════════════════ */

/* ── Font Awesome 6 is included via CDN in header.twig – no duplicate needed ── */

/* ── Wrapper ─────────────────────────────────────────────────────── */
.sgrid-wrapper {
  width: 100%;
  margin: 0 0 24px;
  padding: 14px 0 8px;
}

/* ── Grid container ──────────────────────────────────────────────── */
.sgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ── Single button ───────────────────────────────────────────────── */
.sgrid-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-align: left;
  overflow: hidden;
  transition:
    transform .22s cubic-bezier(.34,1.56,.64,1),
    box-shadow .22s ease,
    filter .22s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* RTL support */
[dir="rtl"] .sgrid-btn {
  text-align: right;
  flex-direction: row-reverse;
}

/* Shimmer overlay */
.sgrid-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255,255,255,.08) 50%,
    transparent 70%);
  transform: translateX(-100%);
  transition: transform .5s ease;
}

/* Hover state */
.sgrid-btn:hover {
  transform: translateY(-5px) scale(1.02);
}
.sgrid-btn:hover::before {
  transform: translateX(100%);
}

/* Active / clicked state */
.sgrid-btn:active {
  transform: translateY(-2px) scale(.99);
}

/* Selected state (after click, while loading) */
.sgrid-btn.sgrid-active {
  ring: 2px solid rgba(255,255,255,.6);
  outline: 2px solid rgba(255,255,255,.5);
}

/* Icon wrapper */
.sgrid-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0,0,0,.30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  backdrop-filter: blur(4px);
  overflow: hidden;
}

/* SVG brand logo sizing */
.sgrid-svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

/* Instagram icon gets a real gradient background */
.sgrid-icon-insta {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

/* Label */
.sgrid-label {
  flex: 1;
  line-height: 1.2;
  font-size: 13px;
}

/* ── Platform gradients & glows ─────────────────────────────────── */

/* TikTok */
.sgrid-tiktok {
  background: linear-gradient(135deg, #010101 0%, #1a1a2e 40%, #16213e 100%);
  box-shadow: 0 4px 18px rgba(0,242,234,.25);
  border: 1px solid rgba(0,242,234,.2);
}
.sgrid-tiktok:hover {
  box-shadow: 0 8px 30px rgba(0,242,234,.5), 0 4px 15px rgba(255,0,80,.3);
}
.sgrid-tiktok .sgrid-icon { color: #00f2ea; }

/* Facebook */
.sgrid-facebook {
  background: linear-gradient(135deg, #0d2137 0%, #1a3a5c 100%);
  box-shadow: 0 4px 18px rgba(24,119,242,.3);
  border: 1px solid rgba(24,119,242,.25);
}
.sgrid-facebook:hover {
  box-shadow: 0 8px 30px rgba(24,119,242,.6);
}
.sgrid-facebook .sgrid-icon { color: #4a9ff5; }

/* All Services */
.sgrid-all {
  background: linear-gradient(135deg, #2a1500 0%, #4a2800 50%, #2a1500 100%);
  box-shadow: 0 4px 18px rgba(255,165,0,.25);
  border: 1px solid rgba(255,165,0,.2);
}
.sgrid-all:hover {
  box-shadow: 0 8px 30px rgba(255,165,0,.55);
}
.sgrid-all .sgrid-icon { color: #ffa500; }

/* Telegram */
.sgrid-telegram {
  background: linear-gradient(135deg, #0a1628 0%, #0f2d4d 100%);
  box-shadow: 0 4px 18px rgba(44,165,224,.28);
  border: 1px solid rgba(44,165,224,.22);
}
.sgrid-telegram:hover {
  box-shadow: 0 8px 30px rgba(44,165,224,.58);
}
.sgrid-telegram .sgrid-icon { color: #2ca5e0; }

/* Instagram */
.sgrid-instagram {
  background: linear-gradient(135deg, #1a0633 0%, #3a0a1e 50%, #2d1500 100%);
  box-shadow: 0 4px 18px rgba(193,53,132,.3);
  border: 1px solid rgba(193,53,132,.22);
}
.sgrid-instagram:hover {
  box-shadow: 0 8px 30px rgba(131,58,180,.4), 0 4px 15px rgba(252,175,69,.3);
}
.sgrid-instagram .sgrid-icon {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  color: #fff;
}

/* YouTube */
.sgrid-youtube {
  background: linear-gradient(135deg, #1a0000 0%, #3d0000 100%);
  box-shadow: 0 4px 18px rgba(255,0,0,.28);
  border: 1px solid rgba(255,0,0,.2);
}
.sgrid-youtube:hover {
  box-shadow: 0 8px 30px rgba(255,0,0,.55);
}
.sgrid-youtube .sgrid-icon { color: #ff4444; }

/* Spotify */
.sgrid-spotify {
  background: linear-gradient(135deg, #011a0c 0%, #003312 100%);
  box-shadow: 0 4px 18px rgba(29,185,84,.25);
  border: 1px solid rgba(29,185,84,.2);
}
.sgrid-spotify:hover {
  box-shadow: 0 8px 30px rgba(29,185,84,.55);
}
.sgrid-spotify .sgrid-icon { color: #1db954; }

/* Other Services */
.sgrid-other {
  background: linear-gradient(135deg, #1a1200 0%, #3d2b00 100%);
  box-shadow: 0 4px 18px rgba(255,200,0,.2);
  border: 1px solid rgba(255,200,0,.15);
}
.sgrid-other:hover {
  box-shadow: 0 8px 30px rgba(255,200,0,.5);
}
.sgrid-other .sgrid-icon { color: #ffd700; }

/* Twitter / X */
.sgrid-twitter {
  background: linear-gradient(135deg, #001626 0%, #002e4a 100%);
  box-shadow: 0 4px 18px rgba(29,155,240,.25);
  border: 1px solid rgba(29,155,240,.18);
}
.sgrid-twitter:hover {
  box-shadow: 0 8px 30px rgba(29,155,240,.55);
}
.sgrid-twitter .sgrid-icon { color: #1d9bf0; }

/* Website */
.sgrid-website {
  background: linear-gradient(135deg, #1a1200 0%, #433000 100%);
  box-shadow: 0 4px 18px rgba(255,170,0,.2);
  border: 1px solid rgba(255,170,0,.15);
}
.sgrid-website:hover {
  box-shadow: 0 8px 30px rgba(255,170,0,.5);
}
.sgrid-website .sgrid-icon { color: #ffaa00; }

/* Discord */
.sgrid-discord {
  background: linear-gradient(135deg, #0e0f23 0%, #1a1d40 100%);
  box-shadow: 0 4px 18px rgba(88,101,242,.28);
  border: 1px solid rgba(88,101,242,.2);
}
.sgrid-discord:hover {
  box-shadow: 0 8px 30px rgba(88,101,242,.58);
}
.sgrid-discord .sgrid-icon { color: #7289da; }

/* LinkedIn */
.sgrid-linkedin {
  background: linear-gradient(135deg, #001828 0%, #002f4e 100%);
  box-shadow: 0 4px 18px rgba(0,119,181,.28);
  border: 1px solid rgba(0,119,181,.2);
}
.sgrid-linkedin:hover {
  box-shadow: 0 8px 30px rgba(0,119,181,.58);
}
.sgrid-linkedin .sgrid-icon { color: #0a66c2; }

/* ── Loading spinner (shown while category loads) ────────────────── */
.sgrid-btn.sgrid-loading .sgrid-icon::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sgrid-spin .7s linear infinite;
}
@keyframes sgrid-spin {
  to { transform: rotate(360deg); }
}

/* ── Not-found flash ─────────────────────────────────────────────── */
.sgrid-btn.sgrid-notfound {
  animation: sgrid-shake .4s ease;
}
@keyframes sgrid-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sgrid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sgrid-btn { padding: 11px 12px; font-size: 12px; }
  .sgrid-icon { width: 30px; height: 30px; font-size: 14px; }
  .sgrid-label { font-size: 12px; }
}

@media (max-width: 480px) {
  .sgrid { grid-template-columns: repeat(1, 1fr); gap: 7px; }
  .sgrid-btn { padding: 12px 14px; }
}

/* ── Dark-mode safe (panel already dark – just transparency tweaks) ── */
.dark-mode .sgrid-btn,
html.dark .sgrid-btn {
  border-color: rgba(255,255,255,.08);
}
