/**
 * Chatbot Cards - Base Styles
 *
 * Verantwortlichkeit: Basis-Styles für alle Card-Komponenten
 *
 * @package CockpitOS_Light_Theme
 * @version 1.0.0
 */

/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
    /* Card Spacing */
    --cockpit-os-chatbot-card-gap: clamp(0.75rem, 2vw, 1rem);
    --cockpit-os-chatbot-card-padding: clamp(1rem, 3vw, 1.25rem);

    /* Border Radius */
    --cockpit-os-chatbot-card-radius: clamp(12px, 2.5vw, 16px);
    --cockpit-os-chatbot-card-radius-sm: clamp(6px, 1.5vw, 8px);

    /* Shadows */
    --cockpit-os-chatbot-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.02);
    --cockpit-os-chatbot-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --cockpit-os-chatbot-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --cockpit-os-chatbot-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Card Container
   ======================================== */

.cockpit-os-chatbot-cards {
    display: flex;
    flex-direction: column;
    gap: var(--cockpit-os-chatbot-card-gap);
    margin-top: 1rem;
    margin-bottom: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 0;
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Cards inside message content - unified appearance */
.chatbot-message__content .cockpit-os-chatbot-cards {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 0;
    margin-top: 1rem;
    margin-bottom: -12px;
}

/* Subtle separator between text and cards */
.chatbot-message__content:has(.chatbot-message__content-text-wrapper:not(:empty)) .cockpit-os-chatbot-cards {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 1rem;
}

/* Remove border-top if no text content above */
.chatbot-message__content:has(.chatbot-message__content-text-wrapper:empty) .cockpit-os-chatbot-cards,
.chatbot-message__content:not(:has(.chatbot-message__content-text-wrapper)) .cockpit-os-chatbot-cards {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

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

/* ========================================
   Section
   ======================================== */

.cockpit-os-chatbot-cards__section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header Styles sind jetzt in chatbot-cards-header.css */

/* ========================================
   Grid (DEPRECATED - wird durch chatbot-cards-slider.css ersetzt)
   ======================================== */

/* Alte Grid-Klasse wird nicht mehr verwendet */

/* ========================================
   Card Base
   ======================================== */

.cockpit-os-chatbot-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--cockpit-os-chatbot-card-radius);
    overflow: hidden;
    transition: var(--cockpit-os-chatbot-transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Store Cards: Kein Cursor Pointer (keine Links) */
.cockpit-os-chatbot-card--store {
    cursor: default;
}

.cockpit-os-chatbot-card--store:hover {
    transform: none;
    box-shadow: var(--cockpit-os-chatbot-shadow-sm);
    border-color: var(--color-gray-200);
}

/* Andere Cards: Mit Hover-Effekt (falls verlinkt) */
.cockpit-os-chatbot-card:not(.cockpit-os-chatbot-card--store) {
    cursor: pointer;
}

.cockpit-os-chatbot-card:not(.cockpit-os-chatbot-card--store):hover {
    transform: translateY(-4px);
    box-shadow: var(--cockpit-os-chatbot-shadow-hover);
    border-color: var(--color-primary);
}

/* ========================================
   Card Image
   ======================================== */

.cockpit-os-chatbot-card__image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: var(--color-gray-100);
}

/* ========================================
   Card Content
   ======================================== */

.cockpit-os-chatbot-card__content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: var(--cockpit-os-chatbot-card-padding);
}

.cockpit-os-chatbot-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-gray-900);
    line-height: 1.4;
    margin: 0;
}

.cockpit-os-chatbot-card__description {
    font-size: 0.8125rem;
    color: var(--color-gray-600);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   Card Meta
   ======================================== */

.cockpit-os-chatbot-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cockpit-os-chatbot-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-gray-500);
}

.cockpit-os-chatbot-card__meta-text {
    line-height: 1.4;
}

.chatbot-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ========================================
   Card Badge
   ======================================== */

.cockpit-os-chatbot-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--cockpit-os-chatbot-card-radius-sm);
    box-shadow: var(--cockpit-os-chatbot-shadow-md);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .cockpit-os-chatbot-cards__grid {
        grid-template-columns: 1fr;
    }

    .cockpit-os-chatbot-card__image {
        height: 140px;
    }
}

