﻿/* Fixed Action Bar Container */
.action-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: white;
    transition: transform 0.3s ease;
}

.action-bar-container.hidden {
    transform: translateY(-100%);
}

.element-action-bar {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.element-action-bar.visible {
    max-height: 400px;
    overflow-y: auto;
}

.element-buttons-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #e1e5e9;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.element-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
    position: relative;
    min-height: 44px;
}

.element-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.element-button:active {
    background: #dee2e6;
    transform: translateY(0);
}

.element-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.element-icon {
    font-size: 16px;
}

.element-text {
    font-weight: 500;
}

.element-badge {
    background: #007bff;
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* Action Buttons */
.action-buttons {
    margin-left: auto;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.clear-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-height: 44px;
}

.clear-button:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
}

/* Selected Photos Row */
.selected-photos-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
}

.photo-thumbnails {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
    padding: 4px 0;
}

.photo-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid #007bff;
}

.photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-photo {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-thumbnail:hover .remove-photo {
    opacity: 1;
}

.photo-overflow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #6c757d;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.selection-info {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Assignment Progress */
.assignment-progress {
    padding: 8px 12px;
    background: #e3f2fd;
    border-top: 1px solid #bbdefb;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: #2196f3;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #1976d2;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .element-button {
        min-width: auto;
        padding: 6px 10px;
    }

    .photo-thumbnail {
        width: 40px;
        height: 40px;
    }

    .clear-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .element-buttons-row {
        justify-content: center;
    }

    .element-button {
        justify-content: center;
        min-width: auto;
        flex: 0 1 calc(50% - 4px);
    }

    .action-buttons {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .clear-button {
        width: 100%;
    }
}

/* Scrollbar Styling */
.photo-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.photo-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.photo-thumbnails::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.photo-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Scrollbar for action bar when many elements */
.element-action-bar::-webkit-scrollbar {
    width: 6px;
}

.element-action-bar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.element-action-bar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.element-action-bar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}