/* Replacement CSS classes for inline styles to support CSP nonce-only policy */

/* Utility spacing classes */
.mt-5px { margin-top: 5px; }
.mt-20px { margin-top: 20px; }
.mb-16px { margin-bottom: 16px; }
.mb-25px { margin-bottom: 25px; }
.ml-20px { margin-left: 20px; }
.pl-20px { padding-left: 20px; }
.pb-15px { padding-bottom: 15px; }

/* Card and image container styles */
.card-width-200 { width: 200px; }
.card-width-220 { width: 220px; }
.card-col-auto { width: auto; }

/* Checkerboard background pattern for transparent images */
.checkerboard-bg {
    background: #fff;
    background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd), 
                      linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
}

.img-cover-checkerboard {
    object-fit: cover;
    background: #fff;
    background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd), 
                      linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
}

/* Modal styles */
.modal-dialog-justify-center { justify-content: center; }

.modal-content-auto-width { width: auto; }

.modal-body-auto-rounded {
    width: auto;
    border-radius: 5px;
}

.modal-body-auto-rounded-checkerboard {
    width: auto;
    border-radius: 5px;
    background: #fff;
    background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd), 
                      linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
}

.modal-img-responsive {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 5px;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.processing-progress-dialog {
    width: min(28rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
}

.processing-progress-dialog::backdrop {
    background-color: rgba(255, 255, 255, 0.5);
}

.loading-spinner-centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Shopify Polaris Spinner (https://polaris.shopify.com/components/feedback-indicators/spinner) */
.polaris-spinner {
    display: inline-block;
    line-height: 0;
}

.polaris-spinner svg {
    width: 44px;
    height: 44px;
    fill: #303030; /* Polaris --p-color-bg-fill-brand */
    animation: polaris-spinner-spin 500ms linear infinite;
}

.polaris-spinner--small svg {
    width: 20px;
    height: 20px;
}

@keyframes polaris-spinner-spin {
    to { transform: rotate(1turn); }
}

/* Form elements */
.visually-hidden-file-input {
    height: 1px;
    width: 1px;
}

.file-error-display {
    display: none;
}

/* Button styles */
.btn-full-width {
    width: 100%;
}

/* Display flex helper */
.d-flex-inline {
    display: flex;
}
