/* ==========================================
   CANLI DESTEK SİSTEMİ
========================================== */

.support-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;

    font-family:
        Inter,
        Arial,
        sans-serif;
}

.support-panel[hidden] {
    display: none !important;
}

/* Destek açma butonu */

.support-launcher {
    min-width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 0 20px;

    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #e50914,
            #9f0710
        );

    border: 1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 18px;

    box-shadow:
        0 15px 35px
        rgba(0, 0, 0, 0.45),
        0 0 25px
        rgba(229, 9, 20, 0.25);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.support-launcher:hover {
    transform:
        translateY(-3px);

    box-shadow:
        0 18px 40px
        rgba(0, 0, 0, 0.55),
        0 0 35px
        rgba(229, 9, 20, 0.4);
}

.support-launcher-icon {
    font-size: 21px;
    line-height: 1;
}

.support-launcher-text {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

/* Canlı destek penceresi */

.support-panel {
    position: absolute;
    right: 0;
    bottom: 72px;

    width: 380px;
    max-width:
        calc(100vw - 32px);

    overflow: hidden;

    color: #ffffff;
    background:
        linear-gradient(
            180deg,
            #151515,
            #090909
        );

    border: 1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 22px;

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.75),
        0 0 40px
        rgba(229, 9, 20, 0.14);

    animation:
        supportPanelOpen
        0.25s ease both;
}

@keyframes supportPanelOpen {
    from {
        opacity: 0;

        transform:
            translateY(15px)
            scale(0.96);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

/* Üst bölüm */

.support-header {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding: 14px 16px;

    background:
        linear-gradient(
            135deg,
            #e50914,
            #85060d
        );

    border-bottom: 1px solid
        rgba(255, 255, 255, 0.1);
}

.support-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.support-avatar {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #ffffff;
    background: #111111;

    border: 2px solid
        rgba(255, 255, 255, 0.3);

    border-radius: 50%;

    font-size: 14px;
    font-weight: 900;
}

.support-header-info strong {
    display: block;

    margin-bottom: 5px;

    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.4px;
}

.support-header-info span {
    display: flex;
    align-items: center;
    gap: 6px;

    color:
        rgba(255, 255, 255, 0.82);

    font-size: 12px;
    font-weight: 600;
}

.support-header-info span i {
    width: 8px;
    height: 8px;

    display: inline-block;

    background: #52ff76;

    border-radius: 50%;

    box-shadow:
        0 0 10px
        rgba(82, 255, 118, 0.8);
}

.support-close {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    background:
        rgba(0, 0, 0, 0.22);

    border: 1px solid
        rgba(255, 255, 255, 0.15);

    border-radius: 12px;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.support-close:hover {
    background:
        rgba(0, 0, 0, 0.4);

    transform:
        rotate(5deg);
}

/* Karşılama yazısı */

.support-welcome {
    padding:
        17px 18px 12px;
}

.support-welcome strong {
    display: block;

    margin-bottom: 6px;

    font-size: 17px;
    font-weight: 900;
}

.support-welcome p {
    margin: 0;

    color: #aaaaaa;

    font-size: 13px;
    line-height: 1.55;
}

/* İsim ve e-posta alanları */

.support-identity {
    display: grid;
    gap: 11px;

    padding:
        4px 18px 14px;
}

.support-identity[hidden] {
    display: none !important;
}

.support-identity label {
    display: grid;
    gap: 6px;
}

.support-identity label span {
    color: #d0d0d0;

    font-size: 12px;
    font-weight: 700;
}

.support-identity input {
    width: 100%;
    height: 44px;

    padding: 0 13px;

    color: #ffffff;
    background: #0d0d0d;

    border: 1px solid
        rgba(255, 255, 255, 0.1);

    border-radius: 11px;

    outline: none;

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.support-identity input:focus {
    border-color:
        rgba(229, 9, 20, 0.75);

    box-shadow:
        0 0 0 3px
        rgba(229, 9, 20, 0.12);
}

/* Mesaj alanı */

.support-messages {
    height: 230px;

    display: flex;
    flex-direction: column;
    gap: 9px;

    overflow-y: auto;

    padding: 14px 16px;

    background:
        radial-gradient(
            circle at top,
            rgba(229, 9, 20, 0.06),
            transparent 58%
        ),
        #0b0b0b;

    border-top: 1px solid
        rgba(255, 255, 255, 0.06);

    border-bottom: 1px solid
        rgba(255, 255, 255, 0.06);

    scrollbar-width: thin;
    scrollbar-color:
        #e50914
        #111111;
}

.support-messages::-webkit-scrollbar {
    width: 6px;
}

.support-messages::-webkit-scrollbar-track {
    background: #111111;
}

.support-messages::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 10px;
}

.support-empty-message {
    margin: auto;

    color: #777777;

    font-size: 13px;
    text-align: center;
}

/* Mesaj balonları */

.support-message-row {
    display: flex;
}

.support-message-row.visitor {
    justify-content: flex-end;
}

.support-message-row.admin {
    justify-content: flex-start;
}

.support-message-bubble {
    max-width: 82%;

    padding:
        10px 12px 7px;

    border-radius: 14px;

    box-shadow:
        0 8px 18px
        rgba(0, 0, 0, 0.2);
}

.support-message-row.visitor
.support-message-bubble {
    background:
        linear-gradient(
            135deg,
            #e50914,
            #a4060e
        );

    border-bottom-right-radius: 4px;
}

.support-message-row.admin
.support-message-bubble {
    background: #202020;

    border: 1px solid
        rgba(255, 255, 255, 0.08);

    border-bottom-left-radius: 4px;
}

.support-message-bubble p {
    margin: 0;

    color: #ffffff;

    font-size: 13px;
    line-height: 1.45;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.support-message-bubble time {
    display: block;

    margin-top: 5px;

    color:
        rgba(255, 255, 255, 0.6);

    font-size: 10px;
    text-align: right;
}

/* Bilgilendirme yazısı */

.support-status-message {
    min-height: 20px;

    margin: 0;
    padding:
        6px 17px 0;

    color: #a9a9a9;

    font-size: 11px;
}

.support-status-message.success {
    color: #52df74;
}

.support-status-message.error {
    color: #ff6269;
}

/* Mesaj gönderme alanı */

.support-message-form {
    display: flex;
    align-items: flex-end;
    gap: 9px;

    padding:
        10px 14px 14px;
}

.support-message-form textarea {
    width: 100%;
    min-height: 46px;
    max-height: 105px;

    resize: vertical;

    padding:
        11px 12px;

    color: #ffffff;
    background: #111111;

    border: 1px solid
        rgba(255, 255, 255, 0.1);

    border-radius: 12px;

    outline: none;

    font-family: inherit;
    font-size: 13px;
    line-height: 1.35;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.support-message-form textarea:focus {
    border-color:
        rgba(229, 9, 20, 0.8);

    box-shadow:
        0 0 0 3px
        rgba(229, 9, 20, 0.12);
}

.support-message-form button {
    min-width: 85px;
    height: 46px;

    padding: 0 14px;

    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #e50914,
            #a4060e
        );

    border: 0;
    border-radius: 12px;

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.support-message-form button:hover {
    transform:
        translateY(-2px);
}

.support-message-form button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Telefon görünümü */

@media (max-width: 560px) {
    .support-widget {
        right: 12px;
        bottom: 12px;
    }

    .support-panel {
        position: fixed;

        left: 12px;
        right: 12px;
        bottom: 82px;

        width: auto;
        max-width: none;
    }

    .support-launcher {
        min-width: 56px;
        width: 56px;
        padding: 0;

        border-radius: 50%;
    }

    .support-launcher-text {
        display: none;
    }

    .support-messages {
        height: 215px;
    }
}
