/**
 * ShopGlut Product Slider - Admin Styles
 * Additional styles for Live View Demo in admin area
 */

/* Ensure modal displays properly in admin area */
.shopglut-product-slider .slider-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.shopglut-product-slider .slider-modal.active {
    opacity: 1;
    visibility: visible;
}

.shopglut-product-slider .slider-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.shopglut-product-slider .slider-modal-content {
    position: relative;
    background: white;
    max-width: 1100px;
    max-height: 90vh;
    margin: 5vh auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.shopglut-product-slider .slider-modal.active .slider-modal-content {
    transform: scale(1);
}

/* Close button styling for admin */
.shopglut-product-slider .slider-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shopglut-product-slider .slider-close:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.shopglut-product-slider .slider-close svg {
    width: 16px;
    height: 16px;
    stroke: #374151;
}

/* Ensure modal content is scrollable in admin */
.shopglut-product-slider .slider-inner {
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
}

/* Loading states */
.shopglut-product-slider .loading {
    opacity: 0.6;
    pointer-events: none;
}

.shopglut-product-slider .add-to-cart-btn.loading {
    position: relative;
}

.shopglut-product-slider .add-to-cart-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Admin-specific adjustments */
.wp-admin .shopglut-product-slider {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Ensure proper z-index in admin context */
.wp-admin .shopglut-product-slider .slider-modal {
    z-index: 999999;
}