/* ============================================================================
   BuildVision AI — Floor Plan Editor Styles
   ============================================================================ */

/* EDITOR TOOLBAR */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #1a1a2e;
    border-bottom: 1px solid #2d2d44;
    min-height: 42px;
    flex-shrink: 0;
    z-index: 10;
}

.editor-toolbar-section {
    display: flex;
    align-items: center;
}

.editor-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #2d2d44;
    border: 1px solid #3d3d5c;
    border-radius: 6px;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-toggle-btn:hover {
    background: #3d3d5c;
    color: #fff;
}

.editor-toggle-btn.active {
    background: #FF5722;
    border-color: #FF5722;
    color: #fff;
}

.editor-toggle-icon {
    font-size: 14px;
}

.editor-tools-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.editor-tool-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.editor-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #999;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 44px;
}

.editor-tool-btn:hover {
    background: #2d2d44;
    color: #fff;
    border-color: #3d3d5c;
}

.editor-tool-btn.active {
    background: #2196F3;
    color: #fff;
    border-color: #2196F3;
}

.tool-icon {
    font-size: 16px;
    line-height: 1;
}

.tool-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.editor-separator {
    width: 1px;
    height: 28px;
    background: #3d3d5c;
    margin: 0 4px;
}

.editor-actions-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.editor-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    background: #2d2d44;
    border: 1px solid #3d3d5c;
    border-radius: 4px;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.editor-action-btn:hover {
    background: #3d3d5c;
    color: #fff;
}

.editor-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.editor-action-btn.active {
    background: #2196F3;
    color: #fff;
    border-color: #2196F3;
}

.editor-action-primary {
    background: #FF5722;
    border-color: #FF5722;
    color: #fff;
}

.editor-action-primary:hover {
    background: #E64A19;
}

/* PROPERTY PANEL */
.editor-properties {
    position: absolute;
    right: 8px;
    top: 50px;
    width: 240px;
    background: #1a1a2e;
    border: 1px solid #3d3d5c;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 20;
    overflow: hidden;
}

.prop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #2d2d44;
    border-bottom: 1px solid #3d3d5c;
}

.prop-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.prop-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
}

.prop-close:hover {
    color: #FF5722;
}

.prop-body {
    padding: 10px 12px;
}

.prop-group {
    margin-bottom: 10px;
}

.prop-row {
    display: flex;
    gap: 8px;
}

.prop-row > div {
    flex: 1;
}

.prop-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 3px;
}

.prop-input {
    width: 100%;
    padding: 5px 8px;
    background: #0d0d1a;
    border: 1px solid #3d3d5c;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}

.prop-input:focus {
    border-color: #2196F3;
}

select.prop-input {
    cursor: pointer;
}

.prop-value {
    font-size: 14px;
    font-weight: 600;
    color: #2196F3;
}

.prop-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.prop-btn {
    flex: 1;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.prop-btn-apply {
    background: #2196F3;
    color: #fff;
}

.prop-btn-apply:hover {
    background: #1976D2;
}

.prop-btn-delete {
    background: #f44336;
    color: #fff;
}

.prop-btn-delete:hover {
    background: #d32f2f;
}

/* TOOLTIP */
.editor-tooltip {
    position: fixed;
    padding: 6px 10px;
    background: rgba(0,0,0,0.85);
    border: 1px solid #3d3d5c;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
    z-index: 9999;
    display: none;
    max-width: 200px;
}

/* EDITOR ACTIVE STATE */
.editor-active {
    border: 2px solid #FF5722 !important;
    border-radius: 4px;
}

/* EDITOR OVERLAY */
.editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* ===== LIGHT THEME (DARK MODE OFF) ===== */
[data-theme="light"] .editor-toolbar,
.light-theme .editor-toolbar {
    background: #f5f5f5;
    border-bottom-color: #ddd;
}

[data-theme="light"] .editor-toggle-btn,
.light-theme .editor-toggle-btn {
    background: #e0e0e0;
    border-color: #ccc;
    color: #333;
}

[data-theme="light"] .editor-toggle-btn:hover,
.light-theme .editor-toggle-btn:hover {
    background: #d0d0d0;
}

[data-theme="light"] .editor-tool-btn:hover,
.light-theme .editor-tool-btn:hover {
    background: #e0e0e0;
    color: #333;
    border-color: #ccc;
}

[data-theme="light"] .editor-action-btn,
.light-theme .editor-action-btn {
    background: #e0e0e0;
    border-color: #ccc;
    color: #333;
}

[data-theme="light"] .editor-properties,
.light-theme .editor-properties {
    background: #fff;
    border-color: #ddd;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

[data-theme="light"] .prop-header,
.light-theme .prop-header {
    background: #f5f5f5;
    border-bottom-color: #ddd;
}

[data-theme="light"] .prop-title,
.light-theme .prop-title {
    color: #333;
}

[data-theme="light"] .prop-input,
.light-theme .prop-input {
    background: #fff;
    border-color: #ddd;
    color: #333;
}

[data-theme="light"] .editor-tooltip,
.light-theme .editor-tooltip {
    background: rgba(255,255,255,0.95);
    border-color: #ddd;
    color: #333;
}


/* ============================================================================
   James ASC Tools Panel Styles
   ============================================================================ */

.james-asc-panel {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.james-asc-panel h4 {
    color: #F97316;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 12px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
}

.james-asc-panel h4:first-of-type {
    margin-top: 0;
}

.tool-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.james-asc-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 2px;
    border-radius: 8px;
    background: #2a2a3e;
    color: #ccc;
    border: 1px solid #333;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    position: relative;
}

.james-asc-tool:hover {
    background: #3a3a5e;
    color: #fff;
    border-color: #F97316;
}

.james-asc-tool.active {
    background: #F97316;
    color: white;
    border-color: #F97316;
}

.james-asc-tool.james-active-tool {
    background: #2563EB;
    color: white;
    border-color: #60A5FA;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
    animation: james-pulse 0.8s ease-in-out infinite;
}

@keyframes james-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.8); }
}

.james-asc-tool .tooltip {
    display: none;
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

.james-asc-tool:hover .tooltip {
    display: block;
}

.generate-rendering-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #F97316, #D97706);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s;
}

.generate-rendering-btn:hover {
    background: linear-gradient(135deg, #FB923C, #F59E0B);
    transform: translateY(-1px);
}

.view-toggle-btn {
    width: 48%;
    padding: 8px;
    background: #2a2a3e;
    color: #ccc;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.view-toggle-btn:hover {
    background: #3a3a5e;
    color: #fff;
}

.view-toggle-btn.active {
    background: #F97316;
    color: white;
    border-color: #F97316;
}
