/* Frontend Styles - Mobile First */

/* Hide Merchant buy now button, express checkout, and quantity on product pages */
/* Includes WooCommerce Payments and Stripe Express Checkout elements */
.single-product .merchant-buy-now-button,
.single-product .merchant-custom-buy-now-button,
.single-product [class*="expresscheckout"],
.single-product .wcpay-payment-request-wrapper,
.single-product .stripe-express-checkout-element,
.single-product #stripe-express-checkout-element,
.single-product .payment-request-button,
.single-product iframe[id*="__privateStripeController"],
.single-product iframe[name*="__privateStripeController"],
.single-product .quantity {
    display: none !important;
}

/* Freeze page scrolling when designer is open */
body.rwpc-designer-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Customize Button */
.rwpc-customize-button-wrapper {
    margin: 20px 0;
}

.rwpc-customize-button.button,
.rwpc-customize-button {
    width: 100% !important;
    padding: 20px 40px !important;
    font-size: 20px !important;
    font-weight: bold !important;
    background: #28a745 !important;
    background-color: #28a745 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background 0.3s !important;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3) !important;
    text-transform: none !important;
    line-height: 1.2 !important;
}

.rwpc-customize-button.button:hover,
.rwpc-customize-button:hover {
    background: #218838 !important;
    background-color: #218838 !important;
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4) !important;
    color: #fff !important;
}

/* Customizer Modal */
.rwpc-customizer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 999999;
}

.rwpc-customizer-modal.active {
    display: flex;
}

.rwpc-customizer-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.rwpc-customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #333;
    color: #fff;
    flex-shrink: 0;
}

.rwpc-customizer-title {
    font-size: 18px;
    margin: 0;
}

.rwpc-close-customizer {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
}

/* Main Content */
.rwpc-customizer-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Toolbar */
.rwpc-customizer-toolbar {
    width: 100%;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    overflow-y: auto;
    padding: 15px;
    flex-shrink: 0;
    max-height: 30vh;
}

.rwpc-tool-group {
    margin-bottom: 20px;
}

.rwpc-tool-group h3 {
    font-size: 14px;
    margin: 0 0 10px 0;
    color: #333;
}

.rwpc-tool-button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
}

.rwpc-tool-button:hover {
    background: #e0e0e0;
}

.rwpc-tool-button.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Canvas Area */
.rwpc-canvas-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rwpc-canvas-wrapper {
    position: relative;
    margin: 20px;
    touch-action: none;
}

.rwpc-canvas-background {
    max-width: 100%;
    height: auto;
    display: block;
    pointer-events: none; /* Prevent background from being selectable */
    user-select: none;
}

.rwpc-canvas {
    position: absolute;
    border: 2px dashed #0073aa;
    overflow: visible; /* Allow elements to overflow so they can be grabbed */
    opacity: 0; /* Hidden initially, shown after proper positioning */
    transition: opacity 0.2s ease-in;
}

.rwpc-canvas.ready {
    opacity: 1; /* Show after positioning is complete */
}

.rwpc-canvas.boundary-warning {
    border: 3px solid #ff0000;
}

.rwpc-canvas.circle {
    border-radius: 50%;
}

.rwpc-canvas-element {
    position: absolute;
    cursor: move;
    user-select: none;
    touch-action: none;
}

.rwpc-canvas-element.selected {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.rwpc-canvas-element img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.rwpc-canvas-element.text {
    white-space: pre; /* Preserve line breaks from Enter key, no auto-wrapping */
    overflow: visible; /* Don't clip text until it exceeds canvas border */
    display: inline-block; /* Ensure text element sizes to content */
    word-wrap: normal; /* No automatic word wrapping */
    line-height: 1.2; /* Explicit line height for consistent scaling */
}

/* Overflow handling - color clipped parts red */
.rwpc-canvas-element::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: transparent;
    transition: background 0.3s;
    z-index: 10;
}

/* For text elements, the overlay should be behind the text */
.rwpc-canvas-element.text::after {
    z-index: -1;
}

.rwpc-canvas-element.outside-bounds::after {
    background: rgba(255, 0, 0, 0.4); /* Red overlay for out-of-bounds parts */
}

/* Text elements display inline */
.rwpc-canvas-element.text {
    display: inline-block; /* Ensure text element sizes to content */
}

/* Resize handles */
.rwpc-resize-handle {
    position: absolute;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 50%;
    z-index: 20;
}

.rwpc-resize-handle.nw { top: -18px; left: -18px; cursor: nw-resize; }
.rwpc-resize-handle.ne { top: -18px; right: -18px; cursor: ne-resize; }
.rwpc-resize-handle.sw { bottom: -18px; left: -18px; cursor: sw-resize; }
.rwpc-resize-handle.se { bottom: -18px; right: -18px; cursor: se-resize; }

/* Rotation handle */
.rwpc-rotate-handle {
    position: absolute;
    top: -105px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 72px;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 50%;
    cursor: grab;
    z-index: 20;
}

.rwpc-rotate-handle:active {
    cursor: grabbing;
}

.rwpc-rotate-handle::before {
    content: '↻';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #0073aa;
    font-weight: bold;
}

/* Delete handle */
.rwpc-delete-handle {
    position: absolute;
    top: -105px;
    right: -30px;
    width: 72px;
    height: 72px;
    background: #dc3545;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s;
}

.rwpc-delete-handle:hover {
    background: #c82333;
    transform: scale(1.1);
}

.rwpc-delete-handle::before {
    content: '🗑️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
}

.rwpc-template-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    gap: 15px;
}

.rwpc-template-nav-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: center;
}

.rwpc-template-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
}

.rwpc-template-nav-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.rwpc-template-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.rwpc-template-page-info {
    font-size: 14px;
    color: #666;
}

.rwpc-prev-template,
.rwpc-next-template {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    flex: 0 0 auto;
    transition: background 0.3s;
}

.rwpc-prev-template:hover,
.rwpc-next-template:hover {
    background: #4da6ff;
}

.rwpc-prev-template:disabled,
.rwpc-next-template:disabled {
    visibility: hidden;
}

.rwpc-template-info {
    font-size: 14px;
    color: #333;
}

/* Footer */
.rwpc-customizer-footer {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.rwpc-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.rwpc-zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rwpc-zoom-button {
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.rwpc-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    flex: 1;
}

.rwpc-action-buttons-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.rwpc-order-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rwpc-order-quantity {
    width: auto;
    min-width: 50px;
    max-width: 80px;
    padding: 10px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    flex-shrink: 1;
}

.rwpc-order-quantity::-webkit-inner-spin-button,
.rwpc-order-quantity::-webkit-outer-spin-button {
    opacity: 1;
    height: 24px;
}

.rwpc-save-button {
    padding: 12px 24px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.rwpc-save-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #666;
}

.rwpc-cancel-button {
    padding: 12px 24px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.rwpc-cancel-button:hover {
    background: #5a6268;
}

.rwpc-finish-design-button {
    padding: 12px 16px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.rwpc-finish-design-button.disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #666;
}

.rwpc-save-button:hover {
    background: #218838;
}

.rwpc-finish-design-button:hover:not(.disabled) {
    background: #218838;
}

.rwpc-reset-design-button {
    padding: 10px 20px;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    flex: 0 0 auto;
    transition: background 0.3s;
}

.rwpc-reset-design-button:hover {
    background: #b30000;
}

/* Fee Summary */
.rwpc-fee-summary {
    padding: 8px 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 10px;
}

/* Cost sidebar for desktop */
.rwpc-cost-sidebar {
    display: none; /* Hidden on mobile */
}

@media (min-width: 768px) {
    .rwpc-cost-sidebar {
        display: flex;
    }
    
    /* Hide fee summary in footer on desktop since it's in the sidebar */
    .rwpc-action-buttons .rwpc-fee-summary {
        display: none;
    }
}

.rwpc-fee-summary h4 {
    margin: 0 0 3px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.rwpc-fee-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rwpc-fee-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

.rwpc-fee-item.subtotal {
    padding-top: 4px;
    border-top: 1px solid #ddd;
    margin-top: 2px;
}

.rwpc-fee-item.total {
    font-weight: bold;
    font-size: 13px;
    color: #333;
    padding-top: 4px;
    border-top: 1px solid #ddd;
    margin-top: 2px;
}

.rwpc-fee-label {
    flex: 1;
}

.rwpc-fee-value {
    font-weight: bold;
    color: #0073aa;
}

/* Tutorial Overlay */
.rwpc-tutorial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.rwpc-tutorial-overlay.active {
    display: flex;
}

.rwpc-tutorial-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    text-align: center;
}

.rwpc-tutorial-content h2 {
    margin: 0 0 20px 0;
}

.rwpc-tutorial-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Responsive Design */
@media (min-width: 768px) {
    /* Desktop layout - toolbar on left side, cost summary on right */
    .rwpc-customizer-content {
        flex-direction: row;
    }
    
    .rwpc-customizer-toolbar {
        width: 280px;
        max-height: none;
        border-right: 1px solid #ddd;
        border-bottom: none;
        display: flex;
        flex-direction: column;
    }
    
    /* Ensure elements list is scrollable */
    .rwpc-elements-list-panel {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    
    .rwpc-elements-list-panel .rwpc-elements-list {
        flex: 1;
        overflow-y: auto;
    }
    
    /* Design tools section at top on desktop */
    .rwpc-design-tools {
        flex-shrink: 0;
        padding-bottom: 10px;
        border-bottom: 1px solid #ddd;
    }
    
    /* Style design tools header as regular heading on desktop (not clickable) */
    .rwpc-design-tools > h3 {
        background: transparent;
        color: #333;
        padding: 0;
        border-radius: 0;
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: 600;
        cursor: default;
    }
    
    /* Reset section at bottom on desktop */
    .rwpc-reset-section {
        margin-top: auto;
        padding-top: 10px;
        flex-shrink: 0;
    }
    
    .rwpc-footer-top {
        flex-direction: row;
    }
    
    /* Right sidebar on desktop */
    .rwpc-cost-sidebar {
        width: 280px;
        background: #f5f5f5;
        border-left: 1px solid #ddd;
        padding: 15px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        gap: 15px;
    }
    
    .rwpc-cost-sidebar .rwpc-fee-summary {
        margin-top: auto;
    }
    
    .rwpc-cost-sidebar .rwpc-action-buttons-row {
        flex-shrink: 0;
    }
    
    /* Move zoom to canvas area on desktop */
    .rwpc-zoom-controls {
        position: absolute !important;
        bottom: 20px !important;
        left: 20px !important;
        background: rgba(51, 51, 51, 0.8) !important;
        padding: 8px 12px !important;
        border-radius: 4px !important;
        z-index: 100 !important;
    }
    
    .rwpc-zoom-controls button,
    .rwpc-zoom-controls .rwpc-zoom-level {
        color: #fff !important;
    }
}

/* Loading */
.rwpc-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #333;
}

/* Property Panel */
.rwpc-property-panel {
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 15px;
}

.rwpc-property-panel label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 12px;
}

.rwpc-property-panel input,
.rwpc-property-panel select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.rwpc-property-panel button {
    width: 100%;
    padding: 8px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Library Browser */
.rwpc-library-browser {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.rwpc-library-item {
    border: 1px solid #ddd;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.rwpc-library-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.rwpc-library-item img {
    width: 100%;
    height: auto;
}

/* Tutorial Highlight */
.tutorial-highlight {
    position: relative;
    z-index: 10001;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 115, 170, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 115, 170, 0.8);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 115, 170, 1);
    }
}

/* Cart Edit Design Button */
.rwpc-edit-design-wrapper {
    text-align: center;
    margin-top: 10px;
}

.rwpc-mini-cart-edit-wrapper {
    text-align: center;
    margin-top: 8px;
    clear: both;
    display: block;
}

.rwpc-edit-cart-design {
    display: inline-block !important;
    text-align: center;
}

.woocommerce-mini-cart .rwpc-mini-cart-edit-btn {
    display: block !important;
    width: 100%;
    font-size: 12px !important;
    padding: 6px 12px !important;
}

/* Sortable elements list styles */
.rwpc-sortable-placeholder {
    background: #e0e0e0 !important;
    border: 2px dashed #999 !important;
    visibility: visible !important;
    height: 30px !important;
    margin-bottom: 3px !important;
}

.rwpc-element-list-item {
    transition: background-color 0.2s ease;
}

.rwpc-element-list-item:hover {
    background-color: #e8e8e8 !important;
}

.rwpc-element-list-item.ui-sortable-helper {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rwpc-drag-handle {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.rwpc-drag-handle:hover {
    color: #333 !important;
}

.rwpc-element-label {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Element reorder buttons */
.rwpc-element-reorder-buttons {
    display: flex;
    gap: 4px;
}

.rwpc-element-move-up,
.rwpc-element-move-down {
    background: #e0e0e0;
    color: #666;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 11px;
    line-height: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rwpc-element-move-up:hover,
.rwpc-element-move-down:hover {
    background: #d0d0d0;
}

.rwpc-element-move-up:disabled,
.rwpc-element-move-down:disabled {
    display: none;
}

.rwpc-element-delete {
    background: #e0e0e0;
    color: #666;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 11px;
    line-height: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rwpc-element-delete:hover {
    background: #d0d0d0;
}

/* Canvas Boundary Warning - Fixed overlay not affected by zoom */
.rwpc-boundary-warning-message {
    position: absolute !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #ff9800 !important;
    color: #000000 !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    z-index: 1000 !important;
    font-size: 16px !important;
    white-space: normal !important;
    font-weight: bold !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none; /* Don't block clicks */
    max-width: calc(100% - 40px) !important;
    word-wrap: break-word !important;
    text-align: center !important;
}

/* Loading Overlay and Spinner */
.rwpc-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rwpc-loading-box {
    background: white;
    padding: 40px 60px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rwpc-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e0e0e0;
    border-top: 5px solid #333;
    border-radius: 50%;
    animation: rwpc-spin 1s linear infinite;
}

@keyframes rwpc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rwpc-loading-message {
    margin-top: 20px;
    color: #333;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

/* Cart Popup */
.rwpc-cart-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rwpc-cart-popup-box {
    background: white;
    padding: 40px 60px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rwpc-cart-icon {
    margin-bottom: 20px;
    animation: rwpc-cart-bounce 0.6s ease-in-out;
}

@keyframes rwpc-cart-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.rwpc-cart-message {
    color: #333;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

/* Warnings Overview Panel */
.rwpc-warnings-overview {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 15px;
}

.rwpc-warnings-overview .rwpc-warnings-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #856404;
}

.rwpc-warning-template-group {
    margin-bottom: 12px;
}

.rwpc-warning-template-group:last-child {
    margin-bottom: 0;
}

.rwpc-warning-template-name {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.rwpc-warning-item {
    background: #fff;
    border: 1px solid #ffc107;
    border-radius: 3px;
    padding: 8px;
    margin-bottom: 6px;
}

.rwpc-warning-item:last-child {
    margin-bottom: 0;
}

.rwpc-warning-message {
    font-size: 12px;
    color: #333;
    margin-bottom: 6px;
}

.rwpc-warning-actions {
    display: flex;
    gap: 4px;
}

.rwpc-warning-actions button {
    flex: 1;
    padding: 4px 8px;
    font-size: 11px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.rwpc-warning-show {
    background: #0073aa;
    color: #fff;
}

.rwpc-warning-show:hover {
    background: #005a87;
}

.rwpc-warning-info {
    background: #d3d3d3;
    color: #333;
    min-width: 24px;
    flex: 0 0 24px;
    padding: 4px 6px;
    font-size: 10px;
}

.rwpc-warning-info:hover {
    background: #c0c0c0;
}

.rwpc-warning-ignore {
    background: #666;
    color: #fff;
}

.rwpc-warning-ignore:hover {
    background: #444;
}

/* Adjust sidebar layout to accommodate warnings */
@media (min-width: 768px) {
    .rwpc-cost-sidebar {
        justify-content: flex-start;
    }
}

/* Hide quantity controls for Einrichtungspauschale (setup fee product) in mini cart and cart */
.woocommerce-mini-cart .mini_cart_item[data-product_slug="rwpc-einrichtungspauschale"] .quantity,
.woocommerce-mini-cart .mini_cart_item[data-product_slug="rwpc-einrichtungspauschale"] input.qty,
.woocommerce-mini-cart .mini_cart_item[data-product_slug="rwpc-einrichtungspauschale"] .merchant-quantity-input,
.woocommerce-mini-cart .mini_cart_item[data-product_slug="rwpc-einrichtungspauschale"] .merchant-quantity-minus,
.woocommerce-mini-cart .mini_cart_item[data-product_slug="rwpc-einrichtungspauschale"] .merchant-quantity-plus,
.woocommerce-mini-cart .mini_cart_item[data-product_slug="rwpc-einrichtungspauschale"] .js-update-quantity,
.woocommerce-mini-cart .mini_cart_item[data-product_slug="rwpc-einrichtungspauschale"] .js-merchant-quantity-btn,
.woocommerce-cart .rwpc-setup-fee-item .quantity,
.woocommerce-cart .rwpc-setup-fee-item input.qty,
.woocommerce-cart .rwpc-setup-fee-item .merchant-quantity-input,
.woocommerce-cart .rwpc-setup-fee-item .merchant-quantity-minus,
.woocommerce-cart .rwpc-setup-fee-item .merchant-quantity-plus {
    display: none !important;
}

/* Show design count for setup fee items */
.rwpc-setup-fee-design-count {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}
