/* ==========================================================================
   PrintSprout Styles v2.5.8
   ========================================================================== */

/* --- Skeleton Loading Animation --- */
@keyframes ps-skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.ps-skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: ps-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.ps-skeleton-select {
    height: 42px;
    width: 100%;
    margin-bottom: 1em;
}

.ps-skeleton-label {
    height: 16px;
    width: 120px;
    margin-bottom: 8px;
}

.ps-skeleton-price {
    height: 32px;
    width: 150px;
    margin-top: 1em;
}

.ps-skeleton-row {
    display: flex;
    gap: 16px;
    margin-bottom: 1em;
}

.ps-skeleton-row .ps-skeleton-label {
    flex: 0 0 160px;
}

.ps-skeleton-row .ps-skeleton-select {
    flex: 1;
    margin-bottom: 0;
}

/* --- Price Display Animations --- */
@keyframes ps-price-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes ps-price-fade {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#printsprout-price-display {
    transition: all 0.3s ease;
}

#printsprout-price-display.ps-price-updating {
    opacity: 0.5;
}

#printsprout-price-display .ps-price-amount {
    display: inline-block;
    font-size: 1.5em;
    font-weight: 700;
    color: #1e293b;
    animation: ps-price-fade 0.3s ease forwards;
}

#printsprout-price-display .ps-price-amount.ps-price-pop {
    animation: ps-price-pop 0.3s ease;
}

.ps-price-per-unit {
    display: block;
    font-size: 0.85em;
    color: #64748b;
    margin-top: 4px;
}

.ps-price-savings {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.75em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    animation: ps-price-fade 0.4s ease forwards;
}

/* --- Upload Section Styles --- */
.ps-uploads-section {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    text-align: center;
}

.ps-uploads-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ps-uploads-icon {
    width: 28px;
    height: 28px;
    stroke: #3b82f6;
}

.ps-uploads-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.ps-uploads-description {
    font-size: 0.9em;
    color: #64748b;
    margin: 0 0 1em 0;
}

.ps-btn-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.ps-btn-upload:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.ps-btn-upload:active {
    transform: translateY(0);
}

.ps-btn-upload svg {
    stroke: currentColor;
}

/* --- Template Download Section Styles --- */
.ps-template-download {
    margin-top: 1em;
    padding: 1.25em 1.5em;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
}

.ps-template-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ps-template-icon {
    width: 22px;
    height: 22px;
    stroke: #64748b;
}

.ps-template-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.ps-template-description {
    font-size: 0.85em;
    color: #64748b;
    margin: 0 0 10px 0;
}

.ps-template-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ps-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75em;
    color: #475569;
}

.ps-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ps-legend-bleed .ps-legend-dot {
    background: #ef4444;
}

.ps-legend-trim .ps-legend-dot {
    background: #3b82f6;
}

.ps-legend-safe .ps-legend-dot {
    background: #22c55e;
}

.ps-template-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ps-template-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 0.875em;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff !important;
}

.ps-template-btn svg {
    stroke: currentColor;
}

.ps-template-btn-vertical {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
}

.ps-template-btn-vertical:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.ps-template-btn-horizontal {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
}

.ps-template-btn-horizontal:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

/* --- Upload Status Indicator (shown on product page) --- */
.ps-upload-status {
    margin-top: 12px;
    padding: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    display: none;
}

.ps-upload-status.has-files {
    display: block;
}

.ps-upload-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ps-upload-status-icon {
    width: 20px;
    height: 20px;
    stroke: #16a34a;
}

.ps-upload-status-title {
    font-size: 0.9em;
    font-weight: 600;
    color: #166534;
    margin: 0;
}

.ps-upload-status-files {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ps-upload-file-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dcfce7;
    border-radius: 6px;
    font-size: 0.85em;
}

.ps-upload-file-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    background: #f1f5f9;
}

.ps-upload-file-name {
    color: #166534;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ps-upload-file-check {
    width: 16px;
    height: 16px;
    stroke: #16a34a;
}

/* --- Options Selector Layout --- */
.printsprout-options-selectors {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.printsprout-group {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 12px;
    padding: 0px;
    margin: 0;
}

.printsprout-group:last-of-type {
    border-bottom: none;
}

.printsprout-group:hover {
    background: none;
}

.printsprout-group label {
    font-size: 0.875em;
    font-weight: 500;
    color: #475569;
    margin: 0;
    padding: 0;
    min-width: auto;
}

.printsprout-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9em;
    font-weight: 400;
    color: #1e293b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.printsprout-select:hover {
    border-color: #cbd5e1;
}

.printsprout-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Price display styling */
#printsprout-price-display {
    grid-column: 1 / -1;
    padding: 16px 0 8px 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
}

/* --- Grid Overlay Toggle --- */
.ps-grid-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-grid-toggle-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.ps-grid-toggle-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.ps-grid-toggle-btn svg {
    width: 14px;
    height: 14px;
}

/* --- Live Preview Panel --- */
.ps-live-preview {
    margin-top: 1.5em;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.ps-live-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75em 1em;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
}

.ps-live-preview-header:hover {
    background: #f1f5f9;
}

.ps-live-preview-title {
    font-weight: 600;
    font-size: 0.9em;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ps-live-preview-chevron {
    transition: transform 0.3s ease;
}

.ps-live-preview.collapsed .ps-live-preview-chevron {
    transform: rotate(-90deg);
}

.ps-live-preview-body {
    padding: 1em;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

.ps-live-preview.collapsed .ps-live-preview-body {
    display: none;
}

.ps-preview-mockup {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.ps-preview-mockup img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ps-preview-mockup-placeholder {
    color: #94a3b8;
    font-size: 0.85em;
    text-align: center;
}

.ps-preview-summary {
    font-size: 0.85em;
}

.ps-preview-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4em 0;
    border-bottom: 1px solid #f1f5f9;
}

.ps-preview-summary-item:last-child {
    border-bottom: none;
}

.ps-preview-summary-label {
    color: #64748b;
}

.ps-preview-summary-value {
    font-weight: 500;
    color: #1e293b;
}

/* --- Original Styles --- */
.printsprout-options-selectors {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
}

/* Shared groups (Sinalite + 4over) */
.printsprout-group.ps-group-stock {
    order: 1;
}

.printsprout-group.ps-group-size {
    order: 2;
}

.printsprout-group.ps-group-qty {
    order: 3;
}

.printsprout-group.ps-group-grommets {
    order: 4;
}

.printsprout-group.ps-group-h-standcompatible {
    order: 5;
}

.printsprout-group.ps-group-needhstand {
    order: 6;
}

.printsprout-group.ps-group-coating {
    order: 7;
}

.printsprout-group.ps-group-roundcorners {
    order: 8;
}

.printsprout-group.ps-group-bundling {
    order: 9;
}

.printsprout-group.ps-group-foldtype {
    order: 10;
}

.printsprout-group.ps-group-doyouhaveafoldingsample {
    order: 11;
}

.printsprout-group.ps-group-includespremiummetalstand {
    order: 12;
}

.printsprout-group.ps-group-bindery {
    order: 12;
}

.printsprout-group.ps-group-paintcolor {
    order: 13;
}

/* 4over-specific groups */
.printsprout-group.ps-group-product-type {
    order: 1;
}

.printsprout-group.ps-group-majestic-type {
    order: 1;
}

.printsprout-group.ps-group-product-category {
    order: 1;
}

.printsprout-group.ps-group-product-orientation {
    order: 4;
}

.printsprout-group.ps-group-colorspec {
    order: 7;
}

.printsprout-group.ps-group-runsize {
    order: 3;
}

.printsprout-group.ps-group-additional-options {
    order: 22;
}

.printsprout-group.ps-group-turn-around-time {
    order: 25;
}

/* Default & trailing */
.printsprout-group {
    order: 20;
}

.printsprout-group.ps-group-turnaround {
    order: 25;
}

#printsprout-price-display {
    order: 100;
}

.printsprout-group {
    display: flex;
}

.printsprout-group label {
    min-width: 160px;
}

.ps-tab-btn-secondary {
    text-align: center !important;
}

span.ps-tab-label {
    width: 100%;
}

/* --- Widget Container --- */
.printsprout-widget-container {
    margin-bottom: 1em;
}

.printsprout-loading {
    font-size: 1em;
}

/* --- Template Download Box --- */
.printsprout-template-download {
    margin-bottom: 2em;
    text-align: center;
    border: 1px solid #eee;
    background: #f8fafc;
    border-radius: 10px;
    padding: 1.5em;
}

.printsprout-template-download h4 {
    margin-bottom: 0.5em;
}

.printsprout-template-download .fa-file-pdf-o {
    color: #0062ff;
    margin-right: 8px;
}

.printsprout-template-download div {
    margin-bottom: 1em;
    color: #555;
    font-size: 0.97em;
}

.printsprout-template-download span {
    font-size: 90%;
}

.printsprout-template-download button {
    padding: 0.5em;
    font-size: 1em;
    color: #fff !important;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

#download-template-vertical {
    background-color: #3b82f6;
    /* Blue-500 */
    color: #ffffff !important;
}

#download-template-vertical:hover {
    background-color: #2563eb;
    /* Blue-600 */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#download-template-horizontal {
    background-color: #10b981;
    /* Emerald-500 */
    color: #ffffff !important;
}

#download-template-horizontal:hover {
    background-color: #059669;
    /* Emerald-600 */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- Upload Container --- */
.printsprout-uploads-container {
    margin-top: 1.5em;
    padding-top: 1.5em;
    border-top: 1px solid #eee;
}

.printsprout-uploads-container h4 {
    margin-bottom: 1em;
}

/* --- Tabs --- */
.printsprout-upload-tabs {
    margin-bottom: 2em;
}

.ps-tab-nav {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 1em;
}

.ps-tab-btn {
    flex: 1;
    padding: 0.8em 0;
    border: none;
    background: #f8fafc;
    font-weight: bold;
    cursor: pointer;
    color: #555;
    border-bottom: 3px solid transparent;
}

.ps-tab-btn.active {
    color: #3182ce;
    border-bottom: 3px solid #3182ce;
}

.ps-tab-content {
    display: none;
}

.ps-tab-content.active {
    display: block;
}

/* --- Upload Box --- */
.printsprout-file-upload {
    margin-bottom: 1.5em;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1em;
}

.printsprout-file-upload label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.printsprout-file-upload input[type="file"] {
    display: block;
}

.printsprout-file-info {
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
}

.printsprout-error-message {
    color: red;
    display: none;
    font-size: 0.9em;
}

/* --- Proofing Area --- */
#proofing-area,
.ps-back-proofing-area {
    margin-top: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.ps-proofing-title {
    margin-bottom: 0.6em;
}

.ps-pdf-pagination {
    display: none;
    text-align: center;
    margin-bottom: 8px;
}

.ps-pdf-pagination button {
    margin: 0 5px;
}

#proofing-canvas-front,
#proofing-canvas-back {
    border: 1px solid #eee;
    display: block;
    margin: auto;
}

.ps-approval-text {
    margin-left: 5px;
}

/* --- Progress --- */
.printsprout-progress-container {
    display: none;
    margin-top: 1em;
}

#printsprout-upload-progress {
    width: 100%;
}

#printsprout-progress-percentage {
    margin-left: 10px;
}


[x-cloak] {
    display: none !important;
}

.ps-upload-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px dashed #d1d5db;
    /* gray-300 */
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #4b5563;
    /* gray-600 */
    transition: all 0.2s ease-in-out;
}

.ps-upload-button:hover {
    background-color: #f9fafb;
    /* gray-50 */
    border-color: #3b82f6;
    /* blue-500 */
}

/* Style for when a file has been selected */
.ps-upload-button.uploaded {
    background-color: #ecfdf5;
    /* green-50 */
    border-color: #10b981;
    /* emerald-500 */
    color: #065f46;
    /* green-800 */
    font-weight: 600;
}

#proofing-messages p {
    margin: 5px 0;
    padding: 5px;
    border-radius: 3px;
}

#proofing-messages .error {
    background-color: #ffe0e0;
    border: 1px solid #ff9090;
    color: #c00;
}

#proofing-messages .success {
    background-color: #e0ffe0;
    border: 1px solid #90ff90;
    color: #070;
}

#proofing-messages .warning {
    background-color: #fff0d0;
    border: 1px solid #ffc080;
    color: #a50;
}

/*
 * PrintSprout Proofing Styles v1.0
 * All classes are prefixed with 'ps-' to prevent conflicts.
 */

:root {
    --ps-primary-color: #0ea5e9;
    /* Light Blue */
    --ps-primary-hover: #0284c7;
    /* Darker Light Blue */
    --ps-secondary-color: #64748b;
    /* Gray */
    --ps-light-gray: #f8fafc;
    --ps-border-color: #e2e8f0;
    --ps-white: #ffffff;
    --ps-text-dark: #1e293b;
    --ps-text-light: #475569;
    --ps-font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --ps-success-bg: #dcfce7;
    --ps-success-border: #86efac;
    --ps-success-text: #166534;
    --ps-info-bg: #e0f2fe;
    --ps-info-border: #7dd3fc;
    --ps-info-text: #0c4a6e;
}

/* --- Modal Trigger Button --- */
#printsprout-open-modal-btn {
    width: 100%;
    margin-top: 0px;
}

/* --- Modal Overlay & Content --- */
.ps-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 41, 59, 0.75);
    z-index: 10000;
    display: none;
    /* JS will toggle this to 'flex' */
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    font-family: var(--ps-font-family);
}

.ps-modal-overlay.ps-is-visible {
    display: flex;
}

.ps-modal-content {
    background-color: var(--ps-light-gray);
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 95vw;
    max-width: 1320px;
    height: 90vh;
    max-height: 850px;
    display: flex;
    overflow: hidden;
}

/* --- Two-Column Layout --- */
.ps-modal-left,
.ps-modal-right {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.ps-modal-left {
    flex-basis: 65%;
}

.ps-modal-right {
    flex-basis: 35%;
    background-color: var(--ps-white);
    border-left: 1px solid var(--ps-border-color);
    overflow-x: auto;
}

/* --- Left Column: Canvas & Controls --- */
.ps-canvas-area {
    position: relative;
    width: 100%;
    /* or 100%, or whatever works for your modal */
    height: 100%;
    /* adjust as needed */
    overflow: auto;
    max-width: 796.95px;
    max-height: 700px;
    background: #fff;
    border: 1px solid #ddd;
    margin: 0 auto;
    display: flex;
    align-items: center;
    /* <-- vertical centering */
    justify-content: center;
    /* <-- horizontal centering */
}

/* This will forcibly reset any accidental styling! */
.ps-canvas-area canvas {
    display: block;
    box-sizing: content-box !important;
    width: unset !important;
    height: unset !important;
    max-width: unset !important;
    max-height: unset !important;
    min-width: unset !important;
    min-height: unset !important;
    object-fit: unset !important;
    background: #fff;
    margin: 0 auto;
    /* (OPTIONAL) */
    border: 1px solid #f5f5f5;
}


/* Base style for the new HTML guideline labels */
.ps-guideline-label {
    position: absolute;
    display: none;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    z-index: 10;
}


/* The dotted connector line and dot */
.ps-guideline-label::after {
    content: '';
    position: absolute;
    left: 50%;
    height: var(--ps-connector-length, 35px);
    width: 1px;
    border-left: 1px dotted;
}

.ps-guideline-label::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background-color: currentColor;
}

.ps-guideline-label.ps-label-outside::after {
    top: 100%;
    /* Line starts at the bottom of the label */
}

.ps-guideline-label.ps-label-outside::before {
    top: calc(100% + var(--ps-connector-length, 35px));
    /* Dot at the end of the line */
}

/* For labels INSIDE the canvas (pointing UP) */
.ps-guideline-label.ps-label-inside::after {
    bottom: 100%;
    /* Line starts at the top of the label */
}

.ps-guideline-label.ps-label-inside::before {
    bottom: calc(100% + var(--ps-connector-length, 35px));
    /* Dot at the end of the line */
}

/* Specific styles for the Safety Area label */
.ps-label-safety {
    color: #15803d;
    /* Dark Green */
    background-color: #dcfce7;
    /* Light Green */
    border: 1px solid #86efac;
}

.ps-label-safety::after {
    border-left-color: #15803d;
}

/* Specific styles for the Bleed Area label */
.ps-label-bleed {
    color: #0c4a6e;
    /* Dark Blue */
    background-color: #e0f2fe;
    /* Light Blue */
    border: 1px solid #7dd3fc;
}

.ps-label-bleed::after {
    border-left-color: #0c4a6e;
}

#proofing-canvas-front,
#proofing-canvas-back {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background-color: #fff;
    background-repeat: repeat;
}


.ps-canvas-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

.ps-zoom-controls {
    display: inline-flex;
    align-items: center;
    background-color: var(--ps-white);
    border: 1px solid var(--ps-border-color);
    border-radius: 0.375rem;
    overflow: hidden;
}

.ps-zoom-btn {
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    color: var(--ps-text-light);
}

.ps-zoom-btn:hover {
    background-color: var(--ps-light-gray);
}

.ps-zoom-level {
    padding: 0 1rem;
    font-size: 0.875rem;
    color: var(--ps-text-dark);
    border-left: 1px solid var(--ps-border-color);
    border-right: 1px solid var(--ps-border-color);
}

/* --- Right Column: Header, Uploads, Actions --- */
.ps-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.ps-h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ps-text-dark);
    margin: 0;
    line-height: 1.2;
}

.ps-modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--ps-secondary-color);
    cursor: pointer;
    padding: 0;
}

.ps-modal-close-btn:hover {
    color: var(--ps-text-dark);
}

.ps-product-info {
    margin-bottom: 1.5rem;
}

.ps-product-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ps-text-dark);
    margin: 0 0 0.25rem 0;
}

.ps-product-specs {
    font-size: 0.875rem;
    color: var(--ps-text-light);
    margin: 0;
}

.ps-upload-section {
    margin-bottom: 1rem;
}

.ps-upload-title {
    font-weight: 600;
    color: var(--ps-text-dark);
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
}

.ps-upload-box {
    display: block;
    border: 2px dashed #cbd5e1;
    /* Dashed border for empty state */
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--ps-text-light);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: var(--ps-light-gray);
    position: relative;
    /* Needed for the hidden input */
}

.ps-upload-box:hover {
    border-color: var(--ps-primary-color);
    color: var(--ps-text-dark);
}

/* Style the empty state placeholder */
.ps-upload-placeholder {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ps-upload-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
}

.ps-upload-text {
    font-weight: 500;
}

/* Hide the actual file input */
.ps-upload-box .ps-file-input {
    opacity: 0;
    width: 0.1px;
    height: 0.1px;
    position: absolute;
    z-index: -1;
}

/* --- State-change logic --- */
/* By default, the placeholder is shown and the preview is hidden */
.ps-upload-box .ps-file-preview {
    display: none;
}

.ps-upload-box .ps-upload-placeholder {
    display: flex;
}

/* When the .has-file class is added to the box... */
.ps-upload-box.has-file {
    border-style: solid;
    border-color: var(--ps-border-color);
    padding: 0.5rem;
    /* Adjust padding for the filled state */
    background-color: var(--ps-light-gray);
}

.ps-upload-box.has-file .ps-file-preview {
    display: flex;
    /* Show the preview */
}

.ps-upload-box.has-file .ps-upload-placeholder {
    display: none;
    /* Hide the placeholder */
}

.ps-file-input {
    display: none;
}

.ps-file-preview {
    display: flex;
    align-items: center;
    width: 100%;
}

.ps-file-thumbnail {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: cover;
    border: 1px solid var(--ps-border-color);
    border-radius: 0.25rem;
    margin-right: 0.75rem;
    background-color: white;
}

.ps-file-name {
    flex-grow: 1;
    font-size: 0.875rem;
    color: var(--ps-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-design-link {
    margin-top: 1rem;
    margin-bottom: auto;
}

.ps-design-link a {
    color: var(--ps-text-light);
    text-decoration: none;
    font-size: 0.875rem;
}

.ps-design-link a:hover {
    text-decoration: underline;
    color: var(--ps-primary-color);
}

.ps-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* --- Generic Component Styles --- */
.ps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    margin-bottom: 12px;
}

.ps-btn-primary {
    background-color: var(--ps-primary-color);
    color: var(--ps-white);
    border-color: var(--ps-primary-color);
}

.ps-btn-primary:hover {
    background-color: var(--ps-primary-hover);
    border-color: var(--ps-primary-hover);
}

.ps-btn-secondary {
    background-color: var(--ps-white);
    color: var(--ps-text-dark);
    border-color: var(--ps-border-color);
}

.ps-btn-secondary:hover {
    background-color: var(--ps-light-gray);
    border-color: var(--ps-secondary-color);
}

.ps-btn.ps-btn-preview {
    flex-grow: 1;
}

.ps-btn.ps-btn-finish {
    flex-grow: 1;
}

.ps-icon-eye {
    /* Basic SVG icon */
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231e293b'%3E%3Cpath d='M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z' /%3E%3Cpath fill-rule='evenodd' d='M.664 10.59a1.651 1.651 0 010-1.18l.88-1.452A1.65 1.65 0 013.437 7h13.126c.433 0 .845.214 1.092.59l.88 1.451a1.651 1.651 0 010 1.18l-.88 1.452a1.651 1.651 0 01-1.092.59H3.437a1.651 1.651 0 01-1.893-.59l-.88-1.452zM10 14a4 4 0 100-8 4 4 0 000 8z' clip-rule='evenodd' /%3E%3C/svg%3E");
    background-size: contain;
}

.ps-proofing-viewer {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}



.ps-pdf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.ps-pdf-page-info {
    font-size: 0.875rem;
    color: var(--ps-text-light);
}

.ps-proofing-messages {
    font-size: 0.8rem;
    padding: 0rem;
    border-radius: 0.25rem;
    margin-top: 0rem;
}

.ps-proofing-messages .success {
    color: #166534;
}

.ps-proofing-messages .error {
    color: #b91c1c;
    font-weight: bold;
}

.ps-proofing-messages .warning {
    color: #b45309;
}

.ps-proofing-messages .info {
    color: #475569;
}

.ps-approval-label {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.ps-modal-footer-content {
    margin-top: auto;
    /* Pushes this section to the bottom */
    padding-top: 1.5rem;
}

.ps-validation-summary {
    background-color: rgb(255, 250, 240);
    /* Light Red */
    border: 1px solid #ed8936;
    /* Red border */
    color: #c05621;
    /* Dark Red text */
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.875rem;
}

.ps-validation-summary h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #c05621;
}

.ps-validation-summary ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.ps-validation-summary li {
    margin-bottom: 0.5rem;
}

.ps-validation-summary li:last-child {
    margin-bottom: 0;
}


.product .summary .cart:not(.variations_form):not(.grouped_form),
.product .summary .cart .woocommerce-variation-add-to-cart {
    flex-direction: column;
    ;
}


.ps-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Adds space between the buttons */
}

.ps-zoom-level {
    font-weight: 600;
    min-width: 50px;
    /* Prevents layout shifts */
    text-align: center;
}

.ps-zoom-btn {
    /* Base styles for all zoom buttons */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #dcdcdc;
    background-color: #ffffff;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.ps-zoom-btn:hover {
    background-color: #f5f5f5;
    border-color: #c0c0c0;
}

/* Specific styling for the new Reset button */
.ps-zoom-btn-reset {
    background-color: #2c3338;
    /* A darker background to stand out */
    color: #ffffff;
    border-color: #2c3338;
    gap: 6px;
    /* Space between the icon and the text */
}

.ps-zoom-btn-reset:hover {
    background-color: #444;
    border-color: #444;
}

.ps-zoom-btn-reset svg {
    /* Ensures the icon inherits the button's white text color */
    fill: currentColor;
}

/* ==========================================================================
   Template Gallery Modal Styles
   ========================================================================== */

/* --- Gallery Modal Overlay --- */
.ps-template-gallery-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ps-template-gallery-overlay.ps-is-visible {
    opacity: 1;
    visibility: visible;
}

/* --- Gallery Container --- */
.ps-template-gallery-container {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
}

.ps-template-gallery-overlay.ps-is-visible .ps-template-gallery-container {
    transform: scale(1) translateY(0);
}

/* --- Gallery Header --- */
.ps-template-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.ps-template-gallery-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.ps-template-gallery-title svg {
    color: #3b82f6;
}

.ps-template-gallery-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.ps-template-gallery-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* --- Gallery Tabs --- */
.ps-template-gallery-tabs {
    display: flex;
    padding: 0 24px;
    gap: 8px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.ps-template-gallery-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.ps-template-gallery-tab:hover {
    color: #3b82f6;
}

.ps-template-gallery-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.ps-template-gallery-tab.has-selection {
    color: #10b981;
}

.ps-template-gallery-tab.has-selection.active {
    border-bottom-color: #10b981;
}

.ps-template-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #e2e8f0;
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.ps-template-gallery-tab.active .ps-template-count {
    background: #dbeafe;
    color: #3b82f6;
}

/* --- Gallery Body / Grid --- */
.ps-template-gallery-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.ps-template-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* --- Template Card --- */
.ps-template-gallery-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-template-gallery-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px -5px rgba(59, 130, 246, 0.2);
    transform: translateY(-3px);
}

.ps-template-gallery-card.selected {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.ps-template-card-image {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    overflow: hidden;
}

.ps-template-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ps-template-gallery-card:hover .ps-template-card-image img {
    transform: scale(1.05);
}

/* Card Overlay (View Button) */
.ps-template-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ps-template-gallery-card:hover .ps-template-card-overlay {
    opacity: 1;
}

.ps-template-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-template-view-btn:hover {
    background: #f1f5f9;
}

/* Selected Badge */
.ps-template-selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.ps-template-gallery-card.selected .ps-template-selected-badge {
    opacity: 1;
    transform: scale(1);
}

/* Card Info */
.ps-template-card-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ps-template-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-template-card-group {
    font-size: 0.8rem;
    color: #64748b;
}

/* --- Gallery Footer --- */
.ps-template-gallery-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}

.ps-template-gallery-selection {
    flex: 1;
}

.ps-selection-summary {
    display: flex;
    gap: 24px;
    font-size: 0.9rem;
    color: #64748b;
}

.ps-selection-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ps-selection-item strong {
    color: #475569;
}

.ps-selection-name {
    color: #1e293b;
    font-weight: 500;
}

.ps-selection-name.has-selection {
    color: #10b981;
}

.ps-template-gallery-confirm {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-template-gallery-confirm:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.ps-template-gallery-confirm:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

/* --- Lightbox --- */
.ps-template-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ps-template-lightbox.ps-is-visible {
    opacity: 1;
    visibility: visible;
}

.ps-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.ps-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ps-lightbox-image {
    max-width: 90%;
    max-height: 75vh;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.ps-lightbox-info {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ps-lightbox-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.ps-lightbox-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}

.ps-lightbox-download:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* --- Template Selection Chips (Product Page) --- */
.ps-template-selection-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.ps-template-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    font-size: 0.875rem;
}

.ps-template-chip-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.ps-template-chip-info {
    display: flex;
    flex-direction: column;
}

.ps-template-chip-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ps-template-chip-name {
    font-weight: 600;
    color: #166534;
}

.ps-template-chip-remove {
    width: 20px;
    height: 20px;
    border: none;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 4px;
    color: #16a34a;
    transition: all 0.2s ease;
}

.ps-template-chip-remove:hover {
    background: #fecaca;
    color: #dc2626;
}

/* --- "Or Design Your Own" Accordion --- */
.ps-design-own-accordion {
    margin-top: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.ps-design-own-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: none;
    background: #fafafa;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-design-own-toggle:hover {
    background: #f1f5f9;
    color: #475569;
}

.ps-design-own-toggle svg {
    transition: transform 0.3s ease;
}

.ps-design-own-accordion.expanded .ps-design-own-toggle svg {
    transform: rotate(180deg);
}

.ps-design-own-content {
    display: none;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

.ps-design-own-accordion.expanded .ps-design-own-content {
    display: block;
}

/* --- Collection Password Gate --- */
.printsprout-collection-gate {
    max-width: 520px;
    margin: 48px auto;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.printsprout-collection-gate h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
    line-height: 1.25;
}

.printsprout-collection-gate p {
    margin: 0 0 16px;
}

.printsprout-collection-gate__hint {
    padding: 12px 14px;
    border-left: 4px solid #0f766e;
    background: #f0fdfa;
    color: #134e4a;
}

.printsprout-collection-gate__error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-left: 4px solid #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.printsprout-collection-gate__form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.printsprout-collection-gate__fields {
    display: flex;
    gap: 10px;
}

.printsprout-collection-gate__fields input {
    flex: 1 1 auto;
    min-width: 0;
}

.printsprout-collection-gate__fields button {
    flex: 0 0 auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .ps-template-gallery-container {
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
    }

    .ps-template-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .ps-template-gallery-footer {
        flex-direction: column;
        gap: 12px;
    }

    .ps-selection-summary {
        flex-direction: column;
        gap: 8px;
    }

    .ps-template-gallery-confirm {
        width: 100%;
    }

    .printsprout-collection-gate {
        margin: 32px 0;
        padding: 20px;
    }

    .printsprout-collection-gate__fields {
        flex-direction: column;
    }

    .printsprout-collection-gate__fields button {
        width: 100%;
    }
}
