/* =====================================================
   CONTACT BUTTONS STYLES (WhatsApp & Phone)
   Angel Temizlik - Tüm sayfalarda kullanılabilir
   ===================================================== */

.contact-button {
    position: fixed;
    bottom: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    user-select: none;
    transform: translateY(0);
}

/* WhatsApp Button - Sağ Alt */
.whatsapp-button {
    right: 30px;
}

.whatsapp-button .button-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.whatsapp-button .button-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whatsapp-button:hover .button-icon::before {
    opacity: 1;
}

.whatsapp-button .button-icon i {
    font-size: 28px;
    color: white;
    transition: transform 0.3s ease;
}

/* Phone Button - Sol Alt */
.phone-button {
    left: 30px;
}

.phone-button .button-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #38B2B2 0%, #2a8a8a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.phone-button .button-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.phone-button:hover .button-icon::before {
    opacity: 1;
}

.phone-button .button-icon i {
    font-size: 24px;
    color: white;
    transition: transform 0.3s ease;
}

/* Tooltip Styles */
.button-tooltip {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

/* WhatsApp Tooltip - Sola al */
.whatsapp-button .button-tooltip {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(10px);
}

.whatsapp-button .button-tooltip.tooltip-visible {
    transform: translateX(0) translateY(0);
}

/* Phone Tooltip - Sağa al */
.phone-button .button-tooltip {
    left: 0;
    right: auto;
    transform: translateX(0) translateY(10px);
}

.phone-button .button-tooltip.tooltip-visible {
    transform: translateX(0) translateY(0);
}

.button-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.8);
}

/* WhatsApp Tooltip Arrow - Sağ tarafa */
.whatsapp-button .button-tooltip::after {
    left: auto;
    right: 20px;
    transform: translateX(0);
}

/* Phone Tooltip Arrow - Sol tarafa */
.phone-button .button-tooltip::after {
    left: 20px;
    right: auto;
    transform: translateX(0);
}

.tooltip-visible {
    opacity: 1;
    visibility: visible;
}

/* Hover Effects */
.button-hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.button-hover .button-icon i {
    transform: scale(1.1);
}

/* Click Animation */
.button-clicked {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Pulse Animation for WhatsApp */
.whatsapp-button .button-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.4);
    animation: whatsappPulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Ring Animation for Phone */
.phone-button .button-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: rgba(0, 123, 191, 0.4);
    animation: phoneRing 1.5s ease-in-out infinite;
    z-index: -1;
}

@keyframes phoneRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-button {
        width: 55px;
        height: 55px;
        bottom: 20px;
    }

    .whatsapp-button {
        right: 20px;
    }

    .phone-button {
        left: 20px;
    }

    .whatsapp-button .button-icon i {
        font-size: 24px;
    }

    .phone-button .button-icon i {
        font-size: 20px;
    }

    .button-tooltip {
        font-size: 12px;
        padding: 6px 10px;
        bottom: 65px;
    }

    /* Mobile'da tooltip'i gizle (touch için gerekli değil) */
    .button-tooltip {
        display: none;
    }
}

@media (max-width: 480px) {
    .contact-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
    }

    .whatsapp-button {
        right: 15px;
    }

    .phone-button {
        left: 15px;
    }

    .whatsapp-button .button-icon i {
        font-size: 22px;
    }

    .phone-button .button-icon i {
        font-size: 18px;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .contact-button {
        width: 58px;
        height: 58px;
        bottom: 25px;
    }

    .whatsapp-button {
        right: 25px;
    }

    .phone-button {
        left: 25px;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .contact-button {
        width: 65px;
        height: 65px;
        bottom: 40px;
    }

    .whatsapp-button {
        right: 40px;
    }

    .phone-button {
        left: 40px;
    }

    .whatsapp-button .button-icon i {
        font-size: 30px;
    }

    .phone-button .button-icon i {
        font-size: 26px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .contact-button {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    .button-hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .contact-button,
    .button-icon,
    .button-icon i,
    .button-tooltip {
        transition: none;
    }

    .whatsapp-button .button-icon::after,
    .phone-button .button-icon::after {
        animation: none;
    }
}

/* Focus States for Accessibility */
.contact-button:focus {
    outline: 3px solid rgba(0, 123, 191, 0.5);
    outline-offset: 2px;
}

.contact-button:focus-visible {
    outline: 3px solid rgba(0, 123, 191, 0.7);
}

/* Print Media - Hide buttons */
@media print {
    .contact-button {
        display: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .button-tooltip {
        background: rgba(255, 255, 255, 0.9);
        color: #333;
    }

    .button-tooltip::after {
        border-top-color: rgba(255, 255, 255, 0.9);
    }
}