/* ============================================
   Social Float Button - Frontend Styles v1.2
   Position + Timer + Direct Link Buttons
   ============================================ */

/* ========================
   WRAPPER - Positions
   ======================== */
.sfb-float-wrapper {
    position: fixed;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Column layout (alt alta) */
.sfb-layout-column {
    flex-direction: column;
}

/* Row layout (yan yana) */
.sfb-layout-row {
    flex-direction: row;
}

/* Position: Sağ Alt (alt alta) */
.sfb-pos-right-bottom {
    bottom: 28px;
    right: 28px;
}

/* Position: Sol Alt (alt alta) */
.sfb-pos-left-bottom {
    bottom: 28px;
    left: 28px;
}

/* Position: Sağ Alt (yan yana) */
.sfb-pos-right-bottom-row {
    bottom: 28px;
    right: 28px;
}

/* Position: Sol Alt (yan yana) */
.sfb-pos-left-bottom-row {
    bottom: 28px;
    left: 28px;
}

/* ========================
   TIMER: SHOW/HIDE STATES
   ======================== */
.sfb-float-wrapper.sfb-hidden {
    opacity: 0 !important;
    transform: scale(0.3) translateY(40px) !important;
    pointer-events: none !important;
}

.sfb-float-wrapper.sfb-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* ========================
   BUTTON BASE
   ======================== */
.sfb-btn {
    position: relative;
    width: var(--sfb-size, 60px);
    height: var(--sfb-size, 60px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    border: none;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                box-shadow 0.3s ease,
                border-radius 0.35s ease;
    -webkit-tap-highlight-color: transparent;
}

.sfb-btn:hover {
    transform: scale(1.12) !important;
    border-radius: 18px;
}

.sfb-btn:active {
    transform: scale(0.93) !important;
}

/* SVG icon */
.sfb-btn-icon {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.sfb-btn:hover .sfb-btn-icon {
    transform: scale(1.05);
}

/* ========================
   FACEBOOK BUTTON
   ======================== */
.sfb-btn-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #42A5F5 100%);
    box-shadow:
        0 6px 24px rgba(24, 119, 242, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.sfb-btn-facebook:hover {
    box-shadow:
        0 10px 40px rgba(24, 119, 242, 0.55),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ========================
   INSTAGRAM BUTTON
   ======================== */
.sfb-btn-instagram {
    background: linear-gradient(135deg, #F56040 0%, #C13584 50%, #833AB4 100%);
    box-shadow:
        0 6px 24px rgba(193, 53, 132, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.sfb-btn-instagram:hover {
    box-shadow:
        0 10px 40px rgba(193, 53, 132, 0.55),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ========================
   WHATSAPP BUTTON
   ======================== */
.sfb-btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow:
        0 6px 24px rgba(37, 211, 102, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.sfb-btn-whatsapp:hover {
    box-shadow:
        0 10px 40px rgba(37, 211, 102, 0.55),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ========================
   PULSE RING
   ======================== */
.sfb-btn-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

.sfb-btn-facebook .sfb-btn-ring {
    border: 2.5px solid #1877F2;
    animation: sfb-ring-pulse 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.sfb-btn-instagram .sfb-btn-ring {
    border: 2.5px solid #C13584;
    animation: sfb-ring-pulse 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.sfb-btn-whatsapp .sfb-btn-ring {
    border: 2.5px solid #25D366;
    animation: sfb-ring-pulse 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.sfb-multi .sfb-btn:nth-child(1) .sfb-btn-ring { animation-delay: 0s; }
.sfb-multi .sfb-btn:nth-child(2) .sfb-btn-ring { animation-delay: 0.8s; }
.sfb-multi .sfb-btn:nth-child(3) .sfb-btn-ring { animation-delay: 1.6s; }

@keyframes sfb-ring-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

/* ========================
   TOOLTIP
   ======================== */
.sfb-btn-tooltip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(26, 26, 46, 0.93);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    padding: 9px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.3px;
}

/* Right side buttons → tooltip on left */
.sfb-pos-right-bottom .sfb-btn-tooltip,
.sfb-pos-right-bottom-row .sfb-btn-tooltip {
    right: calc(100% + 14px);
    left: auto;
}

.sfb-pos-right-bottom .sfb-btn-tooltip::after,
.sfb-pos-right-bottom-row .sfb-btn-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: rgba(26, 26, 46, 0.93);
    border-radius: 2px;
}

/* Left side buttons → tooltip on right */
.sfb-pos-left-bottom .sfb-btn-tooltip,
.sfb-pos-left-bottom-row .sfb-btn-tooltip {
    left: calc(100% + 14px);
    right: auto;
    transform: translateY(-50%) translateX(-10px);
}

.sfb-pos-left-bottom .sfb-btn-tooltip::after,
.sfb-pos-left-bottom-row .sfb-btn-tooltip::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: rgba(26, 26, 46, 0.93);
    border-radius: 2px;
}

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

/* ========================
   ANIMATIONS
   ======================== */

/* Pulse */
@keyframes sfb-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.sfb-animation-pulse {
    animation: sfb-pulse 2.5s ease-in-out infinite;
}

.sfb-multi .sfb-btn:nth-child(1).sfb-animation-pulse { animation-delay: 0s; }
.sfb-multi .sfb-btn:nth-child(2).sfb-animation-pulse { animation-delay: 0.3s; }
.sfb-multi .sfb-btn:nth-child(3).sfb-animation-pulse { animation-delay: 0.6s; }

/* Bounce */
@keyframes sfb-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.sfb-animation-bounce {
    animation: sfb-bounce 2s ease infinite;
}

.sfb-multi .sfb-btn:nth-child(1).sfb-animation-bounce { animation-delay: 0s; }
.sfb-multi .sfb-btn:nth-child(2).sfb-animation-bounce { animation-delay: 0.25s; }
.sfb-multi .sfb-btn:nth-child(3).sfb-animation-bounce { animation-delay: 0.5s; }

/* Glow - Facebook */
@keyframes sfb-glow-fb {
    0%, 100% {
        box-shadow: 0 6px 24px rgba(24, 119, 242, 0.4), 0 0 0 0 rgba(24, 119, 242, 0);
    }
    50% {
        box-shadow: 0 6px 36px rgba(24, 119, 242, 0.55), 0 0 0 14px rgba(24, 119, 242, 0.08), 0 0 50px rgba(66, 165, 245, 0.2);
    }
}

/* Glow - Instagram */
@keyframes sfb-glow-ig {
    0%, 100% {
        box-shadow: 0 6px 24px rgba(193, 53, 132, 0.4), 0 0 0 0 rgba(193, 53, 132, 0);
    }
    50% {
        box-shadow: 0 6px 36px rgba(193, 53, 132, 0.55), 0 0 0 14px rgba(193, 53, 132, 0.08), 0 0 50px rgba(245, 96, 64, 0.2);
    }
}

/* Glow - WhatsApp */
@keyframes sfb-glow-wa {
    0%, 100% {
        box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0);
    }
    50% {
        box-shadow: 0 6px 36px rgba(37, 211, 102, 0.55), 0 0 0 14px rgba(37, 211, 102, 0.08), 0 0 50px rgba(18, 140, 126, 0.2);
    }
}

.sfb-btn-facebook.sfb-animation-glow { animation: sfb-glow-fb 2.5s ease-in-out infinite; }
.sfb-btn-instagram.sfb-animation-glow { animation: sfb-glow-ig 2.5s ease-in-out infinite; }
.sfb-btn-whatsapp.sfb-animation-glow { animation: sfb-glow-wa 2.5s ease-in-out infinite; }
.sfb-multi .sfb-btn:nth-child(2).sfb-animation-glow { animation-delay: 0.4s; }
.sfb-multi .sfb-btn:nth-child(3).sfb-animation-glow { animation-delay: 0.8s; }

/* ========================
   ENTRANCE ANIMATION
   ======================== */
@keyframes sfb-entrance {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    60% {
        transform: scale(1.15) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.sfb-btn {
    animation: sfb-entrance 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
    animation-delay: 0.3s;
}

.sfb-multi .sfb-btn:nth-child(2) { animation-delay: 0.5s; }
.sfb-multi .sfb-btn:nth-child(3) { animation-delay: 0.7s; }

/* After entrance, apply animation */
.sfb-float-wrapper.sfb-entered .sfb-animation-pulse {
    animation: sfb-pulse 2.5s ease-in-out infinite;
}
.sfb-float-wrapper.sfb-entered .sfb-animation-bounce {
    animation: sfb-bounce 2s ease infinite;
}
.sfb-float-wrapper.sfb-entered .sfb-btn-facebook.sfb-animation-glow {
    animation: sfb-glow-fb 2.5s ease-in-out infinite;
}
.sfb-float-wrapper.sfb-entered .sfb-btn-instagram.sfb-animation-glow {
    animation: sfb-glow-ig 2.5s ease-in-out infinite;
}
.sfb-float-wrapper.sfb-entered .sfb-btn-whatsapp.sfb-animation-glow {
    animation: sfb-glow-wa 2.5s ease-in-out infinite;
}

/* ========================
   MOBILE RESPONSIVE
   ======================== */
@media (max-width: 480px) {
    .sfb-float-wrapper {
        gap: 12px;
    }

    .sfb-pos-right-bottom,
    .sfb-pos-right-bottom-row {
        bottom: 18px;
        right: 16px;
    }

    .sfb-pos-left-bottom,
    .sfb-pos-left-bottom-row {
        bottom: 18px;
        left: 16px;
    }

    .sfb-btn {
        width: calc(var(--sfb-size, 60px) - 6px) !important;
        height: calc(var(--sfb-size, 60px) - 6px) !important;
    }

    .sfb-btn-icon {
        width: 22px;
        height: 22px;
    }

    .sfb-btn-tooltip {
        display: none;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .sfb-pos-right-bottom,
    .sfb-pos-right-bottom-row {
        bottom: 24px;
        right: 20px;
    }

    .sfb-pos-left-bottom,
    .sfb-pos-left-bottom-row {
        bottom: 24px;
        left: 20px;
    }
}

/* ========================
   DARK MODE
   ======================== */
@media (prefers-color-scheme: dark) {
    .sfb-btn-tooltip {
        background: rgba(255, 255, 255, 0.95);
        color: #1a1a2e;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    }

    .sfb-btn-tooltip::after {
        background: rgba(255, 255, 255, 0.95);
    }
}

/* ========================
   REDUCED MOTION
   ======================== */
@media (prefers-reduced-motion: reduce) {
    .sfb-btn,
    .sfb-btn-icon,
    .sfb-btn-ring,
    .sfb-btn-tooltip,
    .sfb-float-wrapper {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================
   PRINT
   ======================== */
@media print {
    .sfb-float-wrapper {
        display: none !important;
    }
}
