/**
 * Chatbot Responsive
 * 
 * Mobile und Tablet Optimierungen.
 * 
 * @package SMG_Mall
 * @since 1.0.0
 */

/* ========================================
   Tablet (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
    .chatbot-modal__header {
        height: 72px;
        padding: 0 20px;
    }

    .chatbot-modal__title h1 {
        font-size: 18px;
    }

    .chatbot-modal__title p {
        font-size: 13px;
    }

    .chatbot-modal__close {
        width: 44px;
        height: 44px;
        left: 20px;
    }

    .chatbot-modal__messages {
        padding: 96px 12px 136px 12px;
    }

    .chatbot-modal__input {
        padding: 10px 12px;
    }

    .chatbot-modal__input-inner {
        gap: 8px;
    }
}

/* ========================================
   Mobile (max-width: 640px)
   ======================================== */

@media (max-width: 640px) {
    /* Floating Button */
    .chatbot-floating-btn {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }

    /* Höher positionieren wenn Sticky Footer aktiv (Mobile) */
    body:not(.sticky-footer-hidden) .chatbot-floating-btn {
        bottom: 80px; /* 60px Footer + 20px Abstand */
    }

    /* Header */
    .chatbot-modal__header {
        height: 64px;
        padding: 0 16px;
    }

    .chatbot-modal__title h1 {
        font-size: 16px;
    }

    .chatbot-modal__title p {
        font-size: 12px;
    }

    .chatbot-modal__close {
        width: 40px;
        height: 40px;
        left: 16px;
    }

    .chatbot-modal__close svg {
        width: 18px;
        height: 18px;
    }

    /* Messages */
    .chatbot-modal__messages {
        padding: 88px 12px 128px 12px;
    }

    .chatbot-message {
        gap: 24px;
        margin-bottom: 24px;
    }

    .chatbot-message__content {
        max-width: 90%; /* Mehr Breite auf Mobile */
        padding: 20px 24px 32px 24px;
        font-size: 15px;
        border-radius: 20px;
    }

    /* Input */
    .chatbot-modal__input {
        padding: 10px 12px;
    }

    .chatbot-modal__input-inner {
        gap: 8px;
    }

    .chatbot-input {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
        padding: 10px 14px;
    }

    .chatbot-voice-btn,
    .chatbot-send-btn {
        width: 44px;
        height: 44px;
    }

    .chatbot-modal__privacy-notice {
        font-size: 11px;
        padding: 0 4px;
    }

    /* Welcome */
    .chatbot-welcome {
        padding: 32px 16px;
    }

    .chatbot-welcome__icon {
        font-size: 40px;
    }

    .chatbot-welcome__title {
        font-size: 18px;
    }

    .chatbot-welcome__suggestions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .chatbot-suggestion {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* ========================================
   Small Mobile (max-width: 375px)
   ======================================== */

@media (max-width: 375px) {
    .chatbot-floating-btn {
        width: 52px;
        height: 52px;
        bottom: 16px;
        right: 16px;
    }

    /* Höher positionieren wenn Sticky Footer aktiv (Small Mobile) */
    body:not(.sticky-footer-hidden) .chatbot-floating-btn {
        bottom: 71px; /* 55px Footer + 16px Abstand */
    }
    
    .chatbot-modal__header {
        padding: 10px 12px;
    }
    
    .chatbot-modal__messages {
        padding: 12px;
    }
    
    .chatbot-modal__input {
        padding: 10px 12px;
    }
    
    .chatbot-message__content {
        max-width: 95%; /* Noch mehr Breite auf sehr kleinen Screens */
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* ========================================
   Landscape Mobile
   ======================================== */

@media (max-width: 896px) and (orientation: landscape) {
    .chatbot-modal__container {
        height: 100%;
    }
    
    .chatbot-modal__messages {
        padding: 12px 16px;
    }
    
    .chatbot-welcome {
        padding: 20px 16px;
    }
    
    .chatbot-welcome__icon {
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .chatbot-welcome__title {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .chatbot-welcome__text {
        font-size: 14px;
        margin-bottom: 16px;
    }
}

/* ========================================
   Touch Optimizations
   ======================================== */

@media (hover: none) and (pointer: coarse) {
    /* Größere Touch Targets */
    .chatbot-modal__close {
        width: 40px;
        height: 40px;
    }
    
    .chatbot-voice-btn,
    .chatbot-send-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .chatbot-suggestion {
        min-height: 44px;
    }
    
    /* Disable Hover Effects */
    .chatbot-floating-btn:hover {
        transform: none;
    }
    
    .chatbot-suggestion:hover {
        transform: none;
    }
}

