/* FM Textieldruk Compact Styling */
.fmtd-configurator {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fffe 0%, #e8f5f0 100%);
    border: 2px solid #4ade80;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 8px 30px rgba(74, 222, 128, 0.1);
    position: relative;
    overflow: hidden;
}

.fmtd-configurator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4ade80, #22c55e, #16a34a);
}

.fmtd-header {
    text-align: center;
    margin-bottom: 20px;
}

.fmtd-logo {
    background: #4ade80;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.fmtd-subtitle-header {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.fmtd-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 8px;
}

.fmtd-step {
    background: #f1f5f9;
    color: #64748b;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 12px;
}

.fmtd-step.active {
    background: #4ade80;
    color: white;
    border-color: #22c55e;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.fmtd-step.completed {
    background: #22c55e;
    color: white;
    border-color: #16a34a;
}

.fmtd-content {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.fmtd-title {
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.fmtd-subtitle {
    color: #64748b;
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.4;
}

.fmtd-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.fmtd-color-option {
    position: relative;
    border: 3px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f8fafc;
}

.fmtd-color-option:hover {
    border-color: #4ade80;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.15);
}

.fmtd-color-option.selected {
    border-color: #4ade80;
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.25);
    transform: translateY(-2px);
}

.fmtd-color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    background: #4ade80;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
}

.fmtd-color-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fmtd-color-option:hover .fmtd-color-image {
    transform: scale(1.05);
}

.fmtd-color-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-weight: 600;
    font-size: 10px;
    padding: 12px 4px 4px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.fmtd-size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.fmtd-size-option {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.fmtd-size-option:hover {
    border-color: #4ade80;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.1);
}

.fmtd-size-label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    font-size: 14px;
}

.fmtd-quantity-input {
    width: 50px;
    padding: 6px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fmtd-quantity-input:focus {
    outline: none;
    border-color: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

.fmtd-button {
    background: #4ade80;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.fmtd-button:hover:not(:disabled) {
    background: #22c55e;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.4);
}

.fmtd-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.fmtd-button.secondary {
    background: #64748b;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.fmtd-button.secondary:hover {
    background: #475569;
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.4);
}

.fmtd-button.design {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.fmtd-button.design:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.fmtd-button.cart {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.fmtd-button.cart:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.fmtd-navigation {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.fmtd-preview {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.fmtd-preview-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.fmtd-summary {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #4ade80;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.fmtd-summary-title {
    color: #16a34a;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fmtd-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.fmtd-summary-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.fmtd-summary-label {
    font-weight: 600;
    color: #16a34a;
    margin-bottom: 4px;
    font-size: 12px;
}

.fmtd-summary-value {
    color: #1e293b;
    font-size: 13px;
}

/* Modal Styling - Compact */
.fmtd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

/* Prevent body scroll when modal is open */
body.fmtd-modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fmtd-modal-content {
    background: #ffffff;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5);
}

.fmtd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.fmtd-header-left,
.fmtd-header-center,
.fmtd-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fmtd-header-center {
    flex: 1;
    justify-content: center;
}

.fmtd-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0;
}

.fmtd-header-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.fmtd-header-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.fmtd-header-btn:active {
    transform: translateY(0);
}

.fmtd-save-button {
    background: rgba(255, 255, 255, 0.95);
    color: #059669;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fmtd-save-button:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.fmtd-close-button {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.fmtd-close-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.fmtd-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f8fafc;
}

/* Left Sidebar - Tools */
.fmtd-sidebar-left {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 2px 0 15px rgba(0,0,0,0.05);
}

.fmtd-tool-section {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.fmtd-tool-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fmtd-tool-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.fmtd-tool-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.fmtd-tool-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.fmtd-tool-button.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.fmtd-tool-button.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.fmtd-tool-button.secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.fmtd-shape-preset-desktop {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
}

.fmtd-shape-preset-desktop:hover {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.fmtd-shape-preset-desktop:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.fmtd-tool-select {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1e293b !important;
    line-height: 1.5;
    height: auto;
    transition: all 0.2s;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e293b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.fmtd-tool-select option {
    color: #1e293b !important;
    background: white;
}

.fmtd-tool-select:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.fmtd-color-picker {
    width: 100%;
    height: 44px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.fmtd-color-picker:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Center Canvas Area */
.fmtd-canvas-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: auto;
    align-items: center;
}

/* Hide mobile summary on desktop */
.fmtd-mobile-summary {
    display: none;
}

.fmtd-perspective-bar {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 20px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.fmtd-perspective-title {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#perspective-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 12px;
    padding: 4px;
}

.perspective-option {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 120px;
    justify-self: center;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 3px solid #e2e8f0;
    background: white;
}

.perspective-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.perspective-option.active {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.fmtd-canvas-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

#design-canvas {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: block;
    margin: 0 auto;
}

/* Right Sidebar - Properties/Layers */
.fmtd-sidebar-right {
    width: 280px;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: -2px 0 15px rgba(0,0,0,0.05);
}

.fmtd-properties-panel {
    padding: 20px;
}

.fmtd-properties-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fmtd-info-box {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
}

.fmtd-info-box p {
    font-size: 13px;
    color: #1e40af;
    margin: 0;
    line-height: 1.6;
}

.fmtd-info-box strong {
    color: #1e3a8a;
}

.fmtd-info-box kbd {
    background: rgba(255,255,255,0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #1e3a8a;
    border: 1px solid rgba(30, 58, 138, 0.2);
}

/* Responsive Design - More Compact */
@media (max-width: 768px) {
    .fmtd-configurator {
        padding: 15px;
        margin: 15px 0;
    }

    .fmtd-progress {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .fmtd-step {
        width: 100%;
        max-width: 200px;
        text-align: center;
        padding: 6px 12px;
        font-size: 11px;
    }

    .fmtd-color-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 8px;
    }

    .fmtd-size-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }

    .fmtd-navigation {
        flex-direction: column;
        align-items: center;
    }

    .fmtd-button {
        width: 100%;
        max-width: 200px;
    }

    .fmtd-title {
        font-size: 16px;
    }

    .fmtd-subtitle {
        font-size: 12px;
    }
}

/* Loading animations - Compact */
.fmtd-loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #4ade80;
    animation: fmtd-spin 1s ease-in-out infinite;
}

@keyframes fmtd-spin {
    to { transform: rotate(360deg); }
}

.fmtd-fade-in {
    animation: fmtd-fadeIn 0.3s ease-in-out;
}

@keyframes fmtd-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive Styles for Design Studio */
@media (max-width: 768px) {
    /* Modal full screen op mobile */
    .fmtd-modal-content {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
    }
    
    /* Header super compact */
    .fmtd-modal-header {
        padding: 8px 12px !important;
        flex-shrink: 0;
        gap: 8px;
    }
    
    .fmtd-header-left {
        flex: 0 0 auto;
    }
    
    .fmtd-header-center {
        flex: 0 0 auto !important;
        gap: 6px !important;
    }
    
    .fmtd-header-right {
        flex: 0 0 auto;
        gap: 6px !important;
    }
    
    .fmtd-modal-title {
        font-size: 14px !important;
        gap: 4px;
        display: none; /* Hide title on mobile */
    }
    
    .fmtd-header-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 18px;
    }
    
    .fmtd-save-button {
        padding: 8px 12px !important;
        font-size: 13px !important;
        gap: 4px !important;
    }
    
    .fmtd-close-button {
        width: 38px !important;
        height: 38px !important;
        font-size: 18px !important;
    }
    
    /* Body - canvas centraal */
    .fmtd-modal-body {
        flex-direction: column !important;
        padding: 0 !important;
        flex: 1;
        overflow: hidden;
        position: relative;
        padding-bottom: 66px !important; /* Ruimte voor bottom toolbar */
    }
    
    /* Verberg left sidebar op mobile - tools gaan naar bottom toolbar */
    .fmtd-sidebar-left {
        display: none !important;
    }
    
    /* Canvas center - maximale ruimte */
    .fmtd-canvas-center {
        padding: 8px !important;
        flex: 1;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden;
        background: #f8fafc;
    }
    
    /* Canvas wrapper - maximale ruimte */
    .fmtd-canvas-wrapper {
        padding: 0 !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        max-width: 100% !important;
    }
    
    /* Perspective bar bovenaan */
    .fmtd-perspective-bar {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 8px !important;
        border-radius: 0 !important;
        flex-shrink: 0;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    }
    
    .fmtd-perspective-title {
        font-size: 11px !important;
        margin-bottom: 6px !important;
        font-weight: 700 !important;
        color: #64748b;
    }
    
    #perspective-gallery {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        max-width: 100%;
        padding: 4px 0;
        justify-content: space-between;
    }
    
    .perspective-option {
        flex: 1 !important;
        min-width: 0 !important;
        aspect-ratio: 1 !important;
        max-width: calc((100% - (5 * 6px)) / 6) !important;
        height: auto !important;
        border-width: 2px !important;
        border-radius: 8px !important;
    }
    
    .perspective-option.active {
        border-width: 3px !important;
    }
    
    .perspective-option img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        object-position: center;
        padding: 4px;
    }
    
    .perspective-option.active {
        border-color: #10b981 !important;
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3) !important;
    }
    
    /* Mobile Summary Container */
    .fmtd-mobile-summary {
        display: block !important;
        width: 100%;
        padding: 12px;
        background: white;
        border-top: 2px solid #e5e7eb;
        margin-top: auto;
        flex-shrink: 0;
    }
    
    .fmtd-mobile-summary-content {
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        border-radius: 12px;
        padding: 14px;
        border: 2px solid #10b981;
    }
    
    .fmtd-mobile-summary-header {
        font-size: 14px;
        font-weight: 700;
        color: #059669;
        margin-bottom: 12px;
        text-align: center;
        padding-bottom: 8px;
        border-bottom: 2px solid #10b981;
    }
    
    .fmtd-mobile-summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        font-size: 12px;
    }
    
    .fmtd-mobile-summary-label {
        color: #064e3b;
        font-weight: 600;
    }
    
    .fmtd-mobile-summary-value {
        color: #065f46;
        font-weight: 500;
        text-align: right;
    }
    
    .fmtd-mobile-summary-divider {
        height: 2px;
        background: #10b981;
        margin: 12px 0;
        border-radius: 1px;
    }
    
    .fmtd-mobile-summary-total {
        margin-top: 8px;
    }
    
    .fmtd-mobile-summary-total .fmtd-mobile-summary-label {
        font-size: 15px;
        font-weight: 700;
        color: #059669;
    }
    
    .fmtd-mobile-summary-total .fmtd-mobile-summary-value {
        font-size: 18px;
        font-weight: 700;
        color: #059669;
    }
    
    /* Mobile Design Costs Panel */
    .fmtd-mobile-design-costs {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 12px;
        border: 2px solid #f59e0b;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    
    /* Verberg design costs tijdens verslepen */
    body.dragging .fmtd-mobile-design-costs,
    .fmtd-configurator.dragging .fmtd-mobile-design-costs,
    .fabric-canvas-wrapper.dragging .fmtd-mobile-design-costs {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(-10px) !important;
    }
    
.fmtd-mobile-design-header {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0;
    text-align: center;
    padding: 12px 16px;
    border-bottom: 2px solid #f59e0b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.fmtd-mobile-design-header:hover {
    background: rgba(245, 158, 11, 0.1);
}

.fmtd-toggle-icon {
    transition: transform 0.2s ease;
    font-size: 12px;
}

.fmtd-mobile-design-content {
    padding: 12px 0;
}    .fmtd-mobile-element {
        background: rgba(255, 255, 255, 0.7);
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .fmtd-mobile-element-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12px;
        font-weight: 600;
        color: #92400e;
        margin-bottom: 4px;
    }
    
    .fmtd-mobile-element-price {
        color: #ea580c;
        font-weight: 700;
    }
    
    .fmtd-mobile-element-breakdown {
        font-size: 10px;
        color: #78350f;
        font-style: italic;
    }
    
    .fmtd-mobile-design-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 2px solid #f59e0b;
        font-size: 14px;
        color: #92400e;
    }
    
    .fmtd-mobile-design-note {
        font-size: 9px;
        color: #78350f;
        text-align: center;
        margin-top: 8px;
        font-style: italic;
    }
    
    /* Canvas container gecentreerd */
    .fmtd-canvas-container {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 6px !important;
        overflow: hidden !important;
        background: #f8fafc !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
    }
    
    /* Canvas responsive sizing - perfect gecentreerd */
    #design-canvas {
        max-width: calc(100vw - 12px) !important;
        max-height: calc(100vh - 200px) !important;
        width: auto !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
        object-fit: contain;
        border-width: 1px !important;
    }
    
    /* Verberg right sidebar properties op mobile */
    .fmtd-sidebar-right {
        display: none !important;
    }
    
    /* Bottom toolbar voor acties */
    .fmtd-mobile-toolbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 2px solid #e2e8f0;
        padding: 8px;
        display: flex;
        gap: 6px;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 999999;
        flex-shrink: 0;
    }
    
    .fmtd-mobile-toolbar-btn {
        flex: 1;
        padding: 10px 8px !important;
        font-size: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        min-height: 50px;
        border-radius: 8px;
        white-space: nowrap;
    }
    
    .fmtd-mobile-toolbar-btn span {
        font-size: 16px;
    }
    
    /* Dropdown compact */
    .fmtd-tool-select {
        padding: 6px 8px !important;
        font-size: 11px !important;
        min-height: 36px;
    }
    
    /* Info box compacter */
    .fmtd-info-box {
        display: none !important; /* Verberg info op mobile */
    }
    
    /* Upload button in toolbar */
    #logo-upload-label {
        padding: 8px !important;
        font-size: 10px !important;
        min-height: 44px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    
    /* Touch-friendly */
    .fmtd-tool-button,
    .fmtd-close-button {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Mobile Toolbar (Canva-style) */
    .fmtd-mobile-toolbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 10000;
        background: #ffffff;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    }
    
    /* Tab Bar */
    .fmtd-tab-bar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
        border-top: 1px solid #e5e7eb;
        padding: 0;
        height: 64px;
        width: 100%;
    }
    
    .fmtd-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 8px 4px;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        min-height: 64px;
        min-width: 0;
    }
    
    .fmtd-tab::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: 50%;
        height: 3px;
        background: linear-gradient(90deg, #10b981 0%, #059669 100%);
        border-radius: 3px 3px 0 0;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .fmtd-tab.active {
        background: linear-gradient(to bottom, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
    }
    
    .fmtd-tab.active::after {
        transform: translateX(-50%) scaleX(1);
    }
    
    .fmtd-tab:active {
        transform: scale(0.95);
    }
    
    .fmtd-tab-icon {
        font-size: 26px;
        line-height: 1;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        filter: grayscale(0.3);
    }
    
    .fmtd-tab.active .fmtd-tab-icon {
        transform: scale(1.1);
        filter: grayscale(0);
    }
    
    .fmtd-tab-label {
        font-size: 11px;
        font-weight: 600;
        color: #64748b;
        letter-spacing: 0.3px;
        transition: all 0.25s ease;
    }
    
    .fmtd-tab.active .fmtd-tab-label {
        color: #10b981;
        font-weight: 700;
    }
    
    /* Sliding Panel */
    .fmtd-mobile-panel-slide {
        position: absolute;
        bottom: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
        max-height: 55vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .fmtd-panel-content {
        padding: 20px 16px;
    }
    
    .fmtd-panel-header {
        font-size: 19px;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 18px;
        padding-bottom: 14px;
        border-bottom: 2px solid #e5e7eb;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .fmtd-panel-header::before {
        content: '';
        width: 4px;
        height: 24px;
        background: linear-gradient(180deg, #10b981 0%, #059669 100%);
        border-radius: 2px;
    }
    
    .fmtd-mobile-btn {
        width: 100%;
        padding: 16px;
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        color: #1e293b;
        cursor: pointer;
        margin-bottom: 10px;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .fmtd-mobile-btn:active {
        transform: scale(0.96);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0.05);
    }
    
    .fmtd-mobile-btn.danger {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
        border-color: #f87171;
        color: #991b1b;
    }
    
    .fmtd-mobile-btn.danger:active {
        background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    }
    
    .fmtd-mobile-btn.primary {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        border: none;
        color: white;
        font-size: 16px;
        padding: 18px;
        font-weight: 700;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    }
    
    .fmtd-mobile-btn.primary:active {
        box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    }
    
    .fmtd-style-btn {
        flex: 1;
        padding: 14px;
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 10px;
        font-size: 20px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    
    .fmtd-style-btn:active {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        border-color: #10b981;
        transform: scale(0.95);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0.05);
    }
    
    /* Mobile Panel Force Visible Select Text - ULTRA PRIORITY */
    #mobile-font-family,
    #mobile-font-size,
    .fmtd-mobile-select {
        color: #1f2937 !important;
        background-color: white !important;
        -webkit-text-fill-color: #1f2937 !important;
        opacity: 1 !important;
    }
    
    #mobile-font-family option,
    #mobile-font-size option,
    .fmtd-mobile-select option {
        color: #1f2937 !important;
        background-color: white !important;
        -webkit-text-fill-color: #1f2937 !important;
    }

    .fmtd-mobile-select {
        width: 100%;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        font-size: 15px;
        margin-bottom: 10px;
        background: white !important;
        color: #1f2937 !important;
        font-weight: 500;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        transition: all 0.2s;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        -webkit-text-fill-color: #1f2937 !important;
    }
    
    .fmtd-mobile-select:focus {
        outline: none;
        border-color: #10b981;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }
    
    /* Shape Presets */
    .fmtd-shape-preset {
        padding: 16px;
        border: 2px solid #e5e7eb;
        border-radius: 10px;
        background: white;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        color: #1e293b;
        min-height: 60px;
    }
    
    .fmtd-shape-preset:active {
        transform: scale(0.95);
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        border-color: #10b981;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }
    
    .fmtd-shape-preset:hover {
        border-color: #10b981;
        background: #f9fafb;
    }
}

/* Floating Toolbar for Selected Objects */
.fmtd-floating-toolbar {
    position: absolute;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    pointer-events: all;
}

.fmtd-floating-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.fmtd-floating-group:not(:last-child) {
    border-right: 1px solid #e5e7eb;
    padding-right: 8px;
}

.fmtd-float-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    outline: none;
}

.fmtd-float-select:hover {
    border-color: #9ca3af;
}

.fmtd-float-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.fmtd-float-color {
    width: 36px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.fmtd-float-color:hover {
    border-color: #9ca3af;
}

.fmtd-float-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fmtd-float-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.fmtd-float-btn:active {
    background: #e5e7eb;
}

.fmtd-float-danger {
    color: #dc2626;
}

.fmtd-float-danger:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

/* Mobile responsive floating toolbar */
@media (max-width: 768px) {
    .fmtd-floating-toolbar {
        padding: 6px 8px;
        gap: 4px;
    }
    
    .fmtd-floating-group {
        gap: 4px;
    }
    
    .fmtd-float-select {
        font-size: 14px;
        padding: 6px 8px;
        min-width: 80px;
        color: #1f2937;
        background: white;
        border: 1px solid #d1d5db;
    }
    
    .fmtd-float-color {
        width: 36px;
        height: 32px;
    }
    
    .fmtd-float-btn {
        min-width: 32px;
        height: 32px;
        font-size: 14px;
        padding: 0 8px;
        color: #1f2937;
        background: white;
        border: 1px solid #d1d5db;
    }

    .fmtd-float-input {
        padding: 4px 6px;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        font-size: 12px;
        background: white;
        color: #1f2937;
        text-align: center;
    }
    
    .fmtd-float-btn-mini {
        min-width: 24px;
        height: 24px;
        font-size: 12px;
        padding: 0 4px;
        color: #1f2937;
        background: white;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .fmtd-float-btn-mini:hover {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

/* Manual Zoom Controls */
.fmtd-zoom-divider {
    width: 1px;
    height: 32px;
    background: #e5e7eb;
    margin: 0 8px;
}

.fmtd-zoom-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    min-width: 45px;
    text-align: center;
    background: #f9fafb;
    border-radius: 4px;
    margin: 0 4px;
    height: 28px;
    border: 1px solid #e5e7eb;
}
}

/* Canvas panning cursor styles */
.canvas-container canvas {
    transition: cursor 0.2s ease;
}

.canvas-container canvas.panning {
    cursor: grabbing !important;
}

.canvas-container canvas.pan-available {
    cursor: grab !important;
}

/* Zoom indicator for panning instructions */
.fmtd-zoom-indicator::after {
    content: " • Klik & sleep om te bewegen";
    font-size: 11px;
    color: #6b7280;
    display: none;
    transition: opacity 0.3s ease;
}

.fmtd-zoom-indicator.zoomed::after {
    display: inline;
    opacity: 1;
}

/* Hide panning instructions at 100% zoom */
.fmtd-zoom-indicator:not(.zoomed)::after {
    opacity: 0;
}

/* Animations for Price Modal */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
