/**
 * PVG Variation Images - Admin Styles
 *
 * Styles for variation gallery images panel in admin.
 *
 * @package Product_Video_Gallery_For_Wc
 * @since   2.1.0
 */

/* Panel Container */
.pvg-variation-gallery-panel {
    clear: both;
    border: 1px solid #dcdcde;
    background: #fff;
}

/* Panel Header */
.pvg-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #dcdcde;
    cursor: pointer;
}

.pvg-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.pvg-panel-toggle {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #50575e;
    transition: transform 0.2s ease;
}

.pvg-variation-gallery-panel.collapsed .pvg-panel-toggle {
    transform: rotate(180deg);
}

.pvg-variation-gallery-panel.collapsed .pvg-panel-content {
    display: none;
}

/* Panel Content */
.pvg-panel-content {
    padding: 15px;
}

/* Gallery Images List */
.pvg-gallery-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    min-height: 10px;
}

/* Individual Gallery Image */
.pvg-gallery-image {
    position: relative;
    width: 120px;
    height: 120px;
    cursor: move;
    background: #fff;
    border: 1px solid #dcdcde;
    overflow: hidden;
}

.pvg-gallery-image:hover {
    border-color: #2271b1;
}

.pvg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Remove Button - X overlay on hover */
.pvg-remove-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    text-decoration: none;
    cursor: pointer;
}

.pvg-gallery-image:hover .pvg-remove-image {
    opacity: 1;
}

/* X icon using CSS */
.pvg-remove-image::before,
.pvg-remove-image::after {
    content: '';
    position: absolute;
    width: 36px;
    height: 5px;
    background: #fff;
    border-radius: 2px;
}

.pvg-remove-image::before {
    transform: rotate(45deg);
}

.pvg-remove-image::after {
    transform: rotate(-45deg);
}

/* Gallery Actions */
.pvg-gallery-actions {
    margin: 0;
    padding: 0;
}

/* Add Image Button - Blue button style */
.pvg-add-gallery-image.button.button-primary {
    display: inline-block;
    text-decoration: none;
}

/* Sortable States */
.pvg-gallery-images.ui-sortable .pvg-gallery-image {
    cursor: move;
}

.pvg-gallery-images .ui-sortable-helper {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
    z-index: 1000;
}

.pvg-gallery-images .ui-sortable-placeholder {
    width: 120px;
    height: 120px;
    border: 2px dashed #2271b1;
    background: #f0f7fc;
    visibility: visible !important;
}
