/* Sahte Chat Eklentisi Stilleri v2.5 */

/* Tetikleyici Buton */
.chat-trigger {
    position: fixed;
    bottom: 65px; /* 25px + 40px = 65px */
    right: 25px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #0073aa 0%, #00a0d2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    z-index: 99999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Chat Popup Penceresi */
#sahte-chat-popup {
    position: fixed;
    bottom: 65px; /* Trigger ile aynı hizada başlasın */
    right: 25px;
    width: 340px;
    max-width: calc(100vw - 30px);
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 100000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: popup-appear 0.3s ease-out;
    max-height: calc(100vh - 80px); /* Ekran yüksekliğine göre max yükseklik */
}

#sahte-chat-popup.active {
    display: flex;
}

@keyframes popup-appear {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Popup Başlık */
#sahte-chat-popup .chat-header {
    background: linear-gradient(135deg, #18598D 0%, #18598D 100%);
    color: white;
    padding: 12px 18px;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#sahte-chat-popup .chat-header .close-chat {
    font-size: 22px;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#sahte-chat-popup .chat-header .close-chat:hover {
    opacity: 1;
}

/* Popup İçerik Alanı */
#sahte-chat-popup .chat-body {
    padding: 15px;
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Genel Mesaj Stili (Hem karşılama hem başarı için kullanılabilir) */
.chat-message {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 13.5px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
}

/* Karşılama Mesajı Özel Stilleri (Sol taraf) */
.chat-message.chat-welcome {
    background-color: #e5e7eb;
    color: #1f2937;
    border-radius: 12px 12px 12px 4px;
    align-self: flex-start;
    margin-right: auto;
}

/* Gönderen Adı Stili */
.chat-message .sender-name {
    font-weight: 600;
    font-size: 12.5px;
    margin-bottom: 4px;
    color: #0073aa;
}

/* Form Alanları */
#sahte-chat-popup #sahte-chat-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="tel"] {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 30px 8px 10px;
    font-size: 13px;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    line-height: 1.4;
    padding-left: 10px;
    padding-right: 35px !important;
}

.input-group .input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
    z-index: 3;
}

.input-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.input-group input:focus + .input-icon .fas {
    color: #0073aa;
}

.input-group input::placeholder {
    font-size: 12px;
    color: #adb5bd;
}

#sahte-chat-popup button[type="submit"] {
    background: linear-gradient(135deg, #18598D 0%, #18598D 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 9px 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 5px;
    height: 36px;
}

#sahte-chat-popup button[type="submit"]:hover {
    background: linear-gradient(135deg, #006293 0%, #008bbd 100%);
}

#sahte-chat-popup button[type="submit"]:active {
    transform: scale(0.98);
}

#sahte-chat-popup button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Başarı Mesajı (Sağ taraf, gönderilmiş gibi) */
#sahte-chat-popup .chat-success {
    background-color: #dbeafe;
    color: #1e40af;
    border-radius: 12px 12px 4px 12px;
    align-self: flex-end;
    margin-left: auto;
    margin-top: 0;
    padding: 8px 12px;
    max-width: 85%;
    font-size: 13.5px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    text-align: left;
}

/* Mobil Uyumluluk */
@media (max-width: 600px) { /* Eşik değeri biraz artırıldı */
    .chat-trigger {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px; /* Mobilde biraz daha aşağıda */
        right: 15px;
    }
    #sahte-chat-popup.active { /* Sadece aktifken tam ekran */
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0; /* Tam ekranda köşe yuvarlatma olmaz */
        animation: mobile-popup-appear 0.3s ease-out; /* Farklı animasyon */
    }
    #sahte-chat-popup .chat-body {
        padding: 15px;
        flex-grow: 1; /* İçeriğin kalan alanı doldurmasını sağla */
    }
    #sahte-chat-popup .chat-header {
        padding: 10px 15px;
        font-size: 16px;
    }
    #sahte-chat-popup .chat-welcome {
        font-size: 13px;
        padding: 8px 12px;
    }
    #sahte-chat-popup input[type="text"],
    #sahte-chat-popup input[type="email"],
    #sahte-chat-popup input[type="tel"] {
        font-size: 13px;
        padding: 9px 9px 9px 32px;
    }
    .input-group .fas {
        font-size: 13px;
        left: 10px;
    }
    #sahte-chat-popup button[type="submit"] {
        font-size: 14px;
        padding: 9px 12px;
    }
}

@keyframes mobile-popup-appear {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 