/* Board Enhancement Styles */

.board-item {
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.board-item:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.board-item.sortable-chosen {
    background-color: #e3f2fd;
    border-color: #2196f3;
    transform: rotate(2deg);
}

.board-item.sortable-ghost {
    opacity: 0.5;
}

.board-actions {
    display: flex !important;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.board-item:hover .board-actions {
    opacity: 1;
}

/* Für mobile Geräte immer sichtbar */
@media (max-width: 768px) {
    .board-actions {
        opacity: 1 !important;
    }
}

.board-actions span {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.board-actions span:hover {
    background-color: #e9ecef;
}

.bi-grip-vertical {
    cursor: grab !important;
}

.bi-grip-vertical:active {
    cursor: grabbing !important;
}

.sortable-boards .board-item {
    cursor: default;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    min-width: 180px;
}

.dropdown-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.text-danger:hover {
    background-color: #f8d7da;
    color: #721c24 !important;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 24px 16px;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 16px 24px 20px;
}

/* Archive Board Styles */
.board-item.archived {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.board-item.archived h5 {
    text-decoration: line-through;
    color: #6c757d !important;
}

/* Bucket Menu Styles */
.bucketcontainer .bi-three-dots-vertical {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bucketcontainer:hover .bi-three-dots-vertical {
    opacity: 1;
}

/* Permission Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .board-actions {
        opacity: 1;
    }
    
    .board-item {
        padding: 12px;
    }
    
    .dropdown-menu {
        min-width: 160px;
    }
}

/* Animation for new boards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.board-item.new-board {
    animation: fadeInUp 0.3s ease-out;
}

/* Loading state */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ToDo Drag & Drop Enhancements */
.todo-drop-zone {
    position: relative;
    min-height: 60px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.todo-drop-zone.sortable-drag-over {
    background-color: #e8f5e8;
    border: 2px dashed #28a745;
    box-shadow: inset 0 0 10px rgba(40, 167, 69, 0.1);
}

.todo-drop-zone.sortable-drag-over::before {
    content: "Hier loslassen";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
}

.todo-drop-zone-empty {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.todo-drop-zone-empty.sortable-drag-over {
    opacity: 1;
    background-color: #e8f5e8;
    border: 2px dashed #28a745;
}

.todo-drop-zone-empty::after {
    content: "Hier können ToDos abgelegt werden";
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

.todo-drop-zone-empty.sortable-drag-over::after {
    content: "Loslassen um ToDo hinzuzufügen";
    color: #28a745;
    font-weight: 500;
}

/* ToDo Card Drag States */
.bucketodo.sortable-chosen {
    background-color: #fff3cd;
    border-color: #ffc107;
    transform: rotate(3deg) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.bucketodo.sortable-ghost {
    opacity: 0.3;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
}

.bucketodo.sortable-ghost * {
    visibility: hidden;
}

/* Bucket Container Drop Zone Styling */
.bucketcontainer.sortable-drag-over .card {
    background-color: #e8f5e8;
    border-color: #28a745;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.2);
}

/* Animation für Drop Zones */
@keyframes pulseDropZone {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

.todo-drop-zone.sortable-drag-over,
.bucketcontainer.sortable-drag-over .card {
    animation: pulseDropZone 1.5s ease-in-out infinite;
}