/* Location Thumbnail Styles */

.location-thumbnail-container {
    position: relative;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
}

.location-thumbnail-image {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s;
}

.location-thumbnail-container:hover .location-thumbnail-image {
    border-color: #7c3aed;
}

.location-thumbnail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}

.location-thumbnail-name {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    font-size: 10px;
    text-align: center;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover controls */
.location-thumbnail-controls {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    background: white;
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 50;
    white-space: nowrap;
}

.location-thumbnail-container:hover .location-thumbnail-controls {
    opacity: 1;
}

/* Navigation buttons */
.location-thumbnail-controls .version-nav {
    width: 20px;
    height: 20px;
    border: none;
    background: #f3f4f6;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    font-size: 10px;
    color: #6b7280;
}

.location-thumbnail-controls .version-nav:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Remove button */
.location-thumbnail-controls .remove-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: #fee2e2;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    font-size: 10px;
    color: #dc2626;
}

.location-thumbnail-controls .remove-btn:hover {
    background: #fca5a5;
}

/* Ensure controls appear above other elements */
.location-thumbnail-container:hover {
    z-index: 10;
}

/* Add a hover area to prevent controls from disappearing */
.location-thumbnail-container::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -10px;
    right: -10px;
    bottom: -25px;
    z-index: -1;
}

/* Keep controls visible when hovering over them */
.location-thumbnail-controls:hover {
    opacity: 1 !important;
}

/* Loading state */
.location-thumbnail-container.loading .location-thumbnail-image img {
    opacity: 0.5;
}

/* Animation for removal */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Add location button styling */
.add-location-btn {
    width: 60px;
    height: 60px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    color: #9ca3af;
}

.add-location-btn:hover {
    border-color: #7c3aed;
    background: #f3f4f6;
    color: #7c3aed;
}