/* Main Layout Grid */
.wrapper-memes-main {
    display: grid !important;
    width: 100% !important;
    grid-template-areas:
        "ops ops"
        "sidebar preview"
        "textboxes textboxes"
        "assets assets" !important;
    grid-template-columns: 100px 1fr !important;
    gap: 12px !important;
    overflow: visible !important;
    position: relative !important;
}

/* Header Bar */
.wrapper-memes-preview-operations {
    grid-area: ops !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    padding-bottom: 10px !important;
    background: #fff !important;
    border-bottom: 1px solid #f1f7fe !important;
    margin-bottom: 10px !important;
}

/* Premium Buttons - Fixed Icons */
.wrapper-memes-preview-operations .btn,
.wrapper-memes-preview-operations button,
.add_textbox {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    display: inline-flex;
    align-items: center !important;
    gap: 4px !important;
    height: 44px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    position: relative !important;
}

.wrapper-memes-preview-operations .btn:hover,
.wrapper-memes-preview-operations button:hover,
.add_textbox:hover {
    border-color: #3b82f6 !important;
    background: #f8fbff !important;
    color: #3b82f6 !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

/* SVG Icon Injection - Deeply Debugged */
.wrapper-memes-preview-operations button::before,
.wrapper-memes-preview-operations .btn::before,
.add_textbox::before {
    content: "" !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Merge Image Icon */
.wrapper-memes-preview-operations button:nth-child(1)::before,
.wrapper-memes-preview-operations .btn:nth-of-type(1)::before,
.btn-amm-mi-open::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E") !important;
}

/* Draw Icon */
.wrapper-memes-preview-operations button:nth-child(2)::before,
.wrapper-memes-preview-operations .btn:nth-of-type(2)::before,
.draw_meme::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19l7-7 3 3-7 7-3-3z'/%3E%3Cpath d='M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z'/%3E%3Cpath d='M2 2l5 5'/%3E%3C/svg%3E") !important;
}

/* Preview Icon */
.wrapper-memes-preview-operations button:nth-child(3)::before,
.wrapper-memes-preview-operations .btn:nth-of-type(3)::before,
.generate_meme_preview::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") !important;
}

/* Add Template Icon */
.wrapper-memes-preview-operations button:nth-child(4)::before,
.wrapper-memes-preview-operations .btn:nth-of-type(4)::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='3' y1='9' x2='21' y2='9'/%3E%3Cline x1='9' y1='21' x2='9' y2='9'/%3E%3C/svg%3E") !important;
}

/* Add Template Icon - by ID */
#amm-upload-image-meme-responsive::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='3' y1='9' x2='21' y2='9'/%3E%3Cline x1='9' y1='21' x2='9' y2='9'/%3E%3C/svg%3E") !important;
}

/* Add TextBox Icon - by class */
.add_textbox::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 7 4 4 20 4 20 7'/%3E%3Cline x1='9' y1='20' x2='15' y2='20'/%3E%3Cline x1='12' y1='4' x2='12' y2='20'/%3E%3C/svg%3E") !important;
}

/* Download Image Icon - by ID */
#amm-download-image-responsive::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' 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='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E") !important;
}

/* Reset Icon - by ID */
#amm-reset-responsive::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 4 1 10 7 10'/%3E%3Cpolyline points='23 20 23 14 17 14'/%3E%3Cpath d='M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15'/%3E%3C/svg%3E") !important;
}

/* Back Button - by ID */
#cpbwc-back-btn::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E") !important;
}

#cpbwc-back-btn {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

#cpbwc-back-btn:hover {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

#cpbwc-back-btn:hover::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(59, 130, 246)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E") !important;
}

/* Left Side Sidebar - Vertical Templates */
.view-images-memes-ar-amm {
    grid-area: sidebar !important;
    border-right: 1px solid #f1f7fe;
    padding-right: 15px !important;
    max-height: 382px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.view-images-memes-ar-amm::-webkit-scrollbar {
    width: 6px;
}

.view-images-memes-ar-amm::-webkit-scrollbar-track {
    background: #f8fafc;
}

.view-images-memes-ar-amm::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.view-images-memes-ar-amm .wrapper_thumbnail_meme {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 !important;
}

.wrapper_select_image_amm {
    width: 73px !important;
    height: 69px !important;
    border-radius: 10px !important;
    border: 1px solid #f1f5f9 !important;
    background: #fff !important;
    padding: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s;
}

.wrapper_select_image_amm:hover {
    border-color: #3b82f6 !important;
}

/* Canvas Box - Fixed Stretch */
.wrapper-memes-preview {
    width: 93% !important;
    grid-area: preview !important;
    background: none;
    border-radius: 12px !important;
    border: none;
    padding: 0 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
}

/* WooCommerce Style Fullscreen Trigger */
.cpbwc-fullscreen-trigger {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 100 !important;
    width: 36px !important;
    height: 36px !important;
    background: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.cpbwc-fullscreen-trigger:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

.cpbwc-fullscreen-trigger::after {
    content: "" !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
}

/* Fullscreen Mode Styles */
.wrapper-memes-main.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: #fff !important;
    padding: 20px !important;
    grid-template-rows: auto 1fr auto auto !important;
    grid-template-areas:
        "ops ops"
        "sidebar preview"
        "textboxes textboxes"
        "assets assets" !important;
}

.wrapper-memes-main.is-fullscreen .wrapper-memes-preview {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100% !important;
}

.wrapper-memes-main.is-fullscreen #wrapper_canvas_background {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100% !important;
    width: 100% !important;
}

.wrapper-memes-main.is-fullscreen .cpbwc-fullscreen-trigger::after {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 14 10 14 10 20'/%3E%3Cpolyline points='20 10 14 10 14 4'/%3E%3Cline x1='14' y1='10' x2='21' y2='3'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E") !important;
}

#wrapper_canvas_background {
    background: #fff !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: auto !important;
}

canvas.amm_canvas {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

/* Logos at Bottom - Horizontal Line */
.wrapper-amm-select-merge-images {
    grid-area: assets !important;
    border-top: 1px solid #f1f7fe;
    padding-top: 10px !important;
    margin-top: 0px !important;
    width: 100% !important;
}

.wrapper-thumbnail-merge-images {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.wrapper-select-merge-image-amm {
    width: 73px !important;
    height: 69px !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    padding: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s;
}

.wrapper-select-merge-image-amm:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cpbwc-remove-text {
    width: 32px;
    height: 32px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

/* Text Boxes Container - Show and Style */
.amm-text-boxes {
    grid-area: textboxes !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    margin: 0 !important;
    width: 98% !important;
    position: relative !important;
    margin-top: 10px !important;
    overflow: visible !important;
}

/* Textbox Collapse/Expand Header */
.cpbwc-textbox-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.cpbwc-textbox-header:hover {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
}

.cpbwc-textbox-header h3 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.cpbwc-textbox-toggle {
    width: 32px !important;
    height: 32px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.cpbwc-textbox-toggle:hover {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.cpbwc-textbox-toggle::after {
    content: "" !important;
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    transition: transform 0.3s ease !important;
}

.cpbwc-textbox-toggle:hover::after {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

.cpbwc-textbox-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    padding-right: 5px !important;
    position: relative !important;
}

.cpbwc-textbox-container::-webkit-scrollbar {
    width: 6px !important;
}

.cpbwc-textbox-container::-webkit-scrollbar-track {
    background: #f8fafc !important;
    border-radius: 10px !important;
}

.cpbwc-textbox-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1 !important;
    border-radius: 10px !important;
}

.cpbwc-textbox-container.collapsed {
    display: none !important;
}

.amm-text-boxes.collapsed .cpbwc-textbox-toggle::after {
    transform: rotate(-90deg) !important;
}

/* Individual Text Box Wrapper */
.wrapper-text {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    padding: 30px !important;
    padding-top: 15px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    overflow: visible !important;
    transition: all 0.2s ease !important;
}

.wrapper-text:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Text Area Styling */
.wrapper-text input.amm-text {
    padding: 0px 12px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

.wrapper-text input.amm-text:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    background: #fefefe !important;
}

/* Color Pickers */
.wrapper-text input[type="color"] {
    width: 36px !important;
    height: 28px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    padding: 4px !important;
}

.wrapper-text input[type="color"]:hover {
    border-color: #3b82f6 !important;
}

/* Outline Width Input */
.wrapper-text input[type="number"].ow {
    width: 36px !important;
    height: 33px !important;
    border-radius: 8px !important;
}

/* More Options Button */
.wrapper-text .moreOption {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    position: relative !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

.wrapper-text .moreOption:hover,
.wrapper-text .moreOption.opened {
    border-color: #3b82f6 !important;
    background: #f8fbff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.wrapper-text .moreOption::before {
    content: "" !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(71, 85, 105)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.wrapper-text .moreOption.opened::before {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(59, 130, 246)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E") !important;
}

/* Font Options container */
.wrapper-text .fontOps {
    position: relative !important;
}

/* Enhanced Remove Button */
.wrapper-text .cpbwc-remove-text {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 28px !important;
    height: 28px !important;
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: bold !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
}

.wrapper-text .cpbwc-remove-text:hover {
    background: #fecaca !important;
    transform: scale(1.1) !important;
}

/* Order Details & Thank You Page Styles */
.cpbwc-order-design {
    margin: 20px 0;
    clear: both;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cpbwc-order-design strong {
    color: #1e293b;
    font-size: 16px;
    display: block;
    margin-bottom: 10px;
}

.cpbwc-order-design img {
    border-radius: 8px;
    background: #fff;
    transition: transform 0.2s;
    border: 1px solid #e2e8f0;
}

.cpbwc-order-design img:hover {
    transform: scale(1.01);
}

.cpbwc-order-item-design-preview {
    display: inline-block;
    vertical-align: top;
    margin-top: 5px;
}

.cpbwc-order-item-design-preview img {
    border-radius: 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.cpbwc-admin-order-design {
    border-radius: 8px;
}

/* More Options Popup - Premium Design */
.wrapperRenderPopupMoreOptions {
    position: fixed !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05) !important;
    z-index: 9999 !important;
    padding: 16px !important;
    display: flex;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
    min-width: max-content !important;
    animation: cpbFadeInUp 0.2s ease-out forwards;
}

@keyframes cpbFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Common group styling for labels and inputs */
.wrapperRenderPopupMoreOptions>div {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    justify-content: center !important;
}

/* Checkbox groups handling */
.wrapperRenderPopupMoreOptions div:has(input[type="checkbox"]) {
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding-top: 18px !important;
    display: flex !important;
}

/* Handle specific library structure if labels are inside divs with inputs */
.wrapperRenderPopupMoreOptions label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    display: block !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Select Styling */
.wrapperRenderPopupMoreOptions select,
.wrapperRenderPopupMoreOptions .InputFontFamily {
    height: 36px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    color: #1e293b !important;
    background: #f8fafc !important;
    outline: none !important;
    min-width: 140px !important;
    cursor: pointer !important;
}

/* Number Input Styling */
.wrapperRenderPopupMoreOptions input[type="number"],
.wrapperRenderPopupMoreOptions .InputFontSize {
    height: 36px !important;
    width: 60px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
    color: #1e293b !important;
    background: #f8fafc !important;
    outline: none !important;
}

/* Checkbox Styling */
.wrapperRenderPopupMoreOptions input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    accent-color: #3b82f6 !important;
    margin: 0 !important;
}

/* Hover effects for inputs */
.wrapperRenderPopupMoreOptions select:hover,
.wrapperRenderPopupMoreOptions input:hover {
    border-color: #cbd5e1 !important;
}

.wrapperRenderPopupMoreOptions select:focus,
.wrapperRenderPopupMoreOptions input:focus {
    border-color: #3b82f6 !important;
    background: #fff !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wrapperRenderPopupMoreOptions {
        flex-wrap: wrap !important;
        max-width: 300px !important;
        gap: 15px !important;
    }
}

/* Block Cart & Checkout Custom Image Support */
.wc-block-cart-item__image img.cpbwc-designed-image,
.wc-block-components-product-image.cpbwc-designed-image,
.wc-block-components-order-summary-item__image img,
.wc-block-checkout-order-summary img {
    object-fit: contain !important;
    max-width: 100%;
    height: auto;
}

/* Spinner Animation */
@keyframes cpbwc-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.cpbwc-loader {
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-top: 2px solid #ffffff !important;
    border-radius: 50% !important;
    width: 14px !important;
    height: 14px !important;
    animation: cpbwc-spin 1s linear infinite !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 8px !important;
    position: relative !important;
    top: -1px !important;
}

/* Reset Cross Button */
.cpbwc-reset-cross {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 101 !important;
    width: 36px !important;
    height: 36px !important;
    background: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
    color: #ef4444 !important;
    font-size: 24px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    padding-bottom: 2px !important;
    border: 1px solid #fee2e2 !important;
}

.cpbwc-reset-cross:hover {
    background: #fee2e2 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

/* Reset Loader Button (shown after clicking cross) */
.cpbwc-reset-loader {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 101 !important;
    width: 36px !important;
    height: 36px !important;
    background: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: wait !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
    border: 1px solid #e2e8f0 !important;
    pointer-events: none !important;
}

.cpbwc-reset-loader .cpbwc-loader {
    border: 2px solid rgba(59, 130, 246, 0.2) !important;
    border-top: 2px solid #3b82f6 !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    animation: cpbwc-spin 1s linear infinite !important;
    display: inline-block !important;
    margin: 0 !important;
    top: 0 !important;
}

/* Design Preview Mode Styling */
.cpbwc-design-preview-mode {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.cpbwc-design-static-image {
    background: #fff;
    max-height: 80vh;
    width: 100%;
    display: block;
    object-fit: contain;
}