/* ===========================
   SK24 Support Chat Widget
   WhatsApp Glasmorphismus Theme
   Liquid Glass / Glossy Effect
   =========================== */

#sk24-support-chat-12345 {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 14.2px;
}

/* Toggle Button - Glossy Glass */
#sk24-support-chat-toggle-12345 {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(181, 211, 37, 0.95), rgba(186, 90, 32, 0.95));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(37, 211, 102, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Glossy Shine Effekt entfernt - war störend beim Seitenladen */
#sk24-support-chat-toggle-12345::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    pointer-events: none;
}

#sk24-support-chat-toggle-12345:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(37, 211, 102, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

#sk24-support-chat-toggle-12345 .material-icons {
    font-size: 28px;
    position: relative;
    z-index: 1;
}

/* Chat Window - Modern, kompakt, Shop-Farben */
#sk24-support-chat-window-12345 {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 340px;
    height: 480px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.16),
        0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.25s ease;
    transform-origin: bottom right;
    transform: scale(0.98);
    opacity: 0;
    pointer-events: none;
}

#sk24-support-chat-window-12345[data-open="1"] {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Chat Header - Shop-Branding */
.sk24-chat-header-12345 {
    background: linear-gradient(135deg, #111318 0%, #1a1d24 100%);
    border-bottom: 2px solid #ffd600;
    color: #fff;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    position: relative;
}

/* Avatar Wrapper */
.sk24-chat-avatar-wrapper-12345 {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

/* Avatar Bild (Header) */
.sk24-chat-avatar-12345 {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid #ffd600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Chat-Bubble Avatare - WhatsApp Style (kleiner) */
.sk24-chat-row-12345 .sk24-chat-avatar-12345 {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Agent Avatar in Chat - Shop-Farben */
.sk24-chat-avatar-agent-12345 {
    background: #111318;
    color: #ffd600;
    border: 1.5px solid #ffd600;
}

/* Agent Avatar als Bild */
.sk24-chat-avatar-agent-12345[src] {
    background: white;
    object-fit: cover;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
}

/* User Avatar in Chat */
.sk24-chat-avatar-user-12345 {
    background: #3a3f47;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    font-size: 10px;
}

/* Avatar Platzhalter (Initialen) */
.sk24-chat-avatar-placeholder-12345 {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sk24-chat-header-12345::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: headerShine 4s infinite;
}

@keyframes headerShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

/* Avatar - Glossy */
/* SK-Badge entfernt - wird durch Profilbild ersetzt */

.sk24-chat-header-info-12345 {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.sk24-chat-header-title-12345 {
    font-weight: 600;
    font-size: 16px;
    line-height: 21px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.sk24-chat-header-status-12345 {
    font-size: 13px;
    line-height: 18px;
    opacity: 0.95;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Status Dot (Online-Indikator) */
.sk24-status-dot-12345 {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.6);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Chat beenden Button */
.sk24-chat-clear-btn-12345 {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    position: relative;
    z-index: 1;
}

.sk24-chat-clear-btn-12345:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.sk24-chat-clear-btn-12345 .material-icons {
    font-size: 18px;
}

/* Messages Container - Modern, clean */
#sk24-support-chat-messages-12345 {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px;
    background: #f6f7f9;
}

/* Chat Row */
.sk24-chat-row-12345 {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    margin-bottom: 4px;
    padding: 0 6px;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Row (rechts) - WhatsApp Style */
.sk24-chat-row-12345.sk24-chat-row-user-12345 {
    justify-content: flex-end;
    flex-direction: row;
    padding-right: 6px;
}

/* Agent Row (links) - WhatsApp Style */
.sk24-chat-row-12345.sk24-chat-row-agent-12345 {
    justify-content: flex-start;
    flex-direction: row;
    padding-left: 6px;
}

/* Avatar-Wrapper in Chat-Rows */
.sk24-chat-row-12345 .sk24-chat-avatar-wrapper-12345 {
    display: flex;
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 2px;
}

/* User Avatar rechts neben Bubble */
.sk24-chat-row-user-12345 .sk24-chat-avatar-wrapper-12345 {
    order: 2;
    margin-left: 4px;
    margin-right: 0;
}

/* Agent Avatar links neben Bubble */
.sk24-chat-row-agent-12345 .sk24-chat-avatar-wrapper-12345 {
    order: 0;
    margin-right: 4px;
    margin-left: 0;
}

/* Chat Bubble - Modern, kompakt */
.sk24-chat-bubble-12345 {
    max-width: 70%;
    padding: 6px 8px;
    border-radius: 6px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
}

/* User Bubble - Dark Brand */
.sk24-chat-bubble-12345.sk24-chat-bubble-user-12345 {
    background: #111318;
    color: #ffffff;
    border-radius: 6px 6px 0 6px;
    border-left: 3px solid #ffd600;
    order: 1;
}

/* Agent Bubble - Clean Light */
.sk24-chat-bubble-12345.sk24-chat-bubble-agent-12345 {
    background: #ffffff;
    color: #111318;
    border-radius: 6px 6px 6px 0;
    border-left: 3px solid #ffd600;
    order: 1;
}

/* Bubble Tails - Glossy */
/* Bubble Tails entfernen (clean) */
.sk24-chat-bubble-12345.sk24-chat-bubble-user-12345::before {
    content: none;
}

/* Bubble Tails entfernen (clean) */
.sk24-chat-bubble-12345.sk24-chat-bubble-agent-12345::before {
    content: none;
}

/* Label verstecken */
.sk24-chat-label-12345 {
    display: none;
}

/* Chat Text - Kompakt */
.sk24-chat-text-12345 {
    font-size: 13.5px;
    line-height: 18px;
    word-wrap: break-word;
    white-space: normal;
}

/* HTML-Formatierung */
.sk24-chat-text-12345 p {
    margin: 0 0 5px 0;
    line-height: 1.35;
}

.sk24-chat-text-12345 p:last-child {
    margin-bottom: 0;
}

.sk24-chat-text-12345 ul {
    margin: 6px 0;
    padding-left: 18px;
    list-style-type: disc;
}

.sk24-chat-text-12345 li {
    margin: 3px 0;
    line-height: 1.4;
}

.sk24-chat-text-12345 strong {
    font-weight: 600;
    color: inherit;
}

.sk24-chat-text-12345 a {
    color: #027eb5;
    text-decoration: none;
    font-weight: 500;
}

.sk24-chat-text-12345 a:hover {
    text-decoration: underline;
}

/* Produkt-Grid - Responsive Layout */
.sk24-chat-text-12345 .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin: 8px 0;
}

/* Produkt-Karten - Kompakt */
.sk24-chat-text-12345 .product-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 8px 10px;
    margin: 0;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sk24-chat-text-12345 .product-card:hover {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}

.sk24-chat-text-12345 .product-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    color: #008069;
    line-height: 1.3;
    flex-grow: 1;
}

.sk24-chat-text-12345 .product-price {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #111b21;
    margin: 0;
}

.sk24-chat-text-12345 .product-details {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sk24-chat-text-12345 .product-details li {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.sk24-chat-text-12345 .product-details li strong {
    min-width: 65px;
    color: #54656f;
    font-weight: 500;
}

/* Button - Glossy Glass (kompakt) */
.sk24-chat-text-12345 .product-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.9), rgba(32, 186, 90, 0.9));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    margin: 0;
    text-decoration: none !important;
    transition: all 0.2s ease;
    font-size: 12px;
    box-shadow: 
        0 2px 8px rgba(37, 211, 102, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    width: 100%;
    text-align: center;
}

.sk24-chat-text-12345 .product-link:hover {
    background: linear-gradient(135deg, rgba(32, 186, 90, 0.95), rgba(28, 160, 78, 0.95));
    box-shadow: 
        0 4px 12px rgba(37, 211, 102, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Chat Form - Modern */
.sk24-chat-form-12345 {
    padding: 10px 12px;
    background: #f1f3f5;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sk24-chat-form-row-12345 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sk24-chat-form-row-12345 label {
    font-size: 12.5px;
    color: #54656f;
    font-weight: 500;
}

#sk24-support-chat-email-12345 {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: #fff;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
    font-family: inherit;
    transition: all 0.2s ease;
}

#sk24-support-chat-email-12345:focus {
    background: #fff;
    border-color: rgba(255, 214, 0, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 214, 0, 0.2);
}

.sk24-chat-input-row-12345 {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

#sk24-support-chat-message-12345 {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    font-size: 13px;
    resize: none;
    outline: none;
    font-family: inherit;
    min-height: 42px;
    max-height: 100px;
    background: #fff;
    line-height: 20px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

#sk24-support-chat-message-12345:focus {
    background: #fff;
    border-color: rgba(255, 214, 0, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 214, 0, 0.2);
}

#sk24-support-chat-message-12345::placeholder {
    color: #8696a0;
}

/* Send Button - Shop-Farbe */
.sk24-chat-send-12345 {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffd600, #ffc107);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 2px 6px rgba(255, 214, 0, 0.35);
    color: #111318;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sk24-chat-send-12345:hover {
    background: linear-gradient(135deg, #ffde00, #ffb700);
    box-shadow: 0 4px 10px rgba(255, 214, 0, 0.45);
    transform: translateY(-1px);
}

.sk24-chat-send-12345:active {
    transform: translateY(0);
}

.sk24-chat-send-12345:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.sk24-chat-send-12345 .material-icons {
    font-size: 20px;
}

/* Status Messages */
#sk24-support-chat-status-12345 {
    font-size: 12.5px;
    padding: 4px 0 0 0;
    text-align: center;
    font-weight: 400;
    color: #54656f;
}

#sk24-support-chat-status-12345.error {
    color: #d32f2f;
}

#sk24-support-chat-status-12345.success {
    color: #00a884;
}

/* Typing Indicator - Glass */
.sk24-typing-bubble-12345 {
    padding: 10px 12px !important;
    animation: typingBubbleFadeIn 0.3s ease-out;
}

@keyframes typingBubbleFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sk24-typing-dots-12345 {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 17px;
}

.sk24-typing-dots-12345 span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(134, 150, 160, 0.8);
    backdrop-filter: blur(5px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: typingDot 1.4s infinite;
}

.sk24-typing-dots-12345 span:nth-child(1) {
    animation-delay: 0s;
}

.sk24-typing-dots-12345 span:nth-child(2) {
    animation-delay: 0.2s;
}

.sk24-typing-dots-12345 span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Scrollbar - Glass Style */
#sk24-support-chat-messages-12345::-webkit-scrollbar {
    width: 8px;
}

#sk24-support-chat-messages-12345::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

#sk24-support-chat-messages-12345::-webkit-scrollbar-thumb {
    background: rgba(0, 128, 105, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#sk24-support-chat-messages-12345::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 128, 105, 0.4);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    #sk24-support-chat-12345 {
        bottom: 16px;
        right: 16px;
    }

    #sk24-support-chat-toggle-12345 {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        /* Disable animation on tablet/mobile */
        animation: none !important;
        transform: none !important;
    }

    #sk24-support-chat-toggle-12345::before {
        animation: none !important;
        display: none;
    }

    #sk24-support-chat-toggle-12345:hover {
        transform: none !important;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    #sk24-support-chat-12345 {
        bottom: 16px;
        right: 12px;
    }

    #sk24-support-chat-toggle-12345 {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }
    
    #sk24-support-chat-toggle-12345 .material-icons {
        font-size: 24px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    #sk24-support-chat-window-12345 {
        width: calc(100vw - 20px);
        max-width: 400px;
        height: calc(100vh - 100px);
        max-height: 600px;
        bottom: 70px;
    }
    
    #sk24-support-chat-toggle-12345 {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }
    
    #sk24-support-chat-toggle-12345 .material-icons {
        font-size: 22px;
    }
}

/* === OVERRIDE: Runden Button komplett ausblenden === */
/* Das proaktive Widget ersetzt den Toggle-Button vollständig */
#sk24-support-chat-toggle-12345 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}
