/* ============================
   Mini-Widgets Container
============================ */
.mini-widgets-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

/* ============================
   Widget Wrapper
============================ */
.widget-wrapper {
    display: flex;
    flex-direction: column;
    width: 280px;
    min-width: 220px;
    background-color: transparent;
    height: 460px; /* 🔹 feste Gesamthöhe für jedes Widget */
}

/* ============================
   Widget Header
============================ */
.widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 10px;
    text-align: center;
    color: #fff;
    background-color: #2c2a4d;
    border-radius: 12px 12px 0 0;
}

/* ============================
   Widget Card (Inhalt)
============================ */
.widget-mini {
    background-color: #2c2a4d;
    color: #fff;
    border-radius: 0;
    padding: 10px;
    flex: 1; /* 🔹 füllt verbleibenden Platz */
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    overflow-y: auto;     /* vertikaler Scrollbar */
    overflow-x: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 0.6s forwards;
    margin-bottom: 8px;
}

/* ============================
   Scrollbar Styling
============================ */
.widget-mini::-webkit-scrollbar {
    width: 6px;
}
.widget-mini::-webkit-scrollbar-track {
    background: #2c2a4d;
    border-radius: 6px;
}
.widget-mini::-webkit-scrollbar-thumb {
    background: #fbbf24;
    border-radius: 6px;
}
.widget-mini::-webkit-scrollbar-thumb:hover {
    background: #d4a520;
}

/* ============================
   Widget Items
============================ */
.widget-item-mini {
    background-color: #3b3960;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeSlideUpItems 0.5s forwards;
    margin: 5px 0;
}

/* Header */
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 5px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #f3f4f6;
    word-break: break-word;
}

/* Content / Status */
.item-title,
.item-content {
    font-size: 0.8rem;
    color: #e0e0e0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Status Badge */
.item-status {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.item-status .badge {
    font-size: 0.75rem;
}

/* ============================
   Buttons
============================ */
.item-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-edit,
.btn-delete {
    flex: 1;
    min-width: 80px;
    font-size: 0.75rem;
    padding: 6px 0;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-edit {
    background-color: #fbbf24;
    color: #1a1b2f;
}
.btn-edit:hover {
    background-color: #d4a520;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.btn-delete {
    background-color: #ef4444;
    color: #fff;
}
.btn-delete:hover {
    background-color: #dc2626;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

/* ============================
   Footer (nicht sticky)
============================ */
.widget-footer {
    text-align: center;
    background-color: #2c2a4d;
    padding: 6px 0;
    border-radius: 0 0 12px 12px;
    flex-shrink: 0;
}

.widget-footer .btn-note-new {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    background-color: #fbbf24;
    color: #1a1b2f;
    text-decoration: none;
    transition: all 0.3s ease;
}
.widget-footer .btn-note-new:hover {
    background-color: #d4a520;
    transform: scale(1.05);
}

/* ============================
   Animations
============================ */
@keyframes fadeSlideUp {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideUpItems {
    to { opacity: 1; transform: translateY(0); }
}

/* ============================
   Responsive
============================ */
@media (max-width: 650px) {
    .mini-widgets-container {
        flex-direction: column;
        align-items: center;
    }
    .widget-wrapper {
        width: 90%;
        height: 420px; /* etwas kleiner mobil */
    }
    .widget-mini {
        max-height: none; /* flexibel im mobilen Layout */
    }
}
