/* ═══ Social Corner — Expandable FAB (Permanent Asset) ═══ */

.sc-wrap {
  position: fixed;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  right: 1.5rem;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Trigger button (main pulsing FAB) ───────────────────── */
.sc-trigger {
  position: relative;
  width: 54px;
  height: 54px;
  min-height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(8, 9, 14, 0.90);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 2px 16px rgba(0, 0, 0, 0.5),
    0 0 0 0 rgba(251, 191, 36, 0),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.28s ease,
    box-shadow 0.28s ease;
  will-change: transform;
  animation: sc-glow 3.5s ease-in-out 2s infinite;
  z-index: 2;
}

@keyframes sc-glow {
  0%   { box-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 0 0   rgba(251,191,36,0.00), inset 0 1px 0 rgba(255,255,255,0.06); }
  35%  { box-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 0 8px  rgba(251,191,36,0.10), inset 0 1px 0 rgba(255,255,255,0.06); }
  60%  { box-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 0 12px rgba(251,191,36,0.00), inset 0 1px 0 rgba(255,255,255,0.06); }
  100% { box-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 0 0    rgba(251,191,36,0.00), inset 0 1px 0 rgba(255,255,255,0.06); }
}

.sc-trigger:hover {
  transform: scale(1.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.sc-trigger:active {
  transform: scale(0.92);
  transition-duration: 0.1s;
}

.sc-trigger svg {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sc-wrap--open .sc-trigger {
  animation: none;
  border-color: rgba(251, 191, 36, 0.25);
  box-shadow:
    0 2px 16px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(251, 191, 36, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sc-wrap--open .sc-trigger svg {
  transform: rotate(45deg);
}

/* ── Action buttons container ────────────────────────────── */
.sc-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  pointer-events: none;
  opacity: 0;
}

.sc-wrap--open .sc-actions {
  pointer-events: auto;
  opacity: 1;
}

/* ── Individual action buttons ───────────────────────────── */
.sc-btn {
  position: relative;
  width: 46px;
  height: 46px;
  min-height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 9, 14, 0.88);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.25s ease;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(12px) scale(0.7);
}

.sc-wrap--open .sc-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sc-wrap--open .sc-btn:nth-child(1) { transition-delay: 0.06s; }
.sc-wrap--open .sc-btn:nth-child(2) { transition-delay: 0.12s; }
.sc-wrap--open .sc-btn:nth-child(3) { transition-delay: 0.18s; }

.sc-btn:hover {
  transform: scale(1.13);
}

.sc-btn:active {
  transform: scale(0.91);
  transition-duration: 0.1s;
}

.sc-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}

/* ── SMS button (green) ──────────────────────────────────── */
.sc-btn--sms:hover {
  border-color: rgba(23, 178, 106, 0.48);
  box-shadow:
    0 0 0 1px rgba(23, 178, 106, 0.14),
    0 0 20px rgba(23, 178, 106, 0.28),
    0 6px 22px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Email button (gold) ─────────────────────────────────── */
.sc-btn--email:hover {
  border-color: rgba(251, 191, 36, 0.48);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.14),
    0 0 20px rgba(251, 191, 36, 0.28),
    0 6px 22px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Share button (blue) ─────────────────────────────────── */
.sc-btn--share:hover {
  border-color: rgba(96, 165, 250, 0.48);
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.14),
    0 0 20px rgba(96, 165, 250, 0.28),
    0 6px 22px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Labels (tooltip on hover) ───────────────────────────── */
.sc-btn .sc-label {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #eaeaf0;
  background: rgba(8, 9, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sc-btn:hover .sc-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ── Email modal overlay ─────────────────────────────────── */
.sc-modal {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.sc-modal--open {
  opacity: 1;
  pointer-events: auto;
}

.sc-modal__card {
  width: 100%;
  max-width: 400px;
  background: rgba(12, 13, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(251, 191, 36, 0.04);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.sc-modal--open .sc-modal__card {
  transform: translateY(0) scale(1);
}

.sc-modal__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.4), transparent);
}

.sc-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: #7c7c8a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.sc-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #eaeaf0;
}

.sc-modal__close svg {
  width: 14px;
  height: 14px;
}

.sc-modal__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.sc-modal__icon svg {
  width: 22px;
  height: 22px;
}

.sc-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #eaeaf0;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.sc-modal__desc {
  font-size: 0.85rem;
  color: #7c7c8a;
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

.sc-modal__form {
  display: flex;
  gap: 0.5rem;
}

.sc-modal__input {
  flex: 1;
  min-height: 46px;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  color: #eaeaf0;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sc-modal__input::placeholder {
  color: #555;
}

.sc-modal__input:focus {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.08);
}

.sc-modal__submit {
  min-height: 46px;
  padding: 0 1.4rem;
  background: #fbbf24;
  color: #08080d;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  box-shadow: 0 2px 12px rgba(251, 191, 36, 0.2);
}

.sc-modal__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.35);
}

.sc-modal__submit:active {
  transform: scale(0.96);
}

.sc-modal__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.sc-modal__msg {
  font-size: 0.78rem;
  margin-top: 0.75rem;
  line-height: 1.4;
}

.sc-modal__msg--ok {
  color: #17b26a;
}

.sc-modal__msg--err {
  color: #f87171;
}

.sc-modal__note {
  font-size: 0.65rem;
  color: #44444f;
  margin-top: 1rem;
  line-height: 1.4;
}

/* ── Entrance animation for the wrap itself ──────────────── */
.sc-wrap {
  animation: sc-enter 0.72s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s both;
}

@keyframes sc-enter {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.78);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Legacy compat: old two-button layout (for archives) ─── */
.sc-btn--subs {
  animation: sc-pulse-ring 3s ease-in-out 2.4s infinite;
}

.sc-btn--subs:hover {
  border-color: rgba(23, 178, 106, 0.48);
  box-shadow:
    0 0 0 1px rgba(23, 178, 106, 0.14),
    0 0 20px rgba(23, 178, 106, 0.28),
    0 6px 22px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@keyframes sc-pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(23, 178, 106, 0.00), 0 2px 12px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05); }
  38%  { box-shadow: 0 0 0 6px rgba(23, 178, 106, 0.13), 0 2px 12px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05); }
  65%  { box-shadow: 0 0 0 9px rgba(23, 178, 106, 0.00), 0 2px 12px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05); }
  100% { box-shadow: 0 0 0 0   rgba(23, 178, 106, 0.00), 0 2px 12px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05); }
}

/* Legacy: when no trigger exists, show buttons directly */
.sc-wrap:not(:has(.sc-trigger)) .sc-btn {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.sc-wrap:not(:has(.sc-trigger)) {
  gap: 0.65rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .sc-wrap {
    right: 1rem;
    bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  }

  .sc-trigger {
    width: 50px;
    height: 50px;
    min-height: 50px;
  }

  .sc-btn {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .sc-btn .sc-label {
    display: none;
  }

  .sc-modal__card {
    padding: 2rem 1.5rem 1.75rem;
  }

  .sc-modal__form {
    flex-direction: column;
  }
}
