/**
 * CockpitOS Light - Chatbot Cards Mobile Optimizations
 * 
 * Verantwortlichkeit: Mobile-spezifische Optimierungen für Cards
 * 
 * @package CockpitOS_Light_Theme
 * @version 1.0.0
 */

/* ========================================
   Mobile Cards (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
    /* Cards Container - Mobile Optimized */
    .chatbot-cards__container--slider {
        gap: 16px;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
        /* Better touch scrolling */
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        scroll-padding-left: 20px;
        scroll-padding-right: 20px;
    }
    
    /* Cards in Message Content - Mobile */
    .chatbot-message__content .cockpit-os-chatbot-cards {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Card Width - Volle Breite für vollständige Sichtbarkeit */
    .chatbot-cards__container--slider .cockpit-os-chatbot-card {
        flex: 0 0 calc(100vw - 80px) !important; /* Volle Breite minus Padding */
        min-width: calc(100vw - 80px) !important;
        max-width: calc(100vw - 80px) !important;
        width: calc(100vw - 80px) !important;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    
    /* Multi-Intent Cards müssen auch vollständig sichtbar sein */
    .cockpit-os-chatbot-cards-section__cards .chatbot-cards__container--slider .cockpit-os-chatbot-card {
        flex: 0 0 calc(100vw - 80px) !important;
        min-width: calc(100vw - 80px) !important;
        max-width: calc(100vw - 80px) !important;
        width: calc(100vw - 80px) !important;
    }
    
    /* Card Content - More Compact */
    .cockpit-os-chatbot-card {
        border-radius: 12px;
    }
    
    .cockpit-os-chatbot-card__image {
        height: 100px; /* Kompakt aber sichtbar */
    }
    
    .cockpit-os-chatbot-card__content {
        padding: 12px;
        gap: 8px;
    }
    
    .cockpit-os-chatbot-card__title {
        font-size: 0.9375rem; /* 15px */
        line-height: 1.3;
        font-weight: 600;
    }
    
    .cockpit-os-chatbot-card__description {
        font-size: 0.8125rem; /* 13px */
        line-height: 1.4;
        -webkit-line-clamp: 2; /* Limit to 2 lines */
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Card Meta - Compact mit Icons */
    .cockpit-os-chatbot-card__meta {
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 4px;
    }
    
    .cockpit-os-chatbot-card__meta-item {
        font-size: 0.75rem; /* 12px */
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    
    .cockpit-os-chatbot-card__meta-item .chatbot-icon {
        width: 12px;
        height: 12px;
        opacity: 0.6;
    }
    
    /* Header Styles sind jetzt in chatbot-cards-header.css */
    
    /* Navigation Dots - Mobile Styles sind jetzt in chatbot-cards-navigation.css */
    
    /* Hide scrollbar on mobile */
    .chatbot-cards__container--slider::-webkit-scrollbar {
        display: none;
    }
    
    .chatbot-cards__container--slider {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    /* Grid Mode - Single Column on Mobile */
    .chatbot-cards__container--grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Cards Section - Less Spacing */
    .cockpit-os-chatbot-cards__section {
        gap: 0.75rem;
    }
}

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

@media (max-width: 480px) {
    /* Even More Compact - aber immer noch vollständig sichtbar */
    .chatbot-cards__container--slider .cockpit-os-chatbot-card {
        flex: 0 0 calc(100vw - 80px) !important;
        min-width: calc(100vw - 80px) !important;
        max-width: calc(100vw - 80px) !important;
        width: calc(100vw - 80px) !important;
    }
    
    /* Multi-Intent Cards */
    .cockpit-os-chatbot-cards-section__cards .chatbot-cards__container--slider .cockpit-os-chatbot-card {
        flex: 0 0 calc(100vw - 80px) !important;
        min-width: calc(100vw - 80px) !important;
        max-width: calc(100vw - 80px) !important;
        width: calc(100vw - 80px) !important;
    }
    
    .chatbot-message__content .cockpit-os-chatbot-cards {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .cockpit-os-chatbot-card__image {
        height: 100px;
    }
    
    .cockpit-os-chatbot-card__content {
        padding: 10px;
    }
    
    .cockpit-os-chatbot-card__title {
        font-size: 0.875rem; /* 14px */
    }
    
    .cockpit-os-chatbot-card__description {
        font-size: 0.75rem; /* 12px */
    }
}

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

/* Touch targets sind jetzt in chatbot-cards-navigation.css */

/* Prevent text selection during scroll */
.chatbot-cards__container--slider {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Smooth momentum scrolling on iOS */
@supports (-webkit-overflow-scrolling: touch) {
    .chatbot-cards__container--slider {
        -webkit-overflow-scrolling: touch;
    }
}

