/**
 * WooCommerce Logo Preview - Styles
 */

/* Container za "View product with your design" */
.wc-logo-preview-container {
    margin-top: 0 px;
    margin-bottom: 40px;
}

.wc-logo-preview-text {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    font-weight: inherit;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wc-logo-preview-link {
    display: inline-flex;
    align-items: center;
    color: #0071a1;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1;
}

.wc-logo-preview-link:hover {
    color: #005177;
}

.wc-logo-preview-link .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}

.wc-logo-preview-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.wc-logo-preview-controls h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wc-logo-preview-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.wc-logo-upload-btn {
    cursor: pointer;
    background: #0071a1 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 3px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.wc-logo-upload-btn:hover {
    background: #005177 !important;
}

#wc-logo-reset,
#wc-logo-remove {
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

#wc-logo-reset:hover {
    background: #f0f0f0;
}

#wc-logo-remove {
    color: #d63638;
    border-color: #d63638;
}

#wc-logo-remove:hover {
    background: #d63638;
    color: #fff;
}

.wc-logo-hint {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin: 10px 0 0 0;
}

/* Logo Stage - Overlay Container */
.wc-logo-stage {
    position: absolute;
    pointer-events: none; /* Stage ne blokira klikove na sliku */
    z-index: 100;
    overflow: visible; /* Dozvoli da Moveable handles budu vidljivi */
}

/* Lightbox Stage - viši z-index */
#wc-logo-lightbox-stage {
    z-index: 2000 !important; /* PhotoSwipe je 1500, idemo mnogo iznad */
    position: fixed !important;
    pointer-events: none !important;
    overflow: visible !important;
}

#wc-logo-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none !important;
    max-height: none !important;
    pointer-events: auto !important;
    transform-origin: 0 0;
    cursor: move;
    user-select: none;
    -webkit-user-drag: none;
    z-index: inherit !important;
}

/* Logo Overlay Image */
.wc-logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none !important; /* Override tema styles */
    max-height: none !important;
    pointer-events: auto; /* Logo je interaktivan */
    transform-origin: 0 0;
    cursor: move;
    user-select: none;
    -webkit-user-drag: none;
}

/* Moveable Control Box - Custom Styling */
.moveable-control-box {
    z-index: 101 !important;
    pointer-events: auto !important; /* Omogući interakciju sa handle-ima */
}

.moveable-line {
    background: #4af !important;
    pointer-events: auto !important;
}

.moveable-control {
    background: #4af !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    pointer-events: auto !important;
    cursor: pointer !important;
}

.moveable-rotation {
    background: #f44 !important;
    border: 2px solid #fff !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .wc-logo-preview-wrapper {
        padding: 15px;
    }

    .wc-logo-preview-buttons {
        flex-direction: column;
    }

    .wc-logo-upload-btn,
    #wc-logo-reset,
    #wc-logo-remove {
        width: 100%;
        text-align: center;
    }

    /* Manji handle-i na mobilnom */
    .moveable-control {
        width: 14px !important;
        height: 14px !important;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .wc-logo-preview-wrapper {
        padding: 18px;
    }
}

/* Accessibility */
.wc-logo-upload-btn:focus,
#wc-logo-reset:focus,
#wc-logo-remove:focus {
    outline: 2px solid #0071a1;
    outline-offset: 2px;
}

/* Loading State */
.wc-logo-preview-loading {
    opacity: 0.6;
    pointer-events: none;
}
