﻿/* WhatsApp Temalı Loader Stili */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loader-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* WhatsApp çift tik animasyonu */
.whatsapp-loader {
    position: relative;
    width: 80px;
    height: 50px;
    margin-bottom: 30px;
}

.tick {
    position: absolute;
    width: 4px;
    background: #25D366;
    border-radius: 2px;
    transform-origin: bottom center;
    animation: tickAnimation 2s infinite ease-in-out;
}

.tick-1 {
    height: 25px;
    left: 30px;
    bottom: 0;
    transform: rotate(-40deg);
    animation-delay: 0s;
}

.tick-2 {
    height: 40px;
    left: 50px;
    bottom: 0;
    transform: rotate(40deg);
    animation-delay: 0.3s;
}

@keyframes tickAnimation {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(var(--rotation));
    }

    50% {
        opacity: 1;
        transform: scale(1) rotate(var(--rotation));
    }
}

.tick-1 {
    --rotation: -40deg;
}

.tick-2 {
    --rotation: 40deg;
}

/* Mesaj baloncukları */
.message-bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.bubble {
    position: absolute;
    background: #DCF8C6;
    border-radius: 18px;
    padding: 10px 15px;
    animation: bubbleAnimation 3s infinite ease-in-out;
}

    .bubble span {
        display: inline-block;
        width: 8px;
        height: 8px;
        background: #128C7E;
        border-radius: 50%;
        margin: 0 3px;
        animation: dotAnimation 1.5s infinite ease-in-out;
    }

.bubble-1 {
    top: 20px;
    left: -30px;
    animation-delay: 0s;
}

.bubble-2 {
    bottom: 30px;
    right: -30px;
    animation-delay: 1.5s;
}

@keyframes bubbleAnimation {
    0%, 100% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    50% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes dotAnimation {
    0%, 60%, 100% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.5);
    }
}

.bubble span:nth-child(1) {
    animation-delay: 0s;
}

.bubble span:nth-child(2) {
    animation-delay: 0.2s;
}

.bubble span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Yükleniyor metni - Düzeltilmiş versiyon */
.loading-text {
    position: absolute;
    bottom: -50px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap; /* Satır kaydırmayı engelle */
    display: flex; /* Flexbox kullan */
    align-items: center;
}
.letter {
    display: inline-block;
    animation: letterAnimation 2s infinite;
    min-width: 8px; /* Minimum genişlik */
    text-align: center;
}

@keyframes letterAnimation {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-10px);
    }
}
/* Nokta karakterleri için özel stil */
.letter.dot {
    min-width: 6px;
    margin: 0 2px;
}

/* Her harfe farklı gecikme */
.letter:nth-child(1) {
    animation-delay: 0s;
}

.letter:nth-child(2) {
    animation-delay: 0.1s;
}

.letter:nth-child(3) {
    animation-delay: 0.2s;
}

.letter:nth-child(4) {
    animation-delay: 0.3s;
}

.letter:nth-child(5) {
    animation-delay: 0.4s;
}

.letter:nth-child(6) {
    animation-delay: 0.5s;
}

.letter:nth-child(7) {
    animation-delay: 0.6s;
}

.letter:nth-child(8) {
    animation-delay: 0.7s;
}

.letter:nth-child(9) {
    animation-delay: 0.8s;
}

.letter:nth-child(10) {
    animation-delay: 0.9s;
}

.letter:nth-child(11) {
    animation-delay: 1s;
}

.letter:nth-child(12) {
    animation-delay: 1.1s;
}

.letter:nth-child(13) {
    animation-delay: 1.2s;
}

/* Mobil uyumluluk */
@media (max-width: 600px) {
    .loader-container {
        transform: scale(0.8);
    }

    .loading-text {
        font-size: 16px;
    }
}

/* Loader gizleme animasyonu */
#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}
