﻿/* ===== KARTEN ===== */
.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    overflow: clip;
}
.card.border-orange { border-top: 3px solid var(--color-warning); }

.dashboard-hover-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.container-list-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

@keyframes attention-pulse {
    0%   { border-color: var(--attention-pulse-border-active, var(--attention-pulse-color, var(--color-warning))); box-shadow: var(--attention-pulse-base-shadow, 0 0 0 0 transparent), var(--attention-pulse-side-start, 0 0 0 0 transparent), var(--attention-pulse-ring-start, 0 0 0 0 var(--attention-pulse-ring, rgba(217, 119, 6, 0.42))); }
    50%  { border-color: var(--attention-pulse-border-active, var(--attention-pulse-color, var(--color-warning))); box-shadow: var(--attention-pulse-base-shadow, 0 0 0 0 transparent), var(--attention-pulse-side-end, -7px 0 0 -2px var(--attention-pulse-clear, rgba(217, 119, 6, 0))), var(--attention-pulse-ring-end, 0 0 0 8px var(--attention-pulse-clear, rgba(217, 119, 6, 0))); }
    100% { border-color: var(--attention-pulse-border-rest, var(--color-border)); box-shadow: var(--attention-pulse-base-shadow, 0 0 0 0 transparent), var(--attention-pulse-side-clear, -3px 0 0 0 var(--attention-pulse-clear, rgba(217, 119, 6, 0))), var(--attention-pulse-ring-clear, 0 0 0 0 var(--attention-pulse-clear, rgba(217, 119, 6, 0))); }
}
@keyframes attention-dot-pulse {
    0%   { transform: scale(1);   opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}
.container-list-card.container-card-highlight,
.container-list-card.container-card-highlight-danger,
.costs-card-highlight {
    --attention-pulse-base-shadow: var(--shadow);
    animation: attention-pulse 1.6s ease-out;
}
.container-list-card.container-card-highlight-danger {
    --attention-pulse-color: var(--color-danger);
    --attention-pulse-ring: rgba(220, 38, 38, 0.42);
    --attention-pulse-clear: rgba(220, 38, 38, 0);
}
.row-open.cost-row-highlight,
.row-danger.cost-row-highlight,
.row-paid.cost-row-highlight {
    --attention-pulse-border-active: inherit;
    --attention-pulse-border-rest: inherit;
    animation: attention-pulse 1.6s ease-out;
}
.row-open.cost-row-highlight {
    --attention-pulse-base-shadow: inset 3px 0 0 var(--color-warning);
}
.row-danger.cost-row-highlight {
    --attention-pulse-color: var(--color-danger);
    --attention-pulse-ring: rgba(239, 68, 68, 0.42);
    --attention-pulse-clear: rgba(239, 68, 68, 0);
    --attention-pulse-base-shadow: inset 3px 0 0 var(--color-danger);
}
.row-paid.cost-row-highlight {
    --attention-pulse-color: var(--color-success);
    --attention-pulse-ring: rgba(22, 163, 74, 0.42);
    --attention-pulse-clear: rgba(22, 163, 74, 0);
    --attention-pulse-base-shadow: inset 3px 0 0 var(--color-success);
}

@media (hover: hover) and (pointer: fine) {
    .dashboard-hover-card:hover,
    .container-list-card:hover {
        transform: translateY(var(--hover-unified-lift, -2px));
        border-color: var(--hover-unified-ring, rgba(var(--color-primary-rgb, 59,130,246), 0.30));
        box-shadow: var(--hover-unified-shadow, var(--shadow-md));
    }
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-alt);
}
.card-header h2 { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.card-body { padding: 1.25rem; }

/* ===== PRODUCT-HERO (Detailseite /products/{id}) ===== */
.product-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.product-hero-card { display: flex; flex-direction: column; }
.product-hero-card .card-body { display: flex; gap: 1.25rem; align-items: flex-start; flex: 1; }
.product-hero-qr { flex-shrink: 0; line-height: 0; padding: 0.25rem; background: #fff; border-radius: 6px; border: 1px solid var(--color-border); }
.product-hero-qr svg { display: block; width: 72px; height: 72px; }
.product-hero-main { min-width: 0; flex: 1; }
.product-hero-name { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.35rem; word-break: break-word; }
.product-hero-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; color: var(--color-muted); font-size: 0.85rem; margin-bottom: 0.75rem; align-items: center; }
.product-hero-meta code { background: var(--color-surface-alt); padding: 0.15rem 0.45rem; border-radius: 4px; font-size: 0.8rem; }
.product-hero-desc { font-size: 0.9rem; color: var(--color-text); line-height: 1.5; }
.product-hero-desc-add {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--color-muted);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border: 1px dashed var(--color-border);
    border-radius: calc(var(--radius) - 4px);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.product-hero-desc-add:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: var(--color-surface-alt);
}

@media (max-width: 900px) {
    .product-hero-grid { grid-template-columns: 1fr; }
}

/* ===== PRODUCT-SECTIONS (gestapelte Karten auf /products/{id}) ===== */
.product-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

/* =====================================================
   _card.css
   Zweck:          Core-CSS-Modul (Components)
   Verwendet von:  Core-Basis auf allen Seiten (main.php/auth.php)
   Abhaengigkeiten: Reihenfolge base -> layout -> components
   Verantwortlich: Core-Styles
   ===================================================== */
