/* ============================================
   WHATSAPP POPUP STYLES
   ============================================ */
.whatsapp-modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 9999;
        animation: fadeIn 0.3s ease;
    }

    .whatsapp-modal-overlay.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .whatsapp-modal {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        border-radius: 20px;
        padding: 0;
        max-width: 300px;
        /* Reduced to make it square */
        width: 90%;
        aspect-ratio: 1 / 1;
        /* Make it square */
        display: flex;
        flex-direction: column;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        position: relative;
        overflow: hidden;
        animation: slideUp 0.4s ease;
    }

    .whatsapp-modal-header {
        background: rgba(255, 255, 255, 0.1);
        padding: 20px;
        text-align: center;
        position: relative;
    }

    .whatsapp-modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        font-size: 30px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        padding: 0;
        font-weight: 300;
        pointer-events: all;
        z-index: 10;
    }

    .whatsapp-modal-close::before {
        content: '×';
        pointer-events: none;
        display: block;
    }

    .whatsapp-modal-close:hover {
        background: rgba(255, 255, 255, 0.35);
        transform: rotate(90deg) scale(1.1);
    }

    .whatsapp-icon {
        font-size: 50px;
        margin-bottom: 10px;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    }

    .whatsapp-modal h3 {
        color: white;
        font-size: 20px;
        margin: 0;
        font-weight: 700;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .whatsapp-modal-body {
        padding: 25px 20px;
        background: white;
        flex: 1;
        /* Fill the rest of the square */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .whatsapp-modal-body p {
        color: #555;
        font-size: 14px;
        line-height: 1.5;
        margin: 0 0 20px 0;
        text-align: center;
    }

    .whatsapp-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: #25D366;
        color: white;
        text-decoration: none;
        padding: 15px 30px;
        border-radius: 50px;
        font-size: 16px;
        font-weight: 600;
        width: 100%;
        transition: all 0.3s;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
        margin-bottom: 0;
        margin-top: auto;
    }

    .whatsapp-btn:hover {
        background: #20BA5A;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
        color: white;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes slideUp {
        from {
            transform: translateY(50px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @media (max-width: 480px) {
        .whatsapp-modal {
            max-width: 90%;
        }

        .whatsapp-modal h3 {
            font-size: 18px;
        }

        .whatsapp-modal-body p {
            font-size: 13px;
        }
    }

    /* Sadece mobilde görünmesi için desktop'ta gizleyelim */
    @media (min-width: 768px) {
        .whatsapp-modal-overlay {
            display: none !important;
        }
    }

/* ============================================
   X (TWITTER) POPUP STYLES
   ============================================ */
.x-modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 9999;
        animation: fadeIn 0.3s ease;
    }

    .x-modal-overlay.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .x-modal {
        background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
        border-radius: 20px;
        padding: 0;
        max-width: 300px;
        width: 90%;
        aspect-ratio: 1 / 1;
        display: flex;
        flex-direction: column;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        position: relative;
        overflow: hidden;
        animation: slideUp 0.4s ease;
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }

    .x-modal-header {
        background: rgba(255, 255, 255, 0.05);
        padding: 20px;
        text-align: center;
        position: relative;
    }

    .x-modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: white;
        font-size: 30px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        padding: 0;
        font-weight: 300;
        pointer-events: all;
        z-index: 10;
    }

    .x-modal-close::before {
        content: '×';
        pointer-events: none;
        display: block;
    }

    .x-modal-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg) scale(1.1);
    }

    .x-icon {
        font-size: 46px;
        margin-bottom: 10px;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
        display: block;
        line-height: 1;
    }

    .x-modal h3 {
        color: white;
        font-size: 18px;
        margin: 0;
        font-weight: 700;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .x-modal-body {
        padding: 20px 20px;
        background: #111;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .x-modal-body p {
        color: #aaa;
        font-size: 13px;
        line-height: 1.5;
        margin: 0 0 18px 0;
        text-align: center;
    }

    .x-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: #fff;
        color: #000;
        text-decoration: none;
        padding: 13px 28px;
        border-radius: 50px;
        font-size: 15px;
        font-weight: 700;
        width: 100%;
        transition: all 0.3s;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
    }

    .x-btn:hover {
        background: #e0e0e0;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
        color: #000;
    }

    .x-btn svg {
        flex-shrink: 0;
    }

    /* X Widget Container & States */
    .x-widget-wrapper {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* Hide raw timeline link before X script runs without using display: none */
    a.twitter-timeline {
        position: absolute;
        opacity: 0;
        pointer-events: none;
        width: 100%;
        height: 1px;
    }

    .x-modal.widget-loaded {
        aspect-ratio: auto;
        height: 450px;
        max-height: 85vh;
        background: #000;
    }

    .x-modal.widget-loaded .x-modal-header {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 50px;
        background: transparent;
        border: none;
        padding: 0;
        z-index: 10002;
        pointer-events: none;
    }

    .x-modal.widget-loaded .x-modal-header .x-modal-close {
        pointer-events: all;
        background: rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .x-modal.widget-loaded .x-modal-header .x-icon,
    .x-modal.widget-loaded .x-modal-header h3 {
        display: none !important;
    }

    .x-modal.widget-loaded .x-modal-body {
        padding: 0;
        background: #000;
        overflow-y: auto;
        display: block;
        width: 100%;
        height: 100%;
    }

/* Mobile Bottom Nav Transitions */
.mobile-bottom-nav {
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    will-change: transform;
}
.mobile-bottom-nav.nav-hidden {
    transform: translate3d(0, 100%, 0) !important;
    pointer-events: none !important;
}
