/**
 * Voxel Toolkit - Image Optimization Styles
 */

/* Toast Notification */
.vt-image-opt-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #001A33;
    color: #ffffff;
    padding: 20px 25px;
    border-radius: 12px;
    z-index: 2147483647 !important;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-width: 350px;
    animation: vt-image-opt-slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.vt-image-opt-toast-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vt-image-opt-toast-title {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
}

.vt-image-opt-toast-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.vt-image-opt-toast-success {
    background: #7abd71;
}

.vt-image-opt-toast-error {
    background: #c0392b !important;
}

.vt-image-opt-toast-error-icon::before {
    content: "\2715";
    font-weight: bold;
    font-size: 20px;
    color: #fff;
}

.vt-image-opt-toast-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: vt-image-opt-rotate 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes vt-image-opt-rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes vt-image-opt-slide-in {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.vt-image-opt-toast-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.5s ease;
}

@media (max-width: 480px) {
    .vt-image-opt-toast {
        right: 15px;
        left: 15px;
        min-width: 0;
    }
}

/* Crop Modal */
.vt-imgopt-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vt-imgopt-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.vt-imgopt-crop-container {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.vt-imgopt-crop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #001A33;
    border-radius: 12px 12px 0 0;
}

.vt-imgopt-crop-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.vt-imgopt-crop-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.vt-imgopt-crop-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vt-imgopt-crop-canvas-wrapper {
    padding: 24px;
    overflow: auto;
    flex: 1;
    background: #f9fafb;
}

.vt-imgopt-crop-canvas {
    display: block;
    margin: 0 auto;
    cursor: crosshair;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vt-imgopt-crop-controls {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
    background: white;
    border-radius: 0 0 12px 12px;
}

.vt-imgopt-crop-controls button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.vt-imgopt-crop-cancel {
    background: #f3f4f6;
    color: #374151;
}

.vt-imgopt-crop-cancel:hover {
    background: #e5e7eb;
}

.vt-imgopt-crop-skip {
    background: #e0e7ff;
    color: #4338ca;
}

.vt-imgopt-crop-skip:hover {
    background: #c7d2fe;
}

.vt-imgopt-crop-apply {
    background: #001A33;
    color: white;
}

.vt-imgopt-crop-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 26, 51, 0.4);
}

@media (max-width: 480px) {
    .vt-imgopt-crop-container {
        max-width: 95vw;
        max-height: 95vh;
    }

    .vt-imgopt-crop-controls {
        flex-direction: column;
    }

    .vt-imgopt-crop-controls button {
        width: 100%;
    }
}
