/* Import Montserrat font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
    /* Elementor color variables */
    --e-global-color-primary: #4883C2;
    --e-global-color-secondary: #FFFFFF;
    --e-global-color-text: #FFFFFF;
    --e-global-color-accent: #03A1ED;
    --e-global-color-4580325: #222222;
    --e-global-color-cf40f79: #5B2D00;
    --e-global-color-a0a5785: #EEB883;
    --e-global-color-fc893d2: #003853;
    --e-global-color-b97de7c: #96CEE9;
    
    /* Typography */
    --e-global-typography-primary-font-family: "Montserrat", Sans-serif;
    --e-global-typography-primary-font-size: 48px;
    --e-global-typography-primary-font-weight: 700;
    --e-global-typography-secondary-font-family: "Montserrat", Sans-serif;
    --e-global-typography-secondary-font-size: 24px;
    --e-global-typography-secondary-font-weight: 700;
    --e-global-typography-text-font-family: "Montserrat", Sans-serif;
    --e-global-typography-text-font-size: 16px;
    --e-global-typography-text-font-weight: 400;
    --e-global-typography-accent-font-family: "Montserrat", Sans-serif;
    --e-global-typography-accent-font-size: 16px;
    --e-global-typography-accent-font-weight: 700;
    
    /* Plugin specific variables */
    --rsc-bg: #FFFFFF;
    --rsc-panel-bg: #FFFFFF;
    --rsc-border: #E5E7EB;
    --rsc-border-hover: #D1D5DB;
    --rsc-radius: 12px;
    --rsc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --rsc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --rsc-text-primary: #222222;
    --rsc-text-secondary: #6B7280;
    --rsc-text-muted: #9CA3AF;
}

.rsc-app {
    margin: 0px 0;
    padding: 0;
    background: var(--rsc-bg);
    border-radius: var(--rsc-radius);
    box-shadow: var(--rsc-shadow-lg);
    font-family: var(--e-global-typography-text-font-family);
    font-size: var(--e-global-typography-text-font-size);
    font-weight: var(--e-global-typography-text-font-weight);
    color: var(--rsc-text-primary);
    overflow: hidden;
    /* Mobile optimizations */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* On mobile, allow app to overflow so sticky positioning works */
@media (max-width: 480px) {
    .rsc-app {
        overflow: visible;
    }
}

.rsc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 0;
    align-items: stretch;
    position: relative;
}

/* On mobile, ensure layout doesn't block sticky positioning */
@media (max-width: 480px) {
    .rsc-layout {
        overflow: visible;
        /* Ensure layout itself doesn't create scroll context */
        position: relative;
    }
}

.rsc-preview {
    background: var(--rsc-panel-bg);
    padding: 24px;
    border-right: 1px solid var(--rsc-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    min-height: 500px;
    grid-column: 1;
    grid-row: 1;
    overflow: hidden; /* Ensure crop modal stays within preview */
}

.rsc-canvas-container {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 500px;
    overflow: hidden;
    border-radius: calc(var(--rsc-radius) - 4px);
    background: repeating-conic-gradient(#E5E7EB 0deg 90deg, #F9FAFB 90deg 180deg);
    background-size: 20px 20px;
    border: 2px solid var(--rsc-border);
    box-shadow: var(--rsc-shadow);
}

/* On mobile, override position for sticky - moved to mobile media query below */

.rsc-canvas {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
    position: relative;
}

/* Zorg dat de snijlijn altijd dezelfde dikte heeft, ongeacht het formaat */
#rsc-cut-path {
    stroke-width: 1px !important;
    vector-effect: non-scaling-stroke;
}

/* Section header with controls */
.rsc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rsc-section-header h3 {
    margin: 0;
    flex: 1;
}

.rsc-shape-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Shape control buttons (orientation and fit toggle) */
.rsc-btn-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    display: none !important;
    color: var(--rsc-text-primary) !important;
}

.rsc-btn-icon .rsc-icon {
    margin-right: 0 !important;
    width: 18px;
    height: 18px;
    display: inline-block;
    color: inherit;
    flex-shrink: 0;
    overflow: hidden;
}

.rsc-btn-icon .rsc-icon svg {
    transition: transform 0.2s ease;
    width: 100% !important;
    height: 100% !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block;
    fill: currentColor;
    stroke: currentColor;
    color: inherit;
    overflow: visible;
    box-sizing: border-box;
}

.rsc-btn-icon[data-orientation="horizontal"] .rsc-icon svg {
    transform: rotate(90deg);
}

#rsc-selection-canvas {
    border-radius: calc(var(--rsc-radius) - 4px);
    cursor: crosshair;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.27) !important;
    opacity: 1;
    touch-action: pan-y; /* Allow vertical scrolling by default */
}

/* When in brush mode, prevent scrolling to allow drawing */
.rsc-app.rsc-brush-mode-active #rsc-selection-canvas {
    touch-action: none;
}

.rsc-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Roterende gradient border animatie voor upload button wanneer er nog geen ontwerp is */
@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes rsc-rotate-gradient {
    to {
        --angle: 360deg;
    }
}

.rsc-upload-pulse label.rsc-btn-secondary {
    border: 3px solid transparent !important;
    border-radius: 8px;
    position: relative;
    background: var(--rsc-panel-bg) !important;
    background-clip: padding-box;
    /* Overschrijf algemene button styles */
    background-color: transparent !important;
    isolation: isolate;
}

.rsc-upload-pulse label.rsc-btn-secondary::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 8px;
    padding: 3px;
    background: conic-gradient(from var(--angle), cyan, #0066cc, cyan, cyan);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: rsc-rotate-gradient 3s linear infinite;
    z-index: -1;
}

.rsc-upload-pulse label.rsc-btn-secondary:hover {
    background: #F9FAFB !important;
    background-clip: padding-box;
    border-color: transparent !important;
    background-color: transparent !important;
}

.rsc-upload-pulse label.rsc-btn-secondary:hover::before {
    background: conic-gradient(from var(--angle), cyan, #0066cc, cyan, cyan);
}


.rsc-controls {
    background: var(--rsc-panel-bg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    overflow-y: auto;
    position: relative;
    grid-column: 2;
    grid-row: 1;
    border-right: 1px solid var(--rsc-border);
}

.rsc-sidebar {
    background: var(--rsc-panel-bg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    overflow-y: auto;
    position: relative;
    grid-column: 3;
    grid-row: 1;
}

.rsc-controls.hidden {
    display: none !important;
}

.rsc-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rsc-section h3 {
    margin: 0;
    font-family: var(--e-global-typography-accent-font-family);
    font-size: 14px;
    font-weight: var(--e-global-typography-accent-font-weight);
    color: #222222 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rsc-button-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

button.rsc-qty-row.is-active span {
    color: #fff !important;
}

/* Aantal opties in 2 kolommen */
#rsc-qty-options.rsc-button-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Modern quantity row styling (StickerApp-style) */
.rsc-qty-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 12px 16px !important;
    background: var(--rsc-panel-bg) !important;
    border: 2px solid var(--rsc-border) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: left !important;
    width: 100% !important;
    min-height: auto !important;
    gap: 6px !important;
    position: relative;
    overflow: hidden;
}

.rsc-qty-row:hover {
    background: #F9FAFB !important;
    border-color: var(--e-global-color-primary) !important;
    transform: translateY(-1px);
    box-shadow: var(--rsc-shadow);
}

/* Wanneer button actief is, border verwijderen zodat ribbon zichtbaar blijft */
.rsc-qty-row.is-active,
.rsc-app button.rsc-qty-row.is-active,
.rsc-app [type="button"].rsc-qty-row.is-active,
.rsc-app .rsc-btn-toggle.rsc-qty-row.is-active {
    background: var(--e-global-color-primary) !important;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: 2px solid var(--e-global-color-primary);
    outline-offset: -2px;
    /* Geen scale transform om ribbon positionering stabiel te houden */
}

/* Zorg dat tekst wit is op actieve quantity button */
.rsc-qty-row.is-active .rsc-qty-amount,
.rsc-qty-row.is-active .rsc-qty-price,
.rsc-qty-row.is-active .rsc-qty-price-per-piece {
    color: #fff !important;
}

.rsc-qty-amount {
    font-weight: 600;
    color: var(--rsc-text-primary);
    font-size: 14px;
    width: 100%;
}

.rsc-qty-price {
    font-weight: 700;
    color: var(--rsc-text-primary);
    font-size: 18px;
    width: 100%;
}

.rsc-qty-price-per-piece {
    font-weight: 400;
    color: #666;
    font-size: 11px;
    width: 100%;
    margin-top: 2px;
}

/* Ribbon voor korting - diagonaal rechtsboven */
.rsc-qty-ribbon {
    position: absolute;
    top: 10px;
    right: -30px;
    background: #10B981;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    padding: 3px 38px;
    transform: rotate(45deg);
    transform-origin: center;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
}

/* Compenseer voor verdwijnen border (2px) wanneer button actief is */
.rsc-qty-row.is-active .rsc-qty-ribbon {
    top: 12px;
    right: -28px;
}


/* Ensure all buttons in button-group have consistent styling */
.rsc-button-group .rsc-btn-toggle {
    width: 100%;
}

/* Override Elementor reset.css button styles */
.rsc-app button,
.rsc-app [type="button"],
.rsc-app [type="submit"],
.rsc-app input[type="button"],
.rsc-app input[type="submit"],
.rsc-app .rsc-btn,
.rsc-app .rsc-btn-toggle {
    background-color: var(--rsc-panel-bg) !important;
    border: 2px solid var(--rsc-border) !important;
    border-radius: 8px !important;
    color: var(--rsc-text-primary) !important;
    padding: 10px 18px !important;
    font-family: var(--e-global-typography-text-font-family) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0px !important;
    min-height: 44px !important;
    text-align: center !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.rsc-btn,
.rsc-btn-toggle {
    border-radius: 8px;
    border: 2px solid var(--rsc-border);
    padding: 10px 18px;
    font-family: var(--e-global-typography-text-font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--rsc-panel-bg);
    color: var(--rsc-text-primary);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    text-align: center;
    white-space: nowrap;
}

/* Override Elementor reset.css button hover styles */
.rsc-app button:hover,
.rsc-app [type="button"]:hover,
.rsc-app [type="submit"]:hover,
.rsc-app input[type="button"]:hover,
.rsc-app input[type="submit"]:hover,
.rsc-app .rsc-btn:hover,
.rsc-app .rsc-btn-toggle:hover {
    background-color: #F9FAFB !important;
    border-color: var(--e-global-color-primary) !important;
    color: var(--rsc-text-primary) !important;
    text-decoration: none !important;
}

.rsc-btn:hover,
.rsc-btn-toggle:hover {
    background: #F9FAFB;
    border-color: var(--e-global-color-primary);
    color: var(--rsc-text-primary) !important;
    transform: translateY(-1px);
    box-shadow: var(--rsc-shadow);
}

.rsc-btn:active,
.rsc-btn-toggle:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Override Elementor reset.css for active buttons */
.rsc-app button.is-active,
.rsc-app [type="button"].is-active,
.rsc-app .rsc-btn-toggle.is-active {
    background-color: var(--e-global-color-primary) !important;
    border-color: var(--e-global-color-primary) !important;
    color: var(--e-global-color-secondary) !important;
}

.rsc-btn-toggle.is-active {
    background: var(--e-global-color-primary);
    border-color: var(--e-global-color-primary);
    color: var(--e-global-color-secondary);
    box-shadow: 0 2px 4px rgba(72, 131, 194, 0.2);
}

.rsc-app button.is-active:hover,
.rsc-app [type="button"].is-active:hover,
.rsc-app .rsc-btn-toggle.is-active:hover {
    background-color: #4176AF !important;
    border-color: #4176AF !important;
    color: var(--e-global-color-secondary) !important;
}

.rsc-btn-toggle.is-active:hover {
    background: #4176AF;
    border-color: #4176AF;
    color: var(--e-global-color-secondary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(72, 131, 194, 0.3);
}

/* Style 2: grayed-out unavailable options (visible but not selectable) */
.rsc-app button.is-disabled,
.rsc-app [type="button"].is-disabled,
.rsc-app .rsc-btn-toggle.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.rsc-btn-toggle.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Override Elementor reset.css for primary buttons */
.rsc-app button.rsc-btn-primary,
.rsc-app [type="button"].rsc-btn-primary,
.rsc-app [type="submit"].rsc-btn-primary {
    background-color: var(--e-global-color-primary) !important;
    border-color: var(--e-global-color-primary) !important;
    color: var(--e-global-color-secondary) !important;
}

.rsc-btn-primary {
    background: var(--e-global-color-primary);
    border-color: var(--e-global-color-primary);
    color: var(--e-global-color-secondary);
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(72, 131, 194, 0.2);
}

.rsc-app button.rsc-btn-primary:hover,
.rsc-app [type="button"].rsc-btn-primary:hover,
.rsc-app [type="submit"].rsc-btn-primary:hover {
    background-color: #4176AF !important;
    border-color: #4176AF !important;
    color: var(--e-global-color-secondary) !important;
}

.rsc-btn-primary:hover {
    background: #4176AF;
    border-color: #4176AF;
    box-shadow: 0 4px 6px rgba(72, 131, 194, 0.3);
}

/* Override Elementor reset.css for secondary buttons */
.rsc-app button.rsc-btn-secondary,
.rsc-app [type="button"].rsc-btn-secondary {
    background-color: var(--rsc-panel-bg) !important;
    border-color: var(--rsc-border) !important;
    color: var(--rsc-text-primary) !important;
}

.rsc-btn-secondary {
    background: var(--rsc-panel-bg);
    border-color: var(--rsc-border);
    color: var(--rsc-text-primary);
    font-weight: 600;
}

.rsc-app button.rsc-btn-secondary:hover,
.rsc-app [type="button"].rsc-btn-secondary:hover {
    background-color: #F9FAFB !important;
    border-color: var(--e-global-color-primary) !important;
    color: var(--rsc-text-primary) !important;
}

.rsc-btn-secondary:hover {
    background: #F9FAFB;
    border-color: var(--e-global-color-primary);
    color: var(--rsc-text-primary) !important;
}

.rsc-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

.rsc-actual-size {
    margin-top: 12px;
    padding: 8px 12px;
    background: #F0FDF4;
    border-radius: 6px;
    font-size: 14px;
    color: #166534;
    font-weight: 700;
}

.rsc-actual-size #rsc-actual-size-value {
    color: #15803D;
}

.rsc-size-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

/* Ensure all buttons in size-grid have same styling as button-group */
.rsc-size-grid .rsc-btn-toggle {
    width: 100%;
}

.rsc-size-grid .rsc-btn-toggle:hover {
    color: var(--rsc-text-primary) !important;
}

.rsc-size-custom {
    margin-top: 12px;
    display: none;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
}

.rsc-size-custom.active {
    display: grid;
}

.rsc-size-custom label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: var(--rsc-text-secondary);
    font-weight: 600;
    gap: 6px;
}

.rsc-size-custom input,
.rsc-qty-custom input {
    border-radius: 8px;
    border: 2px solid var(--rsc-border);
    padding: 10px 14px;
    font-family: var(--e-global-typography-text-font-family);
    font-size: 14px;
    width: 100%;
    transition: all 0.2s ease;
    background: var(--rsc-panel-bg);
    color: var(--rsc-text-primary);
}

.rsc-size-custom input:focus,
.rsc-qty-custom input:focus {
    outline: none;
    border-color: var(--e-global-color-primary);
    box-shadow: 0 0 0 3px rgba(72, 131, 194, 0.1);
}

.rsc-qty-custom {
    margin-top: 12px;
    display: none;
}

.rsc-qty-custom.active {
    display: block;
}

.rsc-qty-custom label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: var(--rsc-text-secondary);
    font-weight: 600;
    gap: 6px;
}

/* Special deal comparison (grayed price + % banner) */
.rsc-deal-comparison {
    margin-top: 12px;
    margin-bottom: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rsc-deal-comparison-price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
}

.rsc-deal-comparison-label,
.rsc-deal-comparison-value {
    color: var(--rsc-text-muted, #6b7280);
}

.rsc-deal-comparison-value {
    font-weight: 600;
}

.rsc-deal-banner {
    width: 100%;
    padding: 10px 14px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: #059669;
    border-radius: 8px;
    box-sizing: border-box;
}

.rsc-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid var(--rsc-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rsc-price-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rsc-price-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.rsc-price-label {
    font-family: var(--e-global-typography-accent-font-family);
    font-size: 16px;
    font-weight: var(--e-global-typography-accent-font-weight);
    color: var(--rsc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rsc-price-value {
    font-family: var(--e-global-typography-secondary-font-family);
    font-size: 32px;
    font-weight: var(--e-global-typography-secondary-font-weight);
    color: var(--e-global-color-primary);
}

.rsc-price-meta {
    font-size: 13px;
    color: var(--rsc-text-muted);
    text-align: right;
}

.rsc-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.rsc-download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rsc-download-buttons .rsc-btn {
    flex: 0 0 auto;
    min-width: auto;
}

.rsc-footer-actions .rsc-btn {
    flex: 1;
    min-width: 120px;
}

/* Brush controls footer actions - confirm above cancel */
.rsc-brush-controls .rsc-footer-actions {
    flex-direction: column;
}

.rsc-brush-controls .rsc-footer-actions .rsc-btn {
    width: 100%;
}

/* SVG icons styling */
.rsc-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    line-height: 1;
}

.rsc-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.rsc-crop-modal-close .rsc-icon {
    margin-right: 0;
}

/* Input file label styling */
.rsc-upload label.rsc-btn {
    width: 100%;
    justify-content: center;
}

/* Hide file input */
.rsc-upload input[type="file"] {
    display: none;
}

/* Hidden buttons */
.rsc-btn-hidden {
    display: none !important;
}

.rsc-btn-hidden.active {
    display: inline-flex !important;
}

/* Disabled button state */
.rsc-btn:disabled,
.rsc-btn-secondary:disabled,
.rsc-app button:disabled,
.rsc-app [type="button"]:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background-color: #F3F4F6 !important;
    border-color: #D1D5DB !important;
    color: #9CA3AF !important;
}

.rsc-btn:disabled:hover,
.rsc-btn-secondary:disabled:hover,
.rsc-app button:disabled:hover,
.rsc-app [type="button"]:disabled:hover {
    background-color: #F3F4F6 !important;
    border-color: #D1D5DB !important;
    color: #9CA3AF !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Slider controls */
.rsc-slider-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rsc-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #E5E7EB;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.rsc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--e-global-color-primary);
    cursor: pointer;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rsc-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--e-global-color-primary);
    cursor: pointer;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rsc-slider-display {
    text-align: center;
    font-weight: 600;
    color: var(--rsc-text-primary);
    font-size: 14px;
}

.rsc-brush-controls .rsc-slider-display {
    color: var(--e-global-color-primary);
}

/* Zwarte opacity layer over de hele editor wanneer "Selecteer gebied" actief is */
.rsc-app.rsc-brush-mode-active {
    position: relative;
}

.rsc-app.rsc-brush-mode-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 5;
    pointer-events: none;
}

/* Canvas en brush controls moeten boven de overlay blijven en klikbaar zijn */
.rsc-app.rsc-brush-mode-active .rsc-preview {
    position: relative;
    z-index: 10;
    pointer-events: auto; /* Zorg dat canvas klikbaar blijft voor tekenen */
}

/* On mobile, ensure preview container is above header when brush mode is active */
@media (max-width: 480px) {
    .rsc-app.rsc-brush-mode-active .rsc-preview {
        z-index: 1002 !important;
    }
    
    .rsc-app.rsc-brush-mode-active .rsc-canvas-container {
        z-index: 1003 !important;
    }
}

.rsc-app.rsc-brush-mode-active .rsc-preview .rsc-canvas-container,
.rsc-app.rsc-brush-mode-active .rsc-preview .rsc-selection-canvas {
    pointer-events: auto; /* Canvas moet klikbaar blijven */
}

.rsc-app.rsc-brush-mode-active .rsc-brush-controls {
    position: relative;
    z-index: 20 !important; /* Hoger dan overlay (5) en andere elementen (10) */
    pointer-events: auto !important; /* Zorg dat brush controls klikbaar blijven */
}

/* Zorg dat alle child elements van brush controls ook klikbaar zijn */
.rsc-app.rsc-brush-mode-active .rsc-brush-controls * {
    pointer-events: auto !important;
}

/* Maak alle andere elementen niet klikbaar en grayed out */
.rsc-app.rsc-brush-mode-active .rsc-controls,
.rsc-app.rsc-brush-mode-active .rsc-sidebar {
    pointer-events: none;
}

/* Upload buttons ook grayed out maken */
.rsc-app.rsc-brush-mode-active .rsc-upload {
    pointer-events: none;
    opacity: 0.5; /* Grayed out effect */
}

.rsc-app.rsc-brush-mode-active .rsc-upload label.rsc-btn-secondary,
.rsc-app.rsc-brush-mode-active .rsc-upload button.rsc-btn-secondary {
    opacity: 0.5;
    cursor: not-allowed !important;
}


/* Selection canvas */
.rsc-selection-canvas {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10;
}

.rsc-selection-canvas.active {
    display: block;
    pointer-events: auto;
}

/* Cutline overlay - always visible above selection canvas */
.rsc-cutline-overlay {
    display: none;
    position: absolute;
    pointer-events: none;
    z-index: 11; /* Above selection canvas (10) */
}

.rsc-selection-canvas.active ~ .rsc-cutline-overlay {
    display: block;
}



/* Brush controls styling - replaces controls panel */
.rsc-brush-controls {
    display: none;
    position: relative;
    grid-column: 2;
    grid-row: 1;
    background: var(--rsc-panel-bg);
    padding: 24px;
    flex-direction: column;
    gap: 24px;
    max-height: 100vh;
    overflow-y: auto;
    border-left: 4px solid var(--e-global-color-primary);
    box-shadow: -4px 0 12px rgba(72, 131, 194, 0.15);
    z-index: 10;
    isolation: isolate; /* Creëer een nieuwe stacking context */
}

.rsc-brush-controls.active {
    display: flex !important;
}

.rsc-brush-controls-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    height: 100%;
}

.rsc-brush-controls .rsc-section h3 {
    color: var(--e-global-color-primary);
    font-weight: 700;
}

.rsc-brush-control-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rsc-brush-label {
    font-family: var(--e-global-typography-accent-font-family);
    font-size: 13px;
    font-weight: var(--e-global-typography-accent-font-weight);
    color: var(--rsc-text-primary);
    min-width: 100px;
    flex-shrink: 0;
}

.rsc-brush-shape-group {
    flex: 1;
}

.rsc-brush-shape-group .rsc-btn {
    flex: 1;
    min-width: 0;
}

.rsc-brush-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    width: 100%;
    margin-top: 8px;
}

.rsc-btn-size {
    min-width: 44px;
    padding: 10px;
    font-size: 18px;
    font-weight: 700;
}

.rsc-brush-size-display {
    min-width: 50px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--rsc-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsc-btn-full {
    width: 100%;
    margin-top: 4px;
}

/* Responsive design */
@media (max-width: 900px) {
    .rsc-app {
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .rsc-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }
    
    .rsc-preview {
        border-right: none;
        border-bottom: 1px solid var(--rsc-border);
        padding: 16px;
        min-height: auto;
        grid-column: 1;
        grid-row: 1;
    }
    
    .rsc-controls {
        max-height: none;
        height: auto;
        overflow-y: visible;
        padding: 16px;
        grid-column: 1;
        grid-row: 2;
        border-right: none;
        border-bottom: 1px solid var(--rsc-border);
    }

    .rsc-sidebar {
        max-height: none;
        padding: 16px;
        grid-column: 1;
        grid-row: 3;
    }
    
    .rsc-brush-controls {
        padding: 16px;
        grid-column: 1;
        grid-row: 2;
    }
    
    .rsc-canvas {
        max-height: 400px;
    }
    
    .rsc-footer-actions {
        flex-direction: column;
    }
    
    .rsc-footer-actions .rsc-btn {
        width: 100%;
    }
}

/* Tablet and smaller */
@media (max-width: 768px) {
    .rsc-app {
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .rsc-layout {
        grid-template-rows: auto auto;
    }
    
    .rsc-preview {
        grid-column: 1;
        grid-row: 1;
    }
    
    .rsc-controls,
    .rsc-brush-controls {
        grid-column: 1;
        grid-row: 2;
    }
    
    .rsc-preview,
    .rsc-controls,
    .rsc-brush-controls {
        padding: 12px;
        gap: 16px;
    }
    
    .rsc-section {
        gap: 10px;
    }
    
    .rsc-canvas {
        max-height: 350px;
    }
    
    .rsc-btn,
    .rsc-btn-toggle {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 48px;
    }
    
    .rsc-size-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .rsc-button-group {
        gap: 6px;
    }
    
    .rsc-price-value {
        font-size: 28px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .rsc-app {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        /* Prevent text selection on mobile for better UX */
        -webkit-user-select: none;
        user-select: none;
    }
    
    .rsc-layout {
        grid-template-rows: auto auto auto;
        /* Better scrolling on mobile - remove overflow from layout, let body scroll */
        overflow: visible;
    }
    
    .rsc-preview {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: visible;
    }
    
    .rsc-controls,
    .rsc-brush-controls {
        grid-column: 1;
        grid-row: 2;
        /* Remove scrolling - let it flow naturally */
        overflow-y: visible;
        overflow-x: visible;
        height: auto;
        min-height: auto;
        max-height: none;
    }

    .rsc-sidebar {
        grid-column: 1;
        grid-row: 3;
        /* Remove scrolling - let it flow naturally */
        overflow-y: visible;
        overflow-x: visible;
        height: auto;
        min-height: auto;
        max-height: none;
        /* Ensure footer is positioned correctly for sticky canvas stop */
        position: relative;
        z-index: 5;
    }
    
    .rsc-preview,
    .rsc-controls,
    .rsc-brush-controls {
        padding: 16px;
        gap: 16px;
    }
    
    .rsc-section {
        gap: 12px;
    }
    
    .rsc-section h3 {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 8px;
    }
    
    /* Make canvas sticky on mobile - but not the upload buttons */
    .rsc-upload {
        position: relative;
        z-index: 1;
        flex-shrink: 0;
    }
    
    .rsc-canvas-container {
        position: relative;
        width: 100%;
        margin-bottom: 0;
    }
    
    /* Make original canvas sticky when it goes out of view */
    .rsc-canvas-container.sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--rsc-bg);
        border-bottom: 2px solid var(--rsc-border);
        padding: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        max-width: 100%;
        margin: 0 auto;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    
    /* When brush mode is active, ensure sticky canvas is above header */
    .rsc-app.rsc-brush-mode-active .rsc-canvas-container.sticky {
        z-index: 1001 !important;
    }
    
    .rsc-canvas-container.sticky.hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-100%);
    }
    
    /* Placeholder to prevent layout shift when canvas becomes sticky */
    .rsc-canvas-placeholder {
        display: none;
        height: 0;
    }
    
    .rsc-canvas-container.sticky ~ .rsc-canvas-placeholder,
    .rsc-canvas-placeholder.active {
        display: block;
        height: auto;
        min-height: 250px;
    }
    
    .rsc-canvas {
        max-height: 40vh;
        min-height: 250px;
        border-radius: 8px;
        /* Allow scrolling on mobile, but prevent default touch behaviors that interfere */
        touch-action: pan-y;
    }
    
    /* When in brush mode, prevent scrolling to allow drawing */
    .rsc-app.rsc-brush-mode-active .rsc-canvas {
        touch-action: none;
    }
    
    .rsc-canvas-container.sticky .rsc-canvas {
        max-height: 40vh;
        min-height: 200px;
    }
    
    .rsc-sidebar .rsc-footer {
        position: relative;
        z-index: 10;
        background: var(--rsc-bg);
    }
    
    .rsc-btn,
    .rsc-btn-toggle {
        padding: 14px 18px;
        font-size: 15px;
        min-height: 48px; /* Larger tap target for mobile */
        border-radius: 8px;
        /* Better touch feedback */
        -webkit-tap-highlight-color: rgba(72, 131, 194, 0.2);
        touch-action: manipulation;
    }
    
    .rsc-size-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    
    .rsc-button-group {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .rsc-button-group .rsc-btn-toggle {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        font-size: 13px;
        padding: 12px 14px;
        min-height: 48px;
    }
    
    .rsc-price-value {
        font-size: 28px;
        font-weight: 700;
    }
    
    .rsc-price-label {
        font-size: 15px;
    }
    
    .rsc-upload {
        gap: 12px;
    }
    
    .rsc-upload .rsc-btn {
        width: 100%;
        justify-content: center;
        min-height: 52px; /* Extra large for primary action */
        font-size: 16px;
        font-weight: 700;
    }
    
    .rsc-brush-controls .rsc-section {
        gap: 12px;
    }
    
    .rsc-brush-control-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .rsc-brush-label {
        min-width: auto;
        width: 100%;
        font-size: 14px;
    }
    
    .rsc-brush-shape-group {
        width: 100%;
        gap: 8px;
    }
    
    .rsc-brush-shape-group .rsc-btn-toggle {
        flex: 1 1 calc(50% - 4px);
        min-height: 48px;
    }
    
    .rsc-brush-size-controls {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Better slider controls for mobile */
    .rsc-slider {
        width: 100%;
        height: 44px; /* Larger touch target */
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
        cursor: pointer;
    }
    
    .rsc-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        -webkit-appearance: none;
        appearance: none;
        background: var(--e-global-color-primary);
        border-radius: 50%;
        cursor: pointer;
        margin-top: -8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .rsc-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
        border: none;
        border-radius: 50%;
        background: var(--e-global-color-primary);
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .rsc-size-custom {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .rsc-size-custom input {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 16px;
    }
    
    .rsc-footer {
        padding-top: 20px;
        padding-bottom: env(safe-area-inset-bottom, 20px); /* Safe area for notched devices */
        /* Sticky footer on mobile for easy access */
        position: sticky;
        bottom: 0;
        background: var(--rsc-bg);
        z-index: 10;
        border-top: 2px solid var(--rsc-border);
        margin-top: 20px;
    }
    
    .rsc-footer-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .rsc-footer-actions .rsc-btn {
        width: 100%;
        min-height: 52px;
        font-size: 16px;
        font-weight: 700;
    }
    
    /* Better quantity selection on mobile */
    .rsc-qty-row {
        min-height: 60px;
        padding: 14px;
    }
    
    .rsc-qty-amount {
        font-size: 15px;
    }
    
    .rsc-qty-price {
        font-size: 20px;
    }
    
    /* Improve file input on mobile */
    .rsc-upload label {
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better spacing for material/finish options */
    .rsc-material-options,
    .rsc-finish-options {
        gap: 10px;
    }
    
    .rsc-material-options .rsc-btn-toggle,
    .rsc-finish-options .rsc-btn-toggle {
        min-height: 48px;
        font-size: 14px;
    }
    
}

/* Very small phones */
@media (max-width: 360px) {
    .rsc-layout {
        grid-template-rows: auto auto auto;
    }
    
    .rsc-preview {
        grid-column: 1;
        grid-row: 1;
    }
    
    .rsc-controls,
    .rsc-brush-controls {
        grid-column: 1;
        grid-row: 2;
    }

    .rsc-sidebar {
        grid-column: 1;
        grid-row: 3;
    }
    
    .rsc-preview,
    .rsc-controls,
    .rsc-brush-controls,
    .rsc-sidebar {
        padding: 10px;
    }
    
    .rsc-canvas {
        max-height: 250px;
    }
    
    .rsc-btn,
    .rsc-btn-toggle {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 40px;
    }
    
    .rsc-size-grid {
        grid-template-columns: 1fr;
    }
    
    .rsc-price-value {
        font-size: 20px;
    }
}

/* Smooth transitions for all interactive elements */
.rsc-btn,
.rsc-btn-toggle,
.rsc-size-custom input,
.rsc-qty-custom input {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Better scrolling indicators */
    .rsc-controls,
    .rsc-brush-controls,
    .rsc-sidebar {
        scrollbar-width: thin;
        scrollbar-color: var(--rsc-border) transparent;
    }
    
    .rsc-controls::-webkit-scrollbar,
    .rsc-brush-controls::-webkit-scrollbar,
    .rsc-sidebar::-webkit-scrollbar {
        width: 6px;
    }
    
    .rsc-controls::-webkit-scrollbar-thumb,
    .rsc-brush-controls::-webkit-scrollbar-thumb,
    .rsc-sidebar::-webkit-scrollbar-thumb {
        background: var(--rsc-border);
        border-radius: 3px;
    }
    
    /* Prevent zoom on input focus (iOS) */
    .rsc-size-custom input,
    .rsc-qty-custom input {
        font-size: 16px !important;
    }
    
    /* Better touch feedback for interactive elements */
    .rsc-btn:active,
    .rsc-btn-toggle:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Improve file input visibility on mobile */
    .rsc-upload input[type="file"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better spacing for touch targets */
    .rsc-section {
        margin-bottom: 16px;
    }
    
    /* Improve canvas touch interaction */
    #rsc-selection-canvas {
        touch-action: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Better scrolling indicators */
    .rsc-controls,
    .rsc-brush-controls,
    .rsc-sidebar {
        scrollbar-width: thin;
        scrollbar-color: var(--rsc-border) transparent;
    }
    
    .rsc-controls::-webkit-scrollbar,
    .rsc-brush-controls::-webkit-scrollbar,
    .rsc-sidebar::-webkit-scrollbar {
        width: 6px;
    }
    
    .rsc-controls::-webkit-scrollbar-thumb,
    .rsc-brush-controls::-webkit-scrollbar-thumb,
    .rsc-sidebar::-webkit-scrollbar-thumb {
        background: var(--rsc-border);
        border-radius: 3px;
    }
    
    /* Prevent zoom on input focus (iOS) */
    .rsc-size-custom input,
    .rsc-qty-custom input {
        font-size: 16px !important;
    }
    
    /* Better touch feedback for interactive elements */
    .rsc-btn:active,
    .rsc-btn-toggle:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Improve file input visibility on mobile */
    .rsc-upload input[type="file"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Focus states for accessibility */
.rsc-btn:focus-visible,
.rsc-btn-toggle:focus-visible {
    outline: 2px solid var(--e-global-color-accent);
    outline-offset: 2px;
}

/* Loading state animation */
.rsc-btn.is-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress overlay for background removal */
.rsc-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: calc(var(--rsc-radius) - 4px);
}

.rsc-progress-content {
    text-align: center;
    max-width: 300px;
    padding: 24px;
}

.rsc-progress-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--rsc-border);
    border-top-color: var(--e-global-color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.rsc-progress-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--rsc-text-primary);
    margin-bottom: 16px;
}

.rsc-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--rsc-border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.rsc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--e-global-color-primary), #4883C2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Crop Modal Styles */
.rsc-crop-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 10000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}

.rsc-crop-modal-content {
    background: var(--rsc-bg);
    border-radius: var(--rsc-radius);
    box-shadow: var(--rsc-shadow-lg);
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rsc-crop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--rsc-border);
}

.rsc-crop-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--rsc-text-primary);
}

.rsc-crop-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--rsc-text-secondary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.rsc-crop-modal-close:hover {
    color: var(--rsc-text-primary);
}

.rsc-crop-container {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    touch-action: pan-y; /* Allow vertical scrolling, but prevent during crop interaction */
}

.rsc-crop-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    object-fit: contain;
}

.rsc-crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: move;
}

/* Cursor styles for resize areas */
.rsc-crop-overlay[data-resize="nw"] {
    cursor: nw-resize;
}

.rsc-crop-overlay[data-resize="ne"] {
    cursor: ne-resize;
}

.rsc-crop-overlay[data-resize="sw"] {
    cursor: sw-resize;
}

.rsc-crop-overlay[data-resize="se"] {
    cursor: se-resize;
}

.rsc-crop-overlay[data-resize="n"] {
    cursor: n-resize;
}

.rsc-crop-overlay[data-resize="s"] {
    cursor: s-resize;
}

.rsc-crop-overlay[data-resize="w"] {
    cursor: w-resize;
}

.rsc-crop-overlay[data-resize="e"] {
    cursor: e-resize;
}

.rsc-crop-box {
    position: absolute;
    border: 2px solid var(--e-global-color-primary);
    background: rgba(72, 131, 194, 0.1);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
}

.rsc-crop-box::before,
.rsc-crop-box::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--e-global-color-primary);
    background: var(--rsc-bg);
    cursor:se-resize !important;
}

.rsc-crop-box::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.rsc-crop-box::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.rsc-crop-box .rsc-crop-handle {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid var(--e-global-color-primary);
    background: var(--rsc-bg);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rsc-crop-box .rsc-crop-handle.nw {
    top: -12px;
    left: -12px;
    cursor: nw-resize;
}

.rsc-crop-box .rsc-crop-handle.ne {
    top: -12px;
    right: -12px;
    cursor: ne-resize;
}

.rsc-crop-box .rsc-crop-handle.sw {
    bottom: -12px;
    left: -12px;
    cursor: sw-resize;
}

.rsc-crop-box .rsc-crop-handle.se {
    bottom: -12px;
    right: -12px;
    cursor: se-resize;
}

.rsc-crop-box .rsc-crop-handle.n {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.rsc-crop-box .rsc-crop-handle.s {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.rsc-crop-box .rsc-crop-handle.w {
    top: 50%;
    left: -12px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.rsc-crop-box .rsc-crop-handle.e {
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
    cursor: e-resize;
}

.rsc-crop-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--rsc-border);
    justify-content: flex-end;
}

.rsc-crop-modal-footer .rsc-btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .rsc-crop-modal {
        padding: 0;
    }
    
    .rsc-crop-modal-content {
        max-width: 100vw;
        max-height: 100vh;
        height: 100vh;
    }
    
    .rsc-crop-modal-header {
        padding: 16px;
        flex-shrink: 0;
    }
    
    .rsc-crop-container {
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .rsc-crop-container img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .rsc-crop-modal-footer {
        flex-direction: column;
        flex-shrink: 0;
        padding: 16px;
    }
    
    .rsc-crop-modal-footer .rsc-btn {
        width: 100%;
    }
}
