/* public/assets/css/basis/knoepfe.css */

/* ==========================================================================
   1. STANDARD KNÖPFE (Inline Buttons)
   Für Karten-Header, Formulare und Tabellen-Aktionen
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    line-height: 1.25;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

.btn svg {
    width: 1rem;
    height: 1rem;
}

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-md { padding: 0.5rem 1rem; font-size: 0.875rem; }

.btn-primary { background-color: #4f46e5; color: #ffffff; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.btn-primary:hover { background-color: #4338ca; }

.btn-secondary { background-color: #ffffff; border-color: #d1d5db; color: #374151; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.btn-secondary:hover { background-color: #f9fafb; color: #4f46e5; border-color: #c7d2fe; }

.btn-danger { background-color: #fee2e2; color: #991b1b; border-color: #fecaca; }
.btn-danger:hover { background-color: #fca5a5; color: #7f1d1d; }


/* ==========================================================================
   2. FLOATING ACTIONS (Sticky Buttons)
   Die runden, schwebenden Buttons unten
   ========================================================================== */

.floating-container {
    position: fixed;
    bottom: 1.5rem;
    
    /* STANDARD: Mittig auf dem Bildschirm zentrieren (bis 1599px) */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: calc(100% - 2rem);
    
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap-reverse;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    z-index: 999;
    pointer-events: none;
}

.floating-item {
    pointer-events: auto; 
    flex-shrink: 0;
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem; 
    border-radius: 9999px; 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.25;

    /* Einheitliche Länge für die zentrierte Ansicht */
    min-width: 140px; 
}

.floating-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.floating-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.floating-btn:active { transform: translateY(0) scale(0.98); }

/* --- Media Query für sehr große Desktop-Monitore (ab 1600px) --- */
@media (min-width: 1600px) {
    .floating-container {
        /* Container bleibt in der Bildschirmmitte verankert... */
        left: 50%;
        
        /* * ...wird aber exakt neben das Layout geschoben!
         * 1280px (max-w-7xl) / 2 = 640px. 
         * Die weiße Box endet bei ca. 608px (wegen 2rem Padding).
         * Wir platzieren den Container bei 624px (608px + 16px Abstand).
         * Bei 1600px Breite bleiben so exakt noch ~176px Platz für die Knöpfe.
         */
        transform: translateX(624px);
        
        width: auto;
        max-width: none;
        padding-right: 0;
        
        /* Klassische vertikale Liste */
        flex-direction: column; 
        flex-wrap: nowrap;      
        
        /* WICHTIG: Links ausrichten! Dadurch kleben die linken Ränder aller Knöpfe wie an einer Schnur exakt parallel zur weißen Formularbox */
        align-items: flex-start; 
        justify-content: flex-end;
    }

    .floating-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        /* Auf Desktop etwas breiter, damit sie einheitlich wirken */
        min-width: 160px; 
    }
}

/* --- Farb-Varianten für Floating Buttons --- */

.floating-btn-primary { background-color: #4f46e5; color: #ffffff; border: 1px solid transparent; }
.floating-btn-primary:hover { background-color: #4338ca; }

.floating-btn-danger { background-color: #dc2626; color: #ffffff; border: 1px solid transparent; }
.floating-btn-danger:hover { background-color: #b91c1c; }

.floating-btn-secondary { background-color: #ffffff; border: 1px solid #d1d5db; color: #374151; }
.floating-btn-secondary:hover { background-color: #f9fafb; color: #111827; border-color: #9ca3af; }
