/**
 * BW Gallery Admin Styles
 */

/* Gallery List */
.bwg-no-galleries {
    text-align: center;
    padding: 50px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    margin: 20px 0;
}

.bwg-shortcode {
    background: #f5f5f5;
    padding: 5px 10px;
    font-family: monospace;
    font-size: 13px;
}

.bwg-copy-shortcode {
    margin-left: 10px !important;
}

/* Gallery Edit Form */
#bwg-images-container {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
}

.bwg-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.bwg-image-item {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    cursor: move;
}

.bwg-image-item.ui-sortable-helper {
    opacity: 0.8;
    transform: scale(1.05);
}

.bwg-image-preview {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
}

.bwg-image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bwg-image-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bwg-image-item:hover .bwg-image-actions {
    opacity: 1;
}

.bwg-remove-image {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 3px;
    padding: 5px;
    cursor: pointer;
    color: #dc3545;
    transition: all 0.3s ease;
}

.bwg-remove-image:hover {
    background: #fff;
    transform: scale(1.1);
}

.bwg-image-meta {
    padding: 10px;
}

.bwg-image-meta input,
.bwg-image-meta select {
    width: 100%;
    margin-bottom: 5px;
    font-size: 12px;
}

.bwg-image-tab {
    display: none;
}

#bwg-gallery-form input[name="enable_tabs"]:checked ~ table .bwg-image-tab {
    display: block;
}

/* Tab notice */
#bwg-tab-notice {
    margin-top: 10px;
}

/* Settings Page */
.form-table .description {
    font-style: normal;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .bwg-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}

/* Loading state */
.bwg-loading {
    opacity: 0.6;
    pointer-events: none;
}

.bwg-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: bwg-spin 1s linear infinite;
}

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