/**
 * Mobil Teklif Sistemi - Bağımsız Tasarım
 * Sadece mobil cihazlar için (1024px altı)
 */

:root {
    --mobile-primary: #2563eb;
    --mobile-primary-dark: #1d4ed8;
    --mobile-whatsapp: #25D366;
    --mobile-whatsapp-dark: #1ea952;
    --mobile-shadow: rgba(0, 0, 0, 0.15);
    --mobile-radius: 16px;
    --mobile-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sadece mobil cihazlarda aktif */
@media (max-width: 1024px) {
    
    /* Mobil Sabit Alt Çubuk */
    .mobile-teklif-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 80px !important;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 -8px 32px var(--mobile-shadow) !important;
        z-index: 999999 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-around !important;
        padding: 10px 20px !important;
        safe-area-inset-bottom: env(safe-area-inset-bottom);
    }
    
    /* Gradient çizgi üstte */
    .mobile-teklif-bar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--mobile-primary), var(--mobile-whatsapp), var(--mobile-primary));
        background-size: 200% 100%;
        animation: mobileGradientMove 3s ease-in-out infinite;
    }
    
    @keyframes mobileGradientMove {
        0%, 100% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
    }
    
    /* Mobil Butonlar */
    .mobile-teklif-button {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        color: #ffffff !important;
        padding: 12px 16px !important;
        border-radius: var(--mobile-radius) !important;
        margin: 0 8px !important;
        min-height: 60px !important;
        transition: var(--mobile-transition) !important;
        position: relative !important;
        overflow: hidden !important;
        border: none !important;
        cursor: pointer !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    /* Teklif İste Butonu */
    .mobile-teklif-button.teklif {
        background: linear-gradient(135deg, var(--mobile-primary) 0%, #3b82f6 100%) !important;
    }
    
    /* WhatsApp Butonu */
    .mobile-teklif-button.whatsapp {
        background: linear-gradient(135deg, var(--mobile-whatsapp) 0%, #34d470 100%) !important;
    }
    
    /* Buton İkonları - Gizli */
    .mobile-teklif-button .icon {
        display: none !important;
    }
    
    /* Buton Metinleri */
    .mobile-teklif-button .text {
        font-size: 14px !important;
        font-weight: 600 !important;
        text-align: center !important;
        line-height: 1.3 !important;
        letter-spacing: 0.5px !important;
        text-transform: uppercase !important;
    }
    
    /* Touch Efektleri */
    .mobile-teklif-button:active {
        transform: scale(0.95) !important;
        transition: all 0.1s ease !important;
    }
    
    .mobile-teklif-button.teklif:active {
        background: linear-gradient(135deg, var(--mobile-primary-dark) 0%, #2563eb 100%) !important;
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
    }
    
    .mobile-teklif-button.whatsapp:active {
        background: linear-gradient(135deg, var(--mobile-whatsapp-dark) 0%, var(--mobile-whatsapp) 100%) !important;
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
    }
    
    /* Shimmer efekt */
    .mobile-teklif-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            120deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent
        );
        transition: all 0.6s;
    }
    
    .mobile-teklif-button:active::before {
        left: 100%;
    }
    
    /* Sayfa içeriği için alt padding */
    body.mobile-teklif-active {
        padding-bottom: 90px !important;
    }
    
    /* Mobil Modal - Farklı tasarım */
    .mobile-teklif-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(8px);
        z-index: 9999999;
        animation: mobileModalFadeIn 0.3s ease;
    }
    
    @keyframes mobileModalFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    .mobile-teklif-modal.show {
        display: flex !important;
        align-items: flex-end !important;
        justify-content: center !important;
    }
    
    /* Modal içerik - Alttan yukarı animasyon */
    .mobile-modal-content {
        background: #ffffff;
        border-radius: 24px 24px 0 0;
        width: 100%;
        max-height: 85vh;
        overflow-y: auto;
        padding: 24px;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
        animation: mobileSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }
    
    @keyframes mobileSlideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    /* Modal kapatma kolu */
    .mobile-modal-handle {
        width: 40px;
        height: 4px;
        background: #d1d5db;
        border-radius: 2px;
        margin: 0 auto 20px auto;
        cursor: pointer;
    }
    
    /* Modal başlık */
    .mobile-modal-title {
        font-size: 20px;
        font-weight: 700;
        text-align: center;
        margin-bottom: 16px;
        color: #1f2937;
    }
    
    /* Ürün bilgi kutusu - mobil optimize */
    .mobile-product-info {
        background: linear-gradient(135deg, #f8fafc, #e5e7eb);
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 20px;
        border-left: 4px solid var(--mobile-primary);
    }
    
    .mobile-product-info h3 {
        font-size: 14px;
        font-weight: 600;
        margin: 0 0 8px 0;
        color: #374151;
    }
    
    .mobile-product-info p {
        font-size: 13px;
        margin: 0;
        color: #6b7280;
    }
    
    /* Küçük mobil ekranlar */
    @media (max-width: 480px) {
        .mobile-teklif-bar {
            height: 75px !important;
            padding: 8px 16px !important;
        }
        
        .mobile-teklif-button {
            min-height: 55px !important;
            padding: 10px 12px !important;
            margin: 0 6px !important;
        }
        
        .mobile-teklif-button .text {
            font-size: 13px !important;
        }
        
        .mobile-modal-content {
            padding: 20px;
        }
    }
    
    /* iPhone X ve sonrası için safe area */
    @supports (padding: max(0px)) {
        .mobile-teklif-bar {
            padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
        }
    }
}

/* Desktop'ta gizle */
@media (min-width: 1025px) {
    .mobile-teklif-bar,
    .mobile-teklif-modal,
    .mobile-teklif-button {
        display: none !important;
    }
}
