.fde-btn-primary,
.fde-btn-info {
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#fde-export-btn,
#fde-export-btn-secondary,
#fde-apply-canvas-size,
#fde-upload-btn {
    background: #DB593F;
    border-color: #DB593F;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(219, 89, 63, 0.25);
}

#fde-export-btn:hover,
#fde-export-btn-secondary:hover,
#fde-apply-canvas-size:hover,
#fde-upload-btn:hover {
    background: #c44f35;
    border-color: #c44f35;
    box-shadow: 0 10px 24px rgba(219, 89, 63, 0.35);
}

#fde-export-btn:active,
#fde-export-btn-secondary:active,
#fde-apply-canvas-size:active,
#fde-upload-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(219, 89, 63, 0.25);
}

#fde-zoom-out-btn,
#fde-zoom-in-btn {
    background: #DB593F;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(219, 89, 63, 0.25);
}

#fde-zoom-out-btn:hover,
#fde-zoom-in-btn:hover {
    background: #c44f35;
}

#fde-zoom-out-btn:active,
#fde-zoom-in-btn:active {
    transform: scale(0.95);
    box-shadow: 0 6px 16px rgba(219, 89, 63, 0.25);
}
/**
 * Floor Design Editor - Main Stylesheet
 * 
 * This stylesheet provides all the styling for the Floor Design Editor plugin.
 * It includes responsive design for mobile and tablet devices.
 * 
 * @package Floor_Design_Editor
 * @version 1.0.0
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */
/* Prevent editor from overlapping Elementor header */
.fde-editor-container {
    position: relative;
    z-index: 1;
}

.fde-editor-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 1400px;
    margin: 20px auto;
    font-family: 'Roboto', sans-serif;
}

.fde-section-heading {
    font-size: 22px;
    font-weight: 600;
    margin: 20px 0 12px;
    color: #1f2933;
}

/* ==========================================================================
   Header Section
   ========================================================================== */

.fde-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eeeeee;
}

.fde-header h1 {
    font-size: 24px;
    margin: 0;
    color: #333333;
}

/* ==========================================================================
   Status Display
   ========================================================================== */

.fde-status {
    margin-top: 10px;
    padding: 10px 15px;
    background: #e9ecef;
    border-radius: 5px;
    font-size: 14px;
    color: #495057;
}

.fde-status.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.fde-status.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.fde-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.fde-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.fde-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.fde-btn:active {
    transform: translateY(0);
}

.fde-btn-primary {
    background: #007cba;
    color: #ffffff;
}

.fde-btn-primary:hover {
    background: #005a87;
}

.fde-btn-success {
    background: #28a745;
    color: #ffffff;
}

.fde-btn-success:hover {
    background: #1e7e34;
}

.fde-btn-warning {
    background: #ffc107;
    color: #000000;
}

.fde-btn-warning:hover {
    background: #e0a800;
}

.fde-btn-info {
    background: #17a2b8;
    color: #ffffff;
}

.fde-btn-info:hover {
    background: #138496;
}

.fde-btn-danger {
    background: #dc3545;
    color: #ffffff;
}

.fde-btn-danger:hover {
    background: #c82333;
}

.fde-btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.fde-btn-secondary:hover {
    background: #545b62;
}

.fde-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.fde-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fde-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Control Groups
   ========================================================================== */

.fde-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Dimension Sections & Action Rows
   ========================================================================== */

.fde-dimension-section {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e1e5eb;
    padding: 24px 24px 18px;
    margin-bottom: 28px;
    box-shadow: 0 10px 30px -18px rgba(30, 41, 59, 0.3);
}

.fde-dimension-section .fde-canvas-controls {
    margin-bottom: 18px;
    padding: 0;
    border: none;
    background: transparent;
}

.fde-dimension-section .fde-canvas-size-section {
    border: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.fde-primary-actions .fde-controls,
.fde-secondary-actions .fde-controls-secondary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fde-primary-actions .fde-controls {
    margin-bottom: 0;
}

.fde-secondary-actions {
    padding-top: 12px;
    border-top: 1px solid #e3e8ef;
    display: flex;
    justify-content: center;
}

.fde-controls-secondary .fde-btn {
    min-width: 150px;
}

.fde-dimension-section-secondary {
    margin-top: 28px;
    padding: 12px 18px 8px;
    margin-bottom: 8px;
    box-shadow: 0 14px 32px -18px rgba(15, 23, 42, 0.32);
}

/* ==========================================================================
   Canvas Controls (Dimensions and Grid)
   ========================================================================== */

.fde-canvas-controls {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.fde-canvas-size-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.fde-canvas-size-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.fde-dimension-inputs {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.fde-dimension-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fde-dimension-input label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.fde-dimension-input input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    width: 100px;
    transition: border-color 0.3s ease;
}

.fde-dimension-input input[type="number"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.fde-canvas-size-content {
    display: flex;
    gap: 20px;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.fde-canvas-size-content-secondary {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    gap: 6px;
}

.fde-canvas-inputs {
    flex: 1 1 320px;
    min-width: 260px;
}

.fde-canvas-details {
    flex: 1 1 300px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fde-canvas-details-secondary {
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
}

.fde-canvas-details-secondary .fde-secondary-summary {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

.fde-secondary-summary-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    justify-content: center;
    width: 100%;
    align-items: center;
}

.fde-secondary-summary-buttons .fde-btn {
    min-width: 160px;
}

.fde-secondary-summary-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 35%;
    align-items: flex-start;
}

.fde-canvas-info {
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    font-size: 14px;
    color: #343a40;
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 10px;
}

.fde-canvas-info span {
    font-weight: 500;
    color: inherit;
}

.fde-canvas-details .fde-total-area-section {
    margin-top: 0;
}

.fde-canvas-controls-secondary {
    padding: 0;
    background: transparent;
    border: none;
    margin-bottom: 0;
}

.fde-canvas-controls-secondary .fde-canvas-size-section h3 {
    font-size: 15px;
}

/* Total Area Display */
.fde-canvas-actions-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.fde-canvas-actions-slot {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fde-canvas-actions-slot .fde-controls {
    margin: 0;
}

.fde-total-area-section {
    margin-top: 15px;
}

.fde-total-area-display {
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 14px;
    color: #343a40;
    text-align: left;
    box-shadow: none;
    border: none;
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 10px;
}

.fde-texture-usage {
    margin-top: 8px;
    font-size: 14px;
    color: #343a40;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fde-texture-usage-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.fde-texture-usage-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.fde-texture-name {
    font-weight: 500;
    color: #212529;
}

.fde-texture-area {
    font-weight: 600;
    color: #007cba;
}

.fde-texture-usage-empty {
    font-style: italic;
    color: #6c757d;
}

@media (max-width: 768px) {
    .fde-canvas-size-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .fde-canvas-details {
        flex-direction: column;
        gap: 12px;
    }

    .fde-canvas-details .fde-total-area-display {
        text-align: left;
    }

    .fde-texture-usage {
        gap: 4px;
    }
}

.fde-canvas-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.fde-canvas-text {
    font-weight: 500;
    color: #212529;
    font-size: 14px;
}

.fde-canvas-text #fde-total-area {
    font-weight: 600;
}

.fde-canvas-divider {
    font-weight: 500;
    color: #adb5bd;
    font-size: 14px;
}

.fde-grid-section {
    padding-top: 15px;
}

.fde-grid-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.fde-grid-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.fde-grid-toggle label {
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}


/* ==========================================================================
   Canvas Container
   ========================================================================== */

.fde-canvas-container {
    text-align: center;
    margin: 20px 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: #f8f9fa;
    padding: 10px;
    position: relative;
}

.fde-canvas-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 18px 18px 24px;
    box-shadow: 0 28px 45px -30px rgba(30, 41, 59, 0.55);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fde-canvas-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.fde-grid-toggle-inline {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #374151;
}

.fde-grid-toggle-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.fde-grid-toggle-inline label {
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.fde-zoom-controls-inline {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    background: #f7f7f7;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.fde-zoom-controls-inline .fde-zoom-level {
    color: #111111;
    font-weight: 700;
    min-width: 56px;
}

.fde-canvas-card .fde-canvas-container {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.fde-canvas-card .fde-canvas-stage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.fde-canvas-stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
}

.fde-canvas {
    border: 2px solid #dddddd;
    border-radius: 5px;
    background: #ffffff;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
}

.fde-canvas.panning {
    cursor: grab;
}

.fde-canvas.panning:active {
    cursor: grabbing;
}

.fde-canvas-stage .fde-grid-toggle-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    box-shadow: none;
    font-size: 14px;
    color: #343a40;
    z-index: 5;
}

.fde-canvas-stage .fde-grid-toggle-overlay label,
.fde-canvas-stage .fde-grid-toggle-overlay input {
    pointer-events: auto;
}

.fde-canvas-stage .fde-grid-toggle-overlay input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.fde-canvas-stage .fde-grid-toggle-overlay label {
    cursor: pointer;
    font-weight: 500;
}

.fde-canvas-stage .fde-canvas-actions-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 6;
}

.fde-overlay-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: rgba(33, 37, 41, 0.75);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.fde-overlay-btn:hover:not(:disabled) {
    background: rgba(33, 37, 41, 0.95);
    transform: translateY(-1px);
}

.fde-overlay-btn:active:not(:disabled) {
    transform: translateY(0);
}

.fde-overlay-btn:disabled {
    cursor: not-allowed;
    background: rgba(173, 181, 189, 0.6);
    color: #f8f9fa;
}

/* ==========================================================================
   Tool Buttons
   ========================================================================== */

.fde-canvas-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.fde-canvas-content {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.fde-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, #1f242a 0%, #181b20 100%);
    border: 1px solid rgba(73, 80, 87, 0.35);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    align-items: center;
    justify-content: flex-start;
}

.fde-tools-inline {
    width: 100%;
    margin-bottom: 16px;
    justify-content: flex-start;
}

.fde-canvas-actions-slot .fde-tools-inline {
    margin-bottom: 16px;
}

.fde-tool-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(134, 142, 150, 0.4);
    background: linear-gradient(160deg, #2b3138 0%, #1f2328 100%);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    color: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0;
}

.fde-tool-btn:hover {
    background: linear-gradient(160deg, #323841 0%, #262b31 100%);
    border-color: #4dabf7;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.fde-tool-btn:focus-visible {
    outline: 2px solid #4dabf7;
    outline-offset: 3px;
}

.fde-tool-btn.active {
    background: linear-gradient(150deg, #4dabf7 0%, #228be6 100%);
    color: #ffffff;
    border-color: #4dabf7;
    box-shadow: 0 12px 24px rgba(34, 139, 230, 0.35);
}

.fde-tool-icon {
    font-size: 24px;
    line-height: 1;
    display: block;
}

.fde-tool-dropdown {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.fde-tool-btn-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.85rem;
    width: auto;
    height: 44px;
    min-height: 44px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    font-family: inherit;
}

.fde-tool-btn-dropdown .fde-tool-label {
    font-size: 0.95rem;
    line-height: 1;
}

.fde-tool-btn-dropdown:focus {
    outline: 2px solid rgba(77, 171, 247, 0.6);
    outline-offset: 2px;
}

.fde-tool-caret {
    font-size: 0.65rem;
    margin-left: 0.15rem;
}

.fde-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    min-width: 180px;
    border-radius: 12px;
    background: rgba(24, 27, 32, 0.96);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
    padding: 0.35rem 0;
    display: none;
    flex-direction: column;
    z-index: 20;
    border: 1px solid rgba(73, 80, 87, 0.45);
    backdrop-filter: blur(12px);
}

.fde-dropdown-menu.is-open {
    display: flex;
}

.fde-dropdown-item {
    width: 100%;
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    color: #f1f3f5;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fde-dropdown-item:hover,
.fde-dropdown-item:focus {
    background: rgba(77, 171, 247, 0.18);
    color: #ffffff;
    outline: none;
}

.fde-dropdown-item.is-selected {
    background: rgba(77, 171, 247, 0.28);
    color: #ffffff;
}

.fde-dropdown-texture {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(134, 142, 150, 0.45);
    background-size: cover;
    background-position: center;
    background-color: rgba(52, 58, 64, 0.65);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.fde-dropdown-label {
    flex: 1 1 auto;
    font-size: 0.95rem;
    font-weight: 500;
}

.fde-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fde-tool-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 4px) scale(0.92);
    background: rgba(26, 31, 38, 0.95);
    color: #f8f9fa;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    z-index: 5;
}

.fde-tool-btn::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translate(-50%, 6px) scale(0.92);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(26, 31, 38, 0.95) transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
}

.fde-tool-btn:hover::after,
.fde-tool-btn:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.fde-tool-btn:hover::before,
.fde-tool-btn:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

@media (max-width: 768px) {
    .fde-canvas-layout {
        flex-direction: column;
        gap: 20px;
    }

    .fde-tools {
        justify-content: center;
        padding: 12px;
        gap: 10px;
    }

    .fde-tool-btn {
        width: 40px;
        height: 40px;
    }

    .fde-tool-btn::before,
    .fde-tool-btn::after {
        display: none;
    }

    .fde-texture-panel {
        width: 100%;
        max-width: none;
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .fde-dimension-section,
    .fde-dimension-section-secondary {
        padding: 20px 18px;
        margin-bottom: 24px;
    }

    .fde-primary-actions .fde-controls,
    .fde-secondary-actions .fde-controls-secondary {
        justify-content: center;
    }

    .fde-workspace-grid {
        grid-template-columns: 1fr;
    }

    .fde-workspace-column--tools,
    .fde-workspace-column--canvas,
    .fde-workspace-column--textures {
        order: initial;
    }

    .fde-tool-sidebar {
        flex-direction: row;
        justify-content: center;
        padding: 16px;
    }

    .fde-tool-rail {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .fde-tool-sidebar .fde-tool-btn {
        width: 46px;
        height: 46px;
    }

    .fde-tool-sidebar .fde-tool-btn-dropdown {
        width: auto;
        min-width: 160px;
    }
}

/* ==========================================================================
   Texture Controls
   ========================================================================== */

.fde-texture-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.fde-texture-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 240px;
    flex: 0 0 auto;
    background: #edf2f7;
    border-radius: 14px;
    border: 1px solid rgba(73, 80, 87, 0.18);
    padding: 18px 16px;
    box-shadow: 0 18px 32px rgba(30, 41, 59, 0.18);
    order: 2;
    align-self: flex-start;
    margin-top: 12px;
    position: relative;
}

.fde-texture-panel .fde-texture-controls {
    margin-bottom: 0;
    background: #ffffff;
    border: 1px solid rgba(73, 80, 87, 0.15);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.fde-texture-controls > label {
    font-weight: 600;
    display: block;
    margin-bottom: 12px;
    color: #495057;
    font-size: 15px;
}

.fde-texture-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.fde-texture-option {
    width: 100%;
    border: 3px solid #dddddd;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    position: relative;
}

.fde-texture-option-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.18);
}

.fde-texture-option-label {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.fde-texture-option.has-variants::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #60a5fa 45%, #1d4ed8 100%);
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15), 0 4px 10px rgba(15, 23, 42, 0.25);
}

.fde-texture-option:hover {
    border-color: #007cba;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
}

.fde-workspace-column--textures {
    position: relative;
}

.fde-workspace-column--textures .fde-texture-controls {
    margin-bottom: 0;
    background: #ffffff;
    border: 1px solid rgba(73, 80, 87, 0.15);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.fde-workspace-column--textures .fde-texture-controls > label {
    margin-bottom: 0;
}

.fde-workspace-column--textures .fde-texture-palette {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 0;
    justify-items: center;
}

.fde-workspace-column--textures .fde-texture-option {
    width: 100%;
}

.fde-color-variants-drawer {
    position: absolute;
    top: 16px;
    right: calc(100% + 24px);
    width: 240px;
    padding: 18px 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(73, 80, 87, 0.12);
    box-shadow: 0 24px 36px rgba(15, 23, 42, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateX(12px);
    transition: opacity 0.22s ease, transform 0.24s ease;
    z-index: 5;
}

.fde-color-variants-drawer--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.fde-color-variants-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.fde-color-variants-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.fde-color-variants-close {
    border: none;
    background: rgba(229, 231, 235, 0.85);
    color: #1f2937;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: background 0.18s ease, transform 0.18s ease;
}

.fde-color-variants-close:hover,
.fde-color-variants-close:focus {
    background: rgba(209, 213, 219, 0.95);
    transform: scale(1.05);
}

.fde-color-variants-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fde-color-variants-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.fde-color-variant {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px solid rgba(221, 226, 232, 0.95);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    color: #ffffff;
}

.fde-color-variant::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, 0.45) 100%);
    opacity: 0.85;
    transition: opacity 0.18s ease;
}

.fde-color-variant:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 12px 20px rgba(59, 130, 246, 0.22);
}

.fde-color-variant:hover::before {
    opacity: 0.7;
}

.fde-color-variant-label {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 8px 6px;
    width: 100%;
}

.fde-color-variants-placeholder {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .fde-color-variants-drawer {
        position: fixed;
        top: 72px;
        right: 24px;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .fde-color-variants-drawer {
        display: none;
    }
}

.fde-texture-panel .fde-texture-controls > label {
    margin-bottom: 0;
}

.fde-texture-panel .fde-texture-palette {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.fde-texture-panel .fde-texture-option {
    aspect-ratio: unset;
    height: auto;
}

.fde-workspace-grid {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.fde-workspace-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fde-workspace-column--tools {
    align-items: stretch;
}

.fde-tool-sidebar {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.fde-tool-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.fde-tool-sidebar .fde-tool-btn {
    width: 52px;
    height: 52px;
    font-size: 0;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(8, 13, 23, 0.45);
}

.fde-tool-sidebar .fde-tool-btn:not(.fde-tool-btn-dropdown) .fde-tool-icon {
    font-size: 22px;
}

.fde-tool-sidebar .fde-tool-btn-dropdown {
    width: 100%;
    justify-content: space-between;
    padding: 0 14px;
    height: 46px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.fde-tool-sidebar .fde-dropdown-menu {
    left: unset;
    right: -16px;
}

.fde-tool-sidebar .fde-tool-label {
    font-size: 0.9rem;
}

.fde-tool-sidebar .fde-tool-caret {
    font-size: 0.6rem;
}

.fde-tool-sidebar .fde-tool-btn.active {
    background: #DB593F;
    border-color: #DB593F;
    box-shadow: 0 18px 32px rgba(219, 89, 63, 0.45);
}

.fde-workspace-column--textures {
    min-width: 0;
}

.fde-workspace-grid .fde-canvas-container {
    margin: 0;
}

.fde-workspace-grid .fde-canvas {
    max-width: none;
}

/* ==========================================================================
   Zoom Controls
   ========================================================================== */

.fde-canvas-stage .fde-zoom-controls {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 5;
}

.fde-zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #007cba;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.fde-zoom-btn:hover {
    background: #005a87;
}

.fde-zoom-btn:active {
    transform: scale(0.95);
}

.fde-zoom-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.25);
}

.fde-zoom-level {
    font-weight: 700;
    color: #005a87;
    min-width: 52px;
    text-align: center;
    font-size: 16px;
}

/* ==========================================================================
   Selection Highlight
   ========================================================================== */

.fde-selection-highlight {
    stroke: #ff6b6b !important;
    stroke-width: 3px !important;
    stroke-dasharray: 5, 5;
    animation: dash 0.5s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: 20;
    }
}

/* ==========================================================================
   File Input
   ========================================================================== */

.fde-file-input {
    display: none;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablets */
@media screen and (max-width: 768px) {
    .fde-editor-container {
        padding: 15px;
        margin: 10px;
    }
    
    .fde-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .fde-header h1 {
        font-size: 20px;
    }
    
    .fde-controls {
        flex-direction: column;
    }
    
    .fde-btn {
        width: 100%;
        justify-content: center;
    }
    
    .fde-tools {
        justify-content: center;
    }
    
    .fde-tool-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
    }
    
    .fde-texture-palette {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .fde-dimension-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .fde-dimension-input input[type="number"] {
        width: 100%;
    }
    
    .fde-total-area-display {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .fde-total-area-display strong {
        font-size: 14px;
    }
    
    .fde-total-area-display #fde-total-area {
        font-size: 20px;
    }
    
    .fde-zoom-controls {
        right: 12px;
        bottom: 12px;
        padding: 6px 10px;
    }
    
    .fde-zoom-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .fde-zoom-level {
        font-size: 14px;
        min-width: 46px;
    }
}

/* Mobile Phones */
@media screen and (max-width: 480px) {
    .fde-editor-container {
        padding: 10px;
        border-radius: 0;
    }
    
    .fde-header h1 {
        font-size: 18px;
    }
    
    .fde-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .fde-tool-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .fde-texture-palette {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 5px;
    }
    
    .fde-canvas {
        max-width: 100%;
    }
    
    .fde-zoom-controls {
        right: 10px;
        bottom: 10px;
    }
    
    .fde-zoom-btn {
        width: 26px;
        height: 26px;
        font-size: 15px;
    }
    
    .fde-zoom-level {
        font-size: 13px;
        min-width: 42px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .fde-controls,
    .fde-tools,
    .fde-texture-controls,
    .fde-zoom-controls {
        display: none;
    }
    
    .fde-editor-container {
        box-shadow: none;
        padding: 0;
    }
    
    .fde-canvas-container {
        border: none;
        padding: 0;
    }
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.fde-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Tooltips
   ========================================================================== */

.fde-tooltip {
    position: relative;
    display: inline-block;
}

.fde-tooltip .fde-tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333333;
    color: #ffffff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.fde-tooltip:hover .fde-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ==========================================================================
   Saved Designs List
   ========================================================================== */

.fde-saved-designs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.fde-design-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.fde-design-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.fde-design-thumbnail {
    width: 100%;
    height: 150px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fde-design-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fde-design-name {
    font-weight: 600;
    color: #333333;
    margin-bottom: 5px;
}

.fde-design-date {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
}

.fde-design-actions {
    display: flex;
    gap: 5px;
}

