/* ADA Sign Designer - Minimal Canvas-First Design */

/* Braille Font (embedded base64) */
@font-face {
    font-family: 'Braille';
    src: url(data:font/truetype;base64,AAEAAAANAIAAAwBQT1MvMhfCFX4AAADcAAAATmNtYXCGQZZGAAABLAAAAgBjdnQgBPoFIwAAAywAAAAcZnBnbUHhY1UAAANIAAAAGmdseWaHZ1+KAAADZAAADPpoZWFkvhIGJAAAEGAAAAA2aGhlYQYxAg8AABCYAAAAJGhtdHg30CCaAAAQvAAAANZsb2NhrHmvvwAAEZQAAADEbWF4cAE6AHoAABJYAAAAIG5hbWXgkWQNAAASeAAAAhtwb3N0K1HdMAAAFJQAAAPVcHJlcJSHGHgAABhsAAAAfgAAAuQBkAAFAAYEAAQAAAAAAAQABAAAAAAAADMBTQAAAQEGCQYBAQEBAwAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAIAB+A3r/IABfA3oA4AAAAAAAAgABAAAAAAAUAAMAAQAAARoAAAEGAAABAAAAAAAAAAECAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAIwBz4tKzEFOUAjLggmKhA2BAsVNCQZOCgXMzIlQR87BkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcLDU9GzpCAwkNHBQPHhYOHQoMESAYEyIaEiEnKTwvPzddXl9gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQA5gAAAAYABAABAAIAfgCg//8AAAAgAKD//wAAAAAAAQAGAAQAAAACADAABwA+AC0AKwAxAAUAOQBAACMALgAIACYAKgAQADYABAALABUANAAkABkAOAAoABcAMwAyACUAQQAfADsABgBDAEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwALAA1AD0AGwA6AEI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Q1CGRvdHMxMzQ1CGRvdHMyMzQ1CWRvdHMxMjM0NQZkb3RzMTYGZG90czI2B2RvdHMxMjYGZG90czM2B2RvdHMxMzYHZG90czIzNghkb3RzMTIzNgZkb3RzNDYHZG90czE0Ngdkb3RzMjQ2CGRvdHMxMjQ2B2RvdHMzNDYIZG90czEzNDYIZG90czIzNDYJZG90czEyMzQ2BmRvdHM1Ngdkb3RzMTU2B2RvdHMyNTYIZG90czEyNTYHZG90czM1Nghkb3RzMTM1Nghkb3RzMjM1Nglkb3RzMTIzNTYHZG90czQ1Nghkb3RzMTQ1Nghkb3RzMjQ1Nglkb3RzMTI0NTYIZG90czM0NTYJZG90czEzNDU2CWRvdHMyMzQ1Ngpkb3RzMTIzNDU2BERPVDQERE9UMQZET1RTMTIGRE9UUzE0B0RPVFMxNDUGRE9UUzE1B0RPVFMxMjQIRE9UUzEyNDUHRE9UUzEyNQZET1RTMjQHRE9UUzI0NQZET1RTMTMHRE9UUzEyMwdET1RTMTM0CERPVFMxMzQ1B0RPVFMxMzUIRE9UUzEyMzQJRE9UUzEyMzQ1CERPVFMxMjM1B0RPVFMyMzQIRE9UUzIzNDUHRE9UUzEzNghET1RTMTIzNghET1RTMJQ1NghET1RTMTM0NglET1RTMTM0NTYIRE9UUzEzNTYHRE9UUzI0NghET1RTMTI1NglET1RTMTI0NTYGRE9UUzQ1AAAAAbsABwAGAAYA6BlwRWi8AAIAAgEUAAYABSVEGHBFaGBEALsACAAKAAoAORlwRWi8AAUABQEUAAoABSVEGHBFaCCKYCC4AAkjRGBEtB4bGRMRS1JYsQsAKxtLUlixDQArG0tSWLELACsbS1JYsQ0AKxtLUlixDAArWVlZWVkiAAA=)
        format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide number input spinners */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type='number'] {
    -moz-appearance: textfield;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: Roboto, sans-serif;
    font-size: 13px;
    background-color: #1b1c1d;
    color: #fff;
}

/* App Container */
.ds-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Minimal Header */
.ds-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background-color: #252627;
    height: 60px;
    flex-shrink: 0;
    border-bottom: 1px solid #333;
}

.ds-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 30px;
}

.ds-logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.ds-header-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ds-project-name {
    color: #888;
    font-size: 12px;
    margin-right: 8px;
}

.ds-btn {
    padding: 6px 14px;
    background-color: #444;
    border: none;
    border-radius: 3px;
    color: #ccc;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s;
}

.ds-btn:hover {
    background-color: #555;
    color: #fff;
}

.ds-btn.dirty {
    background-color: #f07727;
    color: #fff;
}

.ds-btn.dirty:hover {
    background-color: #ff8a3d;
}

/* Full Canvas Area */
.ds-canvas-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    /* Grid background matching Mapping Slayer */
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="20" height="20" fill="%23222"/><rect width="1" height="20" fill="%23333"/><rect width="20" height="1" fill="%23333"/></svg>');
    /* Prevent accidental text selection when dragging */
    user-select: none;
    -webkit-user-select: none;
}

.ds-canvas {
    position: absolute;
    transform-origin: 0 0;
}

.ds-canvas-area.ds-dragging {
    cursor: grabbing;
}

/* Hint */
.ds-hint {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    font-size: 12px;
    color: #888;
    pointer-events: none;
    transition: opacity 0.5s;
}

.ds-hint.hidden {
    opacity: 0;
}

/* Resizable Divider (invisible until dragging) */
.ds-divider {
    position: absolute;
    right: 150px;
    top: 0;
    bottom: 0;
    width: 5px;
    background-color: transparent;
    cursor: ew-resize;
    z-index: 10;
}

.ds-divider.dragging {
    background-color: #f07727;
}

/* Triangle indicators at top and bottom of divider */
.ds-divider::before,
.ds-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

.ds-divider::before {
    top: 0;
    border-top: 6px solid #252627;
}

.ds-divider::after {
    bottom: 0;
    border-bottom: 6px solid #252627;
}

/* Live Side View Panel */
.ds-side-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 150px;
    background-color: #ffffff;
    padding: 0;
    overflow: hidden;
}

.ds-side-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.ds-side-canvas svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Minimal Footer */
.ds-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 0 16px;
    background-color: #252627;
    height: 28px;
    flex-shrink: 0;
    border-top: 1px solid #333;
    font-size: 11px;
    color: #777;
    user-select: none;
}

.ds-footer-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ds-footer-label {
    color: #666;
    margin-right: -2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ds-unit-btn,
.ds-snap-btn {
    background: none;
    border: none;
    padding: 2px 8px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s;
}

.ds-unit-btn:hover,
.ds-snap-btn:hover {
    color: #999;
    background: #333;
}

.ds-unit-btn.active {
    color: #f07727;
    background: rgba(240, 119, 39, 0.15);
}

.ds-snap-btn.active {
    color: #f07727;
    background: rgba(240, 119, 39, 0.15);
}

.ds-snap-group.disabled .ds-snap-btn.active {
    color: #666;
    background: none;
}

.ds-snap-group {
    display: flex;
    gap: 2px;
}

/* Snap Flyout */
.ds-snap-flyout-wrapper {
    position: relative;
}

.ds-snap-value {
    background: none;
    border: none;
    padding: 2px 8px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s;
    min-width: 36px;
}

.ds-snap-value:not(:disabled) {
    color: #f07727;
    background: rgba(240, 119, 39, 0.15);
}

.ds-snap-value:not(:disabled):hover {
    background: rgba(240, 119, 39, 0.25);
}

.ds-snap-flyout {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 6px;
    margin-bottom: 4px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.ds-snap-flyout::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #2a2a2a;
}

.ds-snap-flyout.open {
    display: block;
}

.ds-snap-flyout .ds-snap-group {
    flex-direction: column;
    gap: 2px;
}

.ds-snap-flyout .ds-snap-btn {
    white-space: nowrap;
    text-align: left;
    padding: 4px 12px;
}

.ds-align-btn,
.ds-snap-toggle,
.ds-xray-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s;
}

.ds-align-btn:hover,
.ds-snap-toggle:hover,
.ds-xray-btn:hover {
    color: #999;
    background: #333;
}

.ds-ada-clearances-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s;
}

.ds-ada-clearances-btn:hover {
    color: #999;
    background: #333;
}

.ds-align-btn.active,
.ds-snap-toggle.active,
.ds-xray-btn.active,
.ds-ada-clearances-btn.active {
    color: #f07727;
    background: rgba(240, 119, 39, 0.15);
}

#zoom-level {
    margin-left: auto;
}

/* ADA Issues Button & Popup */
.ds-ada-issues-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 12px;
}

.ds-bounce-arrow {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    animation: bounce-arrow 0.6s ease-in-out infinite;
}

.ds-bounce-arrow.visible {
    display: block;
}

@keyframes bounce-arrow {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

.ds-ada-issues-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 2px 8px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s;
}

.ds-ada-issues-btn:hover {
    color: #999;
    background: #333;
}

.ds-ada-issues-btn.has-issues {
    color: #f0a030;
}

.ds-ada-issues-btn.has-issues:hover {
    color: #f0b050;
    background: rgba(240, 160, 48, 0.15);
}

.ds-ada-issues-count {
    font-weight: 600;
    min-width: 14px;
    text-align: center;
}

.ds-ada-issues-popup {
    position: fixed;
    bottom: 40px;
    right: 20px;
    width: 360px;
    max-height: 400px;
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    flex-direction: column;
}

.ds-ada-issues-popup.open {
    display: flex;
}

.ds-ada-issues-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
}

.ds-ada-issues-close {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.ds-ada-issues-close:hover {
    color: #fff;
}

.ds-ada-issues-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.ds-ada-issues-empty {
    color: #666;
    text-align: center;
    padding: 24px;
    font-size: 12px;
}

.ds-ada-issue {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #ccc;
    align-items: flex-start;
}

.ds-ada-issue:last-child {
    margin-bottom: 0;
}

.ds-ada-issue-icon {
    color: #f0a030;
    flex-shrink: 0;
    margin-top: 1px;
}

.ds-ada-issue-content {
    flex: 1;
}

.ds-ada-issue-title {
    color: #e0e0e0;
    font-weight: 500;
    margin-bottom: 2px;
}

.ds-ada-issue-detail {
    color: #888;
    font-size: 11px;
}

.ds-ada-issue-section {
    color: #888;
    font-size: 10px;
    margin-top: 4px;
    text-decoration: none;
    display: inline-block;
    transition: color 0.15s;
}

.ds-ada-issue-section:hover {
    color: #e67e22;
    text-decoration: underline;
}

/* Attach Confirmation Dialog */
.ds-attach-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.ds-attach-confirm-dialog {
    background: #2a2b2c;
    border-radius: 8px;
    padding: 20px 24px;
    min-width: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.ds-attach-confirm-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #fff;
}

.ds-attach-confirm-text {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 20px;
    line-height: 1.4;
}

.ds-attach-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.ds-attach-confirm-btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.ds-attach-confirm-yes {
    background: #e67e22;
    color: #fff;
}

.ds-attach-confirm-yes:hover {
    background: #d35400;
}

.ds-attach-confirm-no {
    background: #444;
    color: #ccc;
}

.ds-attach-confirm-no:hover {
    background: #555;
}

/* Context Menu */
.ds-context-menu {
    position: fixed;
    background-color: #2a2b2c;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 0;
    min-width: 180px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.ds-context-menu.visible {
    display: block;
}

.ds-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.1s;
}

.ds-menu-item:hover {
    background-color: #f07727;
    color: #fff;
}

.ds-menu-item.active {
    color: #f07727;
}

.ds-menu-divider {
    height: 1px;
    background-color: #444;
    margin: 4px 0;
}

.ds-menu-header {
    padding: 8px 16px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

.ds-menu-subheader {
    padding: 4px 16px 2px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.3px;
}

.ds-menu-danger {
    color: #e74c3c;
}

.ds-menu-danger:hover {
    background-color: #e74c3c;
    color: #fff;
}

/* Dialog Overlay */
.ds-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.ds-dialog.visible {
    display: flex;
}

.ds-dialog-content {
    background-color: #2a2b2c;
    border: 1px solid #444;
    border-radius: 6px;
    min-width: min(320px, 95vw);
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.ds-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

.ds-dialog-header h3 {
    font-size: 14px;
    font-weight: bold;
    color: #f07727;
}

.ds-dialog-close {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ds-dialog-close:hover {
    color: #fff;
}

.ds-dialog-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.ds-dialog-body a {
    color: #f07727;
    text-decoration: none;
    font-weight: 500;
}

.ds-dialog-body a:hover {
    text-decoration: underline;
}

.ds-dialog-body ul {
    margin: 12px 0;
    padding-left: 20px;
}

.ds-dialog-body li {
    margin: 8px 0;
}

.ds-dialog-body p {
    margin: 8px 0;
}

.ds-dialog-footer {
    padding: 16px 20px;
    border-top: 1px solid #333;
    text-align: center;
}

/* Libraries Link and List */
.ds-libraries-link,
.ds-libraries-link:visited,
.ds-libraries-link:active {
    color: #f07727;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    margin-top: 8px;
}

.ds-libraries-link:hover {
    text-decoration: underline;
}

.ds-libraries-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ds-libraries-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #333;
    font-size: 13px;
}

.ds-libraries-list li:last-child {
    border-bottom: none;
}

.ds-libraries-list li a {
    color: #f07727;
    text-decoration: none;
    min-width: 80px;
}

.ds-libraries-list li a:hover {
    text-decoration: underline;
}

.ds-libraries-list li span {
    flex: 1;
    color: #888;
    margin: 0 12px;
}

.ds-libraries-list li em {
    color: #666;
    font-style: normal;
    font-size: 11px;
    background: #2a2a2a;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Form Fields */
.ds-field {
    margin-bottom: 12px;
}

.ds-field:last-child {
    margin-bottom: 0;
}

.ds-field label {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ds-field input[type='text'],
.ds-field input[type='number'],
.ds-field select {
    width: 100%;
    padding: 8px 10px;
    background-color: #1b1c1d;
    border: 1px solid #444;
    border-radius: 3px;
    color: #fff;
    font-size: 13px;
}

.ds-field input:focus,
.ds-field select:focus {
    outline: none;
    border-color: #f07727;
}

.ds-field input:disabled,
.ds-field select:disabled {
    background-color: #2a2a2a;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.ds-field input[type='color'] {
    width: 100%;
    height: 32px;
    padding: 2px;
    background-color: #1b1c1d;
    border: 1px solid #444;
    border-radius: 3px;
    cursor: pointer;
}

.ds-color-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ds-color-input input[type='color'] {
    width: 50px;
    flex-shrink: 0;
}

.ds-color-input input[type='text'] {
    flex: 1;
    text-transform: uppercase;
    font-family: monospace;
}

/* Color search autocomplete */
.ds-color-search-wrapper {
    position: relative;
}

.ds-color-search {
    width: 100%;
    text-transform: none !important;
    font-family: inherit !important;
}

.ds-color-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2b2c;
    border: 1px solid #444;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.ds-color-suggestions.visible {
    display: block;
}

.ds-color-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.ds-color-suggestion:hover,
.ds-color-suggestion.selected {
    background: #3a3b3c;
}

.ds-color-suggestion-swatch {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #555;
    flex-shrink: 0;
}

.ds-color-suggestion-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.ds-color-suggestion-code {
    font-size: 11px;
    color: #f07727;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-color-suggestion-text {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-field-row {
    display: flex;
    gap: 12px;
}

.ds-field-row + .ds-field-row {
    margin-top: 12px;
}

.ds-field-row .ds-field {
    flex: 1;
}

/* Lock ratio button between width/height */
.ds-lock-ratio {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 20px; /* Align with inputs (label height) */
    background: transparent;
    border: 1px solid #444;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.ds-lock-ratio:hover {
    background: #333;
    border-color: #555;
}

.ds-lock-ratio.active {
    color: #f07727;
    border-color: #f07727;
    background: rgba(240, 119, 39, 0.1);
}

.ds-lock-ratio.active:hover {
    background: rgba(240, 119, 39, 0.2);
}

.ds-field-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.ds-field-check input[type='checkbox'] {
    width: 16px;
    height: 16px;
    accent-color: #f07727;
}

.ds-field-check label {
    font-size: 13px;
    color: #ccc;
    margin: 0;
    text-transform: none;
    line-height: 16px;
}

/* Dialog section divider */
.ds-dialog-divider {
    border-top: 1px solid #444;
    margin: 16px 0;
}

/* Graphics Dialog - narrower by default */
.ds-graphics-dialog-content {
    width: 290px;
    transition: width 0.2s ease;
}

.ds-graphics-dialog-content.expanded {
    width: 560px;
}

.ds-dialog-body-row {
    display: flex;
    gap: 16px;
    overflow: hidden;
}

.ds-graphic-props {
    flex: 1;
}

.ds-graphics-dialog-content.expanded .ds-graphic-props {
    flex: 0 0 250px;
}

/* Icon Set row */
.ds-icon-set-row {
    justify-content: flex-start;
}

.ds-icon-set-row label {
    flex: 0 0 auto;
}

.ds-icon-set-hint {
    display: block;
    color: #888;
    font-size: 10px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.ds-match-color-row {
    margin-top: 8px;
}

/* Icon Set Gallery */
.ds-icon-set-gallery {
    display: none;
    flex: 1;
    min-width: 0;
    width: 240px;
    border-left: 1px solid #444;
    padding: 16px;
}

.ds-icon-set-gallery.visible {
    display: flex;
    flex-direction: column;
}

.ds-icon-set-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.ds-icon-set-gallery-header span {
    font-size: 11px;
    font-weight: normal;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ds-icon-set-add-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    background: #f07727;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 18px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
}

.ds-icon-set-add-btn:hover {
    background: #ff8a3d;
}

.ds-icon-set-align-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ds-icon-set-align-row span {
    font-size: 11px;
    font-weight: normal;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ds-icon-set-align-row select {
    background: #1e1f20;
    border: 1px solid #444;
    border-radius: 3px;
    color: #ccc;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
}

.ds-icon-set-align-row select:hover {
    border-color: #666;
}

.ds-icon-set-align-row select:focus {
    outline: none;
    border-color: #f07727;
}

.ds-icon-set-variants {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
}

/* Individual variant item */
.ds-icon-set-variant {
    background: #1e1f20;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 10px;
    position: relative;
    cursor: pointer;
}

.ds-icon-set-variant:hover {
    border-color: #666;
}

.ds-icon-set-variant.selected {
    border-color: #f07727;
    background: #2a2520;
}

.ds-icon-set-variant-preview {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 3px;
    margin-bottom: 8px;
}

.ds-icon-set-variant-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.ds-icon-set-variant-keywords {
    display: block;
    width: 100%;
    padding: 6px 8px;
    font-size: 11px;
    background: #2a2b2c;
    border: 1px solid #444;
    border-radius: 3px;
    color: #fff;
    box-sizing: border-box;
}

.ds-icon-set-variant-keywords::placeholder {
    color: #666;
}

.ds-icon-set-variant-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    padding: 0;
    background: #c0392b;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}

.ds-icon-set-variant:hover .ds-icon-set-variant-remove {
    opacity: 1;
}

.ds-icon-set-variant-remove:hover {
    background: #e74c3c;
}

/* Select dropdown */
select {
    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='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

/* Message Interaction Styles */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.message-bounds:hover,
.plate-bounds:hover {
    stroke: rgba(33, 150, 243, 0.5) !important;
}

.resize-handle:hover,
.plate-resize-handle:hover {
    fill: #1976d2 !important;
}

/* Wide Dialog (for Messages) */
.ds-dialog-wide .ds-dialog-content {
    width: min(500px, 95vw);
}

/* Tabs */
.ds-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #444;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ds-tab {
    padding: 8px 16px;
    background: #333;
    border: none;
    border-radius: 4px 4px 0 0;
    color: #888;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.ds-tab:hover {
    background: #444;
    color: #ccc;
}

.ds-tab.active {
    background: #f07727;
    color: #fff;
}

.ds-tab-add {
    background: #2a5;
    color: #fff;
    font-size: 16px;
    padding: 8px 12px;
}

.ds-tab-add:hover {
    background: #3b6;
}

/* Section Labels */
.ds-section-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 16px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
}

/* Textarea */
.ds-field textarea {
    width: 100%;
    padding: 8px 10px;
    background-color: #1b1c1d;
    border: 1px solid #444;
    border-radius: 3px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

.ds-field textarea:focus {
    outline: none;
    border-color: #f07727;
}

/* Button Row */
.ds-button-row {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #333;
}

.ds-btn-danger {
    background: #d32f2f;
    color: #fff;
}

.ds-btn-danger:hover {
    background: #b71c1c;
}

/* Standoff Position Grid */
.ds-standoff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 120px;
    margin: 12px auto;
}

.ds-standoff-pos {
    width: 36px;
    height: 36px;
    background: #3a3b3c;
    border: 2px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ds-standoff-pos:hover {
    border-color: #888;
    background: #4a4b4c;
}

.ds-standoff-pos.active {
    background: #f07727;
    border-color: #ff9850;
}

.ds-standoff-center {
    width: 36px;
    height: 36px;
    background: #2a2b2c;
    border: 2px dashed #444;
    border-radius: 4px;
}

.ds-hint {
    font-size: 11px;
    color: #888;
    text-align: center;
    margin: 8px 0;
}

/* Canvas Drop Zone Indicator */
.ds-canvas-area.drag-over {
    outline: 3px dashed #f07727;
    outline-offset: -3px;
    background: rgba(240, 119, 39, 0.05);
}

/* ============================================
   Details Panel (Sliding from left)
   ============================================ */
.ds-details-panel {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 28px;
    width: 320px;
    background: #252627;
    border-right: 1px solid #444;
    transform: translateX(-320px);
    transition: transform 0.25s ease;
    z-index: 900;
    display: flex;
    flex-direction: column;
}

.ds-details-panel.visible {
    transform: translateX(0);
}

/* Orange Tab */
.ds-details-tab {
    position: absolute;
    left: 334px;
    top: calc(50% - 55px);
    transform: rotate(90deg);
    transform-origin: left center;
    background: #f07727;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    white-space: nowrap;
    user-select: none;
    transition: background 0.15s;
}

.ds-details-tab:hover {
    background: #ff8a3d;
}

.ds-details-panel.visible .ds-details-tab {
    background: #d06620;
}

/* Help button (top-right of details panel, sticks into canvas) */
.ds-help-btn {
    position: absolute;
    top: 12px;
    right: -40px;
    z-index: 100;
    background: rgba(40, 40, 45, 0.9);
    color: #888;
    font-size: 14px;
    font-weight: 700;
    width: 28px;
    height: 28px;
    padding: 0;
    cursor: pointer;
    border: 1px solid #555;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ds-help-btn:hover {
    background: rgba(60, 60, 65, 0.95);
    color: #fff;
    border-color: #777;
}

/* Header */
.ds-details-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #f07727;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Content */
.ds-details-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* Section */
.ds-details-section {
    margin-bottom: 8px;
}

.ds-details-section-title {
    font-size: 10px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 16px;
    background: #1b1c1d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.ds-details-section-title:hover {
    color: #aaa;
}

.ds-details-section-title .ds-collapse-arrow {
    font-size: 8px;
    transition: transform 0.15s ease;
}

.ds-details-section.collapsed .ds-collapse-arrow {
    transform: rotate(-90deg);
}

.ds-details-section.collapsed .ds-details-item,
.ds-details-section.collapsed .ds-details-props,
.ds-details-section.collapsed .ds-details-variant,
.ds-details-section.collapsed .ds-notes-textarea {
    display: none;
}

/* Item */
.ds-details-item {
    padding: 8px 16px;
    border-bottom: 1px solid #333;
}

.ds-details-item:last-child {
    border-bottom: none;
}

.ds-details-item.ds-details-selected {
    background: rgba(240, 119, 39, 0.15);
    border-left: 3px solid #f07727;
    padding-left: 13px;
}

.ds-details-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #eee;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ds-details-props {
    font-size: 11px;
    color: #999;
    line-height: 1.5;
}

.ds-details-prop {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.ds-details-prop-label {
    color: #777;
}

.ds-details-prop-value {
    color: #ccc;
}

/* Empty state */
.ds-details-empty {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 11px;
    font-style: italic;
}

/* Inline editable inputs - base reset */
.ds-inline-edit {
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
    font: inherit;
    padding: 0;
    margin: 0;
    cursor: text;
}

/* Spec panel inline edits */
.ds-spec-code {
    font-size: 20px;
    font-weight: bold;
    color: #f07727;
    width: 100px;
}

.ds-spec-name {
    font-size: 16px;
    color: #fff;
    margin-left: 12px;
    width: 200px;
}

.ds-spec-value {
    color: #ccc;
    width: 120px;
    text-align: left;
}

/* Details panel inline edits - match original span styling exactly */
.ds-details-prop-value .ds-inline-edit {
    background: transparent;
    border: none;
    outline: none;
    color: #ccc;
    font-size: 11px;
    font-family: inherit;
    line-height: 1.5;
    height: auto;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: right;
    box-sizing: border-box;
}

.ds-details-prop-value .ds-inline-edit:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ds-details-prop-value .ds-inline-edit:focus {
    background: rgba(240, 119, 39, 0.1);
    outline: none;
}

/* Color pair group with bracket */
.ds-color-pair-group {
    position: relative;
    padding-left: 20px;
    margin: 2px 0;
}

.ds-color-pair-bracket {
    position: absolute;
    left: 12px;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-left: 1px solid #555;
    border-top: 1px solid #555;
    border-bottom: 1px solid #555;
    border-radius: 2px 0 0 2px;
}

.ds-color-link-btn {
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 11px;
    padding: 2px;
    opacity: 0.8;
    transition:
        opacity 0.2s,
        filter 0.2s;
    z-index: 1;
}

.ds-color-link-btn:hover {
    opacity: 1;
}

.ds-color-link-btn.unlinked {
    opacity: 0.5;
    filter: grayscale(1);
}

.ds-details-item-name .ds-inline-edit {
    background: transparent;
    border: none;
    outline: none;
    font-weight: 600;
    color: #eee;
    font-size: 12px;
    font-family: inherit;
    line-height: 1;
    height: auto;
    padding: 0;
    margin: 0;
    width: 100%;
}

.ds-details-item-name .ds-inline-edit:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ds-details-item-name .ds-inline-edit:focus {
    background: rgba(240, 119, 39, 0.1);
    outline: none;
}

/* General Notes textarea */
.ds-details-notes {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ccc;
    font-family: inherit;
    font-size: 11px;
    padding: 8px;
    resize: vertical;
    min-height: 60px;
    box-sizing: border-box;
}

.ds-details-notes:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ds-details-notes:focus {
    outline: none;
    border-color: #f07727;
    background: rgba(240, 119, 39, 0.1);
}

.ds-details-notes::placeholder {
    color: #666;
}

/* Font dropdown in details panel */
.ds-font-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ccc;
    font-family: inherit;
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
    width: 100%;
    appearance: none;
    -webkit-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='%23888' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 24px;
}

.ds-font-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.ds-font-select:focus {
    outline: none;
    border-color: #f07727;
}

.ds-font-select option {
    background: #2a2a2a;
    color: #ccc;
}

/* Color search inline - wider for full color names */
.ds-color-search-inline {
    min-width: 150px;
}

/* Ratio lock icon */
.ds-ratio-lock {
    cursor: pointer;
    font-size: 10px;
    opacity: 0.4;
    transition:
        opacity 0.15s,
        filter 0.15s;
    user-select: none;
}

.ds-ratio-lock:hover {
    opacity: 0.7;
}

.ds-ratio-lock.active {
    opacity: 1;
    filter: sepia(1) saturate(5) hue-rotate(-10deg) brightness(1.1);
}

/* Window properties in details panel */
.ds-details-section-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 0;
}

.ds-btn-sm {
    background: #333;
    border: 1px solid #555;
    border-radius: 3px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.15s;
}

.ds-btn-sm:hover {
    background: #444;
    border-color: #f07727;
}

.ds-window-prop {
    padding-left: 8px;
    border-left: 2px solid #444;
}

.ds-window-height {
    text-align: right;
}

/* Window resize handles in canvas */
.window-handle {
    transition: opacity 0.15s;
    cursor: pointer;
}

.window-handle:hover {
    opacity: 1 !important;
}

/* Lens & Spacers Dialog */
.ds-lens-spacers-dialog .ds-dialog-body {
    padding: 16px;
}

.ds-lens-info {
    background: #1a1b1c;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 16px;
}

.ds-lens-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #aaa;
}

.ds-lens-info-row + .ds-lens-info-row {
    margin-top: 6px;
}

.ds-lens-info-row strong {
    color: #fff;
}

.ds-lens-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.ds-lens-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.ds-lens-spacer {
    background: #2a2a2a;
    border-left: 3px solid #888;
}

.ds-lens-window {
    background: #1e3a4a;
    border-left: 3px solid #0088ff;
}

.ds-lens-label {
    color: #ccc;
    font-weight: 500;
}

.ds-lens-value {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ds-lens-input {
    width: 70px;
    background: #1a1b1c;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 6px 8px;
    color: #fff;
    font-size: 13px;
    text-align: right;
}

.ds-lens-input:focus {
    border-color: #0088ff;
    outline: none;
}

.ds-lens-unit {
    color: #888;
    font-size: 13px;
}

.ds-lens-remove {
    background: transparent;
    border: none;
    color: #ff6b6b;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 8px;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.ds-lens-remove:hover {
    opacity: 1;
}

.ds-lens-add-section {
    margin-top: 16px;
    text-align: center;
}

.ds-lens-add-btn {
    width: 100%;
}

.ds-lens-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ds-lens-add-note {
    font-size: 11px;
    color: #888;
    margin-top: 6px;
}

/* Color picker popup */
.ds-color-picker-popup {
    background: #2a2b2c;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ds-popup-color-input {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}

.ds-popup-color-input::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.ds-popup-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.ds-popup-hex {
    font-family: monospace;
    font-size: 12px;
    color: #ccc;
    min-width: 60px;
}

.ds-popup-save {
    background: #f07727;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 500;
}

.ds-popup-save:hover {
    background: #e06617;
}

/* Clickable color field */
.ds-color-field:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Details panel inline color search suggestions */
.ds-details-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2b2c;
    border: 1px solid #444;
    border-radius: 4px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.ds-details-suggestions .ds-color-suggestion {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 11px;
}

.ds-details-suggestions .ds-color-suggestion:hover,
.ds-details-suggestions .ds-color-suggestion.selected {
    background: #3a3b3c;
}

.ds-details-suggestions .ds-color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    border: 1px solid #555;
    flex-shrink: 0;
}

.ds-details-suggestions .ds-color-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.ds-details-suggestions .ds-color-code {
    font-size: 10px;
    color: #f07727;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-details-suggestions .ds-color-name {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
