/**
 * CreateYou Designer - Mobile Compact Layout
 * Collapsible panels, FAB, Bottom sheets for mobile optimization
 */

/* ===== MOBILE COLLAPSIBLE PANELS ===== */
@media (max-width: 768px) {
    /* Hide left column completely on mobile - use mobile panels instead */
    .cy-col.cy-left,
    .cy-left,
    #cy-designer > .cy-col.cy-left,
    #cy-designer .cy-left {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 0 !important;
    }
    
    /* Hide right column on mobile */
    .cy-col.cy-right,
    .cy-right,
    #cy-designer > .cy-col.cy-right,
    #cy-designer .cy-right {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 0 !important;
    }
    
    /* Hide all panels inside left/right columns */
    .cy-col.cy-left .cy-panel,
    .cy-col.cy-left .cy-section,
    .cy-col.cy-left .cy-product-options,
    .cy-col.cy-left .cy-tools-panel,
    .cy-col.cy-right .cy-panel,
    .cy-col.cy-right .cy-section,
    .cy-left .cy-panel,
    .cy-left .cy-section,
    .cy-left .cy-product-options,
    .cy-left .cy-tools-panel,
    .cy-right .cy-panel,
    .cy-right .cy-section {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
    
    /* Overlay when panel is open */
    .cy-mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(11, 21, 26, 0.6);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                    visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }
    
    .cy-mobile-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    /* CRITICAL: Ensure overlay doesn't block buttons when not active */
    .cy-mobile-overlay:not(.active) {
        pointer-events: none !important;
        display: none !important;
    }
    
    /* Center column takes full width */
    .cy-col.cy-center {
        width: 100%;
        max-width: 100%;
        padding: 0 8px;
        order: 1;
    }
    
    /* Hide right column on mobile */
    .cy-col.cy-right {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
    
    /* Mobile menu toggle button */
    .cy-mobile-menu-toggle {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 10000;
        width: 48px;
        height: 48px;
        background: #00AEEF;
        color: #fff;
        border: none;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        box-shadow: 0 4px 12px rgba(0, 174, 239, 0.4);
        cursor: pointer;
        transition: all 0.3s;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(0, 174, 239, 0.2) !important;
        user-select: none !important;
    }
    
    .cy-mobile-menu-toggle:active {
        transform: scale(0.95);
    }
    
    /* Compact top bar */
    .cy-top-bar {
        padding: 12px 16px;
        margin-bottom: 60px; /* Space for menu button */
    }
    
    .cy-top-bar h3 {
        font-size: 20px;
    }
    
    /* Compact panels */
    .cy-panel {
        margin-bottom: 12px;
        padding: 12px;
    }
    
    /* Collapsible sections */
    .cy-collapsible-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
        cursor: pointer;
        user-select: none;
        margin-bottom: 8px;
    }
    
    .cy-collapsible-header.active {
        background: #e0f7fa;
        border: 2px solid #00AEEF;
    }
    
    .cy-collapsible-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    
    .cy-collapsible-content.open {
        max-height: 2000px;
        transition: max-height 0.5s ease-in;
    }
    
    /* Compact tools panel */
    .cy-tools-panel {
        padding: 12px;
    }
    
    .cy-tools-panel .cy-label {
        font-size: 12px;
        margin-bottom: 8px;
    }
}

/* ===== FLOATING ACTION BUTTON (FAB) ===== */
@media (max-width: 768px) {
    .cy-fab {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        background: linear-gradient(135deg, #00AEEF 0%, #0089BE 100%) !important;
        color: #fff !important;
        border: none !important;
        border-radius: 50% !important;
        box-shadow: 0 6px 20px rgba(0, 174, 239, 0.4) !important;
        z-index: 9997 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 24px !important;
        cursor: pointer !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        visibility: visible !important;
        opacity: 1 !important;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(0, 174, 239, 0.2) !important;
        user-select: none !important;
    }
    
    .cy-fab:active {
        transform: scale(0.9) !important;
    }
    
    .cy-fab.active {
        transform: rotate(45deg);
        background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    }
    
    /* FAB menu - appears when FAB is clicked */
    .cy-fab-menu {
        position: fixed;
        bottom: 90px;
        right: 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9996;
    }
    
    .cy-fab-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .cy-fab-item {
        width: 48px;
        height: 48px;
        background: #fff;
        color: #333;
        border: none;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        transition: all 0.2s;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(0, 174, 239, 0.2) !important;
        user-select: none !important;
        position: relative !important;
        z-index: 9996 !important;
    }
    
    .cy-fab-item:active {
        transform: scale(0.9);
    }
    
    .cy-fab-item-label {
        position: absolute;
        right: 60px;
        background: rgba(0, 0, 0, 0.8);
        color: #fff;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 12px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }
    
    .cy-fab-item:hover .cy-fab-item-label,
    .cy-fab-item:active .cy-fab-item-label {
        opacity: 1;
    }
}

/* ===== BOTTOM SHEET FOR TEXT EDITING ===== */
@media (max-width: 768px) {
    .cy-bottom-sheet {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: #fff !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
        z-index: 9995 !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: block !important;
    }
    
    .cy-bottom-sheet.active {
        transform: translateY(0) !important;
    }
    
    .cy-bottom-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #eee;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 1;
    }
    
    .cy-bottom-sheet-title {
        font-size: 18px;
        font-weight: 700;
        color: #333;
    }
    
    .cy-bottom-sheet-close {
        width: 32px;
        height: 32px;
        background: #f0f0f0;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: #666;
        cursor: pointer;
    }
    
    .cy-bottom-sheet-content {
        padding: 20px;
    }
    
    /* Drag handle */
    .cy-bottom-sheet-handle {
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 8px auto;
    }
}

/* ===== MOBILE TABS SYSTEM ===== */
@media (max-width: 768px) {
    .cy-mobile-tabs {
        display: flex;
        background: #fff;
        border-bottom: 2px solid #eee;
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 0 8px;
    }
    
    .cy-mobile-tab {
        flex: 1;
        padding: 12px 8px;
        text-align: center;
        background: transparent;
        border: none;
        border-bottom: 3px solid transparent;
        color: #666;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(0, 174, 239, 0.2) !important;
        user-select: none !important;
        position: relative !important;
        z-index: 101 !important;
    }
    
    .cy-mobile-tab.active {
        color: #00AEEF;
        border-bottom-color: #00AEEF;
        background: rgba(0, 174, 239, 0.05);
    }
    
    .cy-mobile-tab-content {
        display: none;
        padding: 16px;
    }
    
    .cy-mobile-tab-content.active {
        display: block;
    }
}

/* ===== COMPACT MOCKUP WRAPPER ===== */
@media (max-width: 768px) {
    .cy-mockup-wrapper {
        margin: 0 auto;
        max-width: 100%;
    }
    
    /* Ensure canvas is visible */
    .cy-design-area {
        border: 2px dashed rgba(0, 174, 239, 0.3);
    }
}

/* ===== HIDE UNNECESSARY ELEMENTS ON MOBILE ===== */
@media (max-width: 768px) {
    /* Hide desktop-only elements */
    .cy-shortcuts-btn {
        display: none;
    }
    
    /* Show info/help buttons on mobile */
    .cy-info-btn {
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Compact controls bar */
    .cy-controls-bar {
        padding: 6px 12px;
        margin-bottom: 12px;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }
    
    .cy-controls-bar button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    /* Compact upload templates bar */
    .cy-upload-templates-bar {
        margin-bottom: 12px;
    }
    
    /* Ensure canvas area is visible */
    .cy-design-area {
        min-height: 200px;
    }
    
    /* Hide desktop text input on mobile - use bottom sheet instead */
    #cy-text-input {
        display: none;
    }
    
    #cy-add-text-btn {
        display: none;
    }
    
    /* Show mobile menu toggle only on mobile */
    .cy-mobile-menu-toggle {
        display: flex;
    }
    
    .cy-fab {
        display: flex;
    }
}

/* Desktop: hide mobile components */
@media (min-width: 769px) {
    .cy-mobile-menu-toggle,
    .cy-fab,
    .cy-fab-menu,
    .cy-mobile-overlay,
    .cy-bottom-sheet,
    .cy-mobile-action-buttons,
    .cy-mobile-action-btn,
    .cy-mobile-panel {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    #cy-text-input,
    #cy-add-text-btn {
        display: block !important;
    }
    
    /* Reset left column on desktop */
    .cy-col.cy-left {
        position: relative !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .cy-col.cy-right {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Mobile: ensure components are visible */
@media (max-width: 768px) {
    .cy-mobile-menu-toggle {
        display: flex !important;
        visibility: visible !important;
    }
    
    .cy-fab {
        display: flex !important;
        visibility: visible !important;
    }
    
    .cy-mobile-overlay {
        display: block !important;
    }
    
    .cy-bottom-sheet {
        display: block !important;
    }
}

/* ===== MOBILE ACTION BUTTONS (4 gomb canvas alatt) ===== */
/* Alapértelmezett: elrejtve desktopon */
@media (min-width: 769px) {
    .cy-mobile-action-buttons,
    .cy-mobile-action-btn,
    .cy-mobile-action-btn * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 768px) {
    .cy-mobile-action-buttons {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        gap: 0;
        padding: 8px;
        margin: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 2px solid rgba(0, 174, 239, 0.2);
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        width: 100%;
        visibility: visible !important;
    }
    
    /* Ha 3 gomb van (termék opciók nélkül), akkor 3 oszlop */
    .cy-mobile-action-buttons:has(button:nth-child(3):last-child) {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Ha 4 gomb van, akkor 4 oszlop */
    .cy-mobile-action-buttons:has(button:nth-child(4):last-child) {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .cy-mobile-action-btn {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 10px 4px;
        margin: 0 2px;
        background: #fff;
        border: 2px solid rgba(0, 174, 239, 0.25);
        border-radius: 10px;
        color: #00AEEF;
        font-size: 10px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        touch-action: manipulation !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(0, 174, 239, 0.15) !important;
        user-select: none !important;
        position: relative;
        z-index: 101;
        box-shadow: 0 2px 8px rgba(0, 174, 239, 0.1);
        min-height: 64px;
        width: calc(100% - 4px);
    }
    
    .cy-mobile-action-btn i {
        font-size: 20px !important;
        margin-bottom: 2px;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        color: #00AEEF;
        opacity: 1;
        display: block !important;
        visibility: visible !important;
    }
    
    .cy-mobile-action-btn span {
        font-size: 9px !important;
        line-height: 1.2;
        text-align: center;
        font-weight: 700;
        letter-spacing: 0.3px;
        color: #00AEEF;
        opacity: 1;
        display: block !important;
        visibility: visible !important;
    }
    
    .cy-mobile-action-btn:hover {
        background: rgba(0, 174, 239, 0.08);
        border-color: #00AEEF;
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 174, 239, 0.25);
    }
    
    .cy-mobile-action-btn:active {
        transform: translateY(0) scale(0.97);
        box-shadow: 0 2px 8px rgba(0, 174, 239, 0.2);
    }
    
    .cy-mobile-action-btn.active {
        background: linear-gradient(135deg, #00AEEF 0%, #0089BE 100%);
        color: #fff;
        border-color: #00AEEF;
        box-shadow: 0 4px 20px rgba(0, 174, 239, 0.4);
        transform: translateY(-2px);
    }
    
    .cy-mobile-action-btn.active i {
        color: #fff;
        transform: scale(1.05);
        opacity: 1;
    }
    
    .cy-mobile-action-btn.active span {
        color: #fff;
        opacity: 1;
        font-weight: 700;
    }
    
    .cy-mobile-cart-btn {
        background: #fff;
        border-color: rgba(40, 167, 69, 0.3);
        color: #28a745;
    }
    
    .cy-mobile-cart-btn i {
        color: #28a745;
    }
    
    .cy-mobile-cart-btn span {
        color: #28a745;
    }
    
    .cy-mobile-cart-btn:hover {
        background: rgba(40, 167, 69, 0.08);
        border-color: #28a745;
        color: #28a745;
    }
    
    .cy-mobile-cart-btn.active {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        border-color: #28a745;
        color: #fff;
    }
    
    .cy-mobile-cart-btn.active i,
    .cy-mobile-cart-btn.active span {
        color: #fff;
    }
    
    .cy-mobile-cart-btn:active {
        transform: translateY(0) scale(0.97);
    }
    
    /* Hide desktop bottom panel on mobile */
    .cy-bottom-panel {
        display: none !important;
    }
}

/* ===== MOBILE PANELS (canvas alatt megnyíló panelek) ===== */
/* Alapértelmezett: elrejtve desktopon */
@media (min-width: 769px) {
    .cy-mobile-panel {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 768px) {
    .cy-mobile-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border-radius: 24px 24px 0 0 !important;
        border-top: 2px solid rgba(0, 174, 239, 0.2) !important;
        box-shadow: 
            0 -8px 32px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
        z-index: 9999 !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
        transform: translateY(100%) !important;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: block !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .cy-mobile-panel.active {
        transform: translateY(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    .cy-mobile-panel-content {
        padding: 20px 16px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Responsive grid adjustments */
    .cy-mobile-panel-content > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    @media (min-width: 400px) {
        .cy-mobile-panel-content > div[style*="grid-template-columns: 1fr 1fr"] {
            grid-template-columns: 1fr 1fr !important;
        }
    }
    
    .cy-mobile-panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 24px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 1;
    }
    
    .cy-mobile-panel-header h3 {
        font-size: 20px;
        font-weight: 800;
        background: linear-gradient(135deg, #00AEEF 0%, #0089BE 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
        letter-spacing: -0.3px;
    }
    
    .cy-mobile-panel-close {
        width: 40px;
        height: 40px;
        background: rgba(0, 174, 239, 0.08);
        border: 2px solid rgba(0, 174, 239, 0.2);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: #00AEEF;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        touch-action: manipulation !important;
        pointer-events: auto !important;
        box-shadow: 0 2px 6px rgba(0, 174, 239, 0.1);
    }
    
    .cy-mobile-panel-close:hover {
        background: rgba(0, 174, 239, 0.15);
        border-color: #00AEEF;
        color: #00AEEF;
        transform: rotate(90deg) scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 174, 239, 0.2);
    }
    
    .cy-mobile-panel-close:active {
        background: rgba(0, 174, 239, 0.25);
        transform: rotate(90deg) scale(0.95);
    }
    
    .cy-mobile-panel-content {
        padding: 24px;
    }
    
    .cy-mobile-section-title {
        font-size: 13px;
        font-weight: 800;
        color: #00AEEF;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin: 24px 0 12px 0;
        padding-bottom: 8px;
        border-bottom: 2px solid rgba(0, 174, 239, 0.3);
    }
    
    .cy-mobile-section-title:first-child {
        margin-top: 0;
    }
    
    /* Drag handle */
    .cy-mobile-panel-handle {
        width: 48px;
        height: 5px;
        background: rgba(0, 0, 0, 0.15);
        border-radius: 3px;
        margin: 12px auto 0;
        transition: background 0.25s;
    }
    
    .cy-mobile-panel.active .cy-mobile-panel-handle {
        background: rgba(0, 174, 239, 0.3);
    }
    
    /* Text Editor Panel Styles */
    .cy-mobile-text-input-group {
        display: flex;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .cy-mobile-text-input {
        flex: 1;
        padding: 14px 16px;
        border: 2px solid rgba(0, 0, 0, 0.1);
        border-radius: 12px;
        font-size: 15px;
        background: rgba(255, 255, 255, 0.95);
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .cy-mobile-text-input:focus {
        outline: none;
        border-color: #00AEEF;
        box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
    }
    
    .cy-mobile-add-text-btn {
        width: 52px;
        height: 52px;
        background: linear-gradient(135deg, #00AEEF 0%, #0089BE 100%);
        color: #fff;
        border: none;
        border-radius: 10px;
        font-size: 22px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 16px rgba(0, 174, 239, 0.35);
    }
    
    .cy-mobile-add-text-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 174, 239, 0.45);
    }
    
    .cy-mobile-add-text-btn:active {
        transform: translateY(0) scale(0.95);
        box-shadow: 0 2px 10px rgba(0, 174, 239, 0.4);
    }
    
    .cy-mobile-text-control-group {
        margin-bottom: 24px;
    }
    
    .cy-mobile-text-control-group label {
        display: block;
        font-size: 13px;
        font-weight: 700;
        color: #4a5568;
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .cy-mobile-font-btn {
        width: 100%;
        padding: 14px 16px;
        border: 2px solid rgba(0, 174, 239, 0.25);
        border-radius: 10px;
        background: #fff;
        color: #00AEEF;
        font-size: 15px;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 6px rgba(0, 174, 239, 0.08);
    }
    
    .cy-mobile-font-btn:hover {
        background: rgba(0, 174, 239, 0.08);
        border-color: #00AEEF;
        box-shadow: 0 4px 12px rgba(0, 174, 239, 0.15);
        transform: translateY(-1px);
    }
    
    .cy-mobile-font-btn:active {
        transform: translateY(0) scale(0.98);
        background: rgba(0, 174, 239, 0.12);
    }
    
    .cy-mobile-color-input {
        width: 64px;
        height: 44px;
        border: 2px solid rgba(0, 174, 239, 0.25);
        border-radius: 10px;
        cursor: pointer;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 6px rgba(0, 174, 239, 0.08);
    }
    
    .cy-mobile-color-input:hover {
        border-color: #00AEEF;
        box-shadow: 0 4px 12px rgba(0, 174, 239, 0.15);
        transform: scale(1.05);
    }
    
    .cy-mobile-color-input:active {
        transform: scale(0.95);
    }
    
    .cy-mobile-color-input-small {
        width: 44px;
        height: 44px;
        border: 2px solid rgba(0, 174, 239, 0.25);
        border-radius: 10px;
        cursor: pointer;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 6px rgba(0, 174, 239, 0.08);
    }
    
    .cy-mobile-color-input-small:hover {
        border-color: #00AEEF;
        box-shadow: 0 4px 12px rgba(0, 174, 239, 0.15);
        transform: scale(1.05);
    }
    
    .cy-mobile-color-input-small:active {
        transform: scale(0.95);
    }
    
    .cy-mobile-style-buttons {
        display: flex;
        gap: 10px;
    }
    
    .cy-mobile-style-btn {
        flex: 1;
        padding: 14px 12px;
        border: 2px solid rgba(0, 174, 239, 0.25);
        border-radius: 10px;
        background: #fff;
        color: #00AEEF;
        font-size: 18px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        touch-action: manipulation !important;
        pointer-events: auto !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        box-shadow: 0 2px 6px rgba(0, 174, 239, 0.08);
    }
    
    .cy-mobile-style-label {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #00AEEF;
        opacity: 0.85;
    }
    
    .cy-mobile-style-btn:hover {
        background: rgba(0, 174, 239, 0.08);
        border-color: #00AEEF;
        box-shadow: 0 4px 12px rgba(0, 174, 239, 0.2);
        transform: translateY(-2px);
    }
    
    .cy-mobile-style-btn:active {
        transform: translateY(0) scale(0.97);
    }
    
    .cy-mobile-style-btn.active {
        background: linear-gradient(135deg, #00AEEF 0%, #0089BE 100%);
        color: #fff;
        border-color: #00AEEF;
        box-shadow: 0 4px 16px rgba(0, 174, 239, 0.4);
        transform: translateY(-2px);
    }
    
    .cy-mobile-style-btn.active .cy-mobile-style-label {
        opacity: 1;
        color: #fff;
    }
    
    .cy-mobile-style-btn.active strong,
    .cy-mobile-style-btn.active em {
        color: #fff;
    }
    
    .cy-mobile-range {
        width: 100%;
        height: 6px;
        border-radius: 3px;
        outline: none;
        -webkit-appearance: none;
        background: #ddd;
    }
    
    .cy-mobile-range::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #00AEEF;
        cursor: pointer;
    }
    
    .cy-mobile-range::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #00AEEF;
        cursor: pointer;
        border: none;
    }
    
    .cy-mobile-range-small {
        flex: 1;
        height: 6px;
        border-radius: 3px;
        outline: none;
        -webkit-appearance: none;
        background: #ddd;
    }
    
    .cy-mobile-stroke-controls {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .cy-mobile-stroke-controls .cy-mobile-color-input-small {
        flex-shrink: 0;
    }
    
    .cy-mobile-stroke-controls .cy-mobile-range-small {
        flex: 1;
        min-width: 80px;
    }
    
    .cy-mobile-stroke-controls span {
        font-size: 12px;
        font-weight: 600;
        color: #4a5568;
        min-width: 35px;
        text-align: center;
    }
    
    .cy-mobile-effect-btn {
        padding: 12px 18px;
        border: 2px solid rgba(0, 174, 239, 0.25);
        border-radius: 10px;
        background: #fff;
        color: #00AEEF;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        touch-action: manipulation !important;
        pointer-events: auto !important;
        box-shadow: 0 2px 6px rgba(0, 174, 239, 0.08);
    }
    
    .cy-mobile-effect-btn:hover {
        background: rgba(0, 174, 239, 0.08);
        border-color: #00AEEF;
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 174, 239, 0.25);
    }
    
    .cy-mobile-effect-btn:active {
        transform: translateY(0) scale(0.97);
    }
    
    .cy-mobile-effect-btn i {
        font-size: 16px;
        color: #00AEEF;
    }
    
    .cy-mobile-effect-btn-danger {
        color: #e74c3c;
        border-color: rgba(231, 76, 60, 0.3);
    }
    
    .cy-mobile-effect-btn-danger i {
        color: #e74c3c;
    }
    
    .cy-mobile-effect-btn-danger:hover {
        background: rgba(231, 76, 60, 0.08);
        border-color: #e74c3c;
        box-shadow: 0 4px 16px rgba(231, 76, 60, 0.25);
    }
    
    .cy-mobile-effect-btn-danger:active {
        background: rgba(231, 76, 60, 0.12);
    }
    
    /* Product Options Panel Styles */
    .cy-option-group {
        margin-bottom: 24px;
    }
    
    .cy-sub-label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #333;
        margin-bottom: 12px;
    }
    
    .cy-pills-group {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .cy-pill {
        padding: 10px 16px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        font-size: 13px;
        font-weight: 500;
        color: #555;
        cursor: pointer;
        transition: all 0.2s;
        touch-action: manipulation !important;
        pointer-events: auto !important;
    }
    
    .cy-pill.active {
        background: #00AEEF;
        color: #fff;
        border-color: #00AEEF;
        box-shadow: 0 4px 12px rgba(0, 174, 239, 0.3);
    }
    
    .cy-color-grid {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .cy-color-item {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 2px solid #fff;
        box-shadow: 0 0 0 2px #ddd;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        touch-action: manipulation !important;
        pointer-events: auto !important;
    }
    
    .cy-color-item.active {
        box-shadow: 0 0 0 3px #00AEEF;
        transform: scale(1.1);
    }
    
    /* Extras Panel Styles */
    .cy-checkbox-row-mobile {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
        background: #f9f9f9;
        border: 1px solid #eee;
        border-radius: 8px;
        margin-bottom: 12px;
        cursor: pointer;
        transition: all 0.2s;
        touch-action: manipulation !important;
        pointer-events: auto !important;
    }
    
    .cy-checkbox-row-mobile:active {
        background: #f0f0f0;
    }
    
    .cy-checkbox-row-mobile input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-top: 2px;
        cursor: pointer;
        touch-action: manipulation !important;
        pointer-events: auto !important;
    }
    
    .cy-checkbox-row-mobile span {
        flex: 1;
        font-size: 14px;
        color: #333;
        line-height: 1.5;
    }
}

/* Desktop: hide mobile action buttons */
@media (min-width: 769px) {
    .cy-mobile-action-buttons,
    .cy-mobile-panel {
        display: none !important;
    }
}

