/* Playground-specific styles for Universal Automation Wiki */

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevents the main page scrollbar */
}

body {
    display: flex;
    flex-direction: column; /* Stack header and main content vertically */
}

.playground-main {
    flex: 1;
    min-height: 0;
}

.playground-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
}

.playground-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Firefox fallback */
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
    height: 50px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.playground-header .header-container {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 100%;
    padding: 0 var(--spacing-md);
    gap: 1rem;
}

.playground-header .logo {
    display: flex;
    align-items: center;
    height: 40px;
    max-width: 200px;
}

.playground-header .logo a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.playground-header .logo img {
    height: auto;
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.playground-header h1 {
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #126ca8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    /* Firefox flexbox shrink fix */
    flex-shrink: 0;
}

/* New grouped button styles */
.file-operations-group,
.edit-operations-group,
.view-options-group,
.playback-controls-group,
.advanced-tools-group {
    display: flex;
    gap: 0.25rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--border-color);
    align-items: center;
}

/* Remove border from last group */
.advanced-tools-group {
    border-right: none;
    padding-right: 0;
}

/* Special styling for playback controls */
.playback-controls-group {
    gap: 0.5rem;
}

/* Hide buttons that should be hidden */
.view-options-group button.hidden,
.control-buttons button.hidden {
    display: none;
}

/* Legacy classes for compatibility - map to new groups */
.json-editor-buttons {
    display: flex;
    gap: 0.25rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--border-color);
}

.simulation-buttons {
    display: flex;
    gap: 0.25rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--border-color);
}

.control-buttons {
    display: flex;
    gap: 0.25rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--border-color);
}

.control-buttons button.hidden {
    display: none;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.header-actions .action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-actions .action-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.header-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-actions button:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.header-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.header-actions button.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.header-actions button.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.playground-main {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
}

.playground-top {
    height: 70%;
    display: flex;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

/* Standard mode layout */
.playground-top:not(.metrics-mode) .playground-left {
    flex: 1;
    display: flex;
    width: 100%;
}

.playground-top:not(.metrics-mode) .metrics-editor-panel {
    display: none !important;
}

.playground-top:not(.metrics-mode) .standard-mode-layout {
    display: flex;
    flex: 1;
    width: 100%;
}

.playground-top:not(.metrics-mode) .metrics-mode-layout {
    display: none !important;
}

/* Metrics mode layout */
.playground-top.metrics-mode .playground-left {
    width: 40%;
    display: flex;
    flex-direction: column;
}

.playground-top.metrics-mode .standard-mode-layout {
    display: none !important;
}

.playground-top.metrics-mode .metrics-mode-layout {
    display: flex !important;
    flex: 1;
    flex-direction: column;
    width: auto !important;
    min-width: 0 !important;
}

.playground-top.metrics-mode .metrics-editor-panel {
    width: 60%;
    display: flex !important;
    flex-direction: column;
}

/* Left panel tabs for metrics mode */
.left-panel-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.left-panel-tabs .tab-bar {
    display: flex;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
}

.left-tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-normal);
}

.left-tab-btn:hover {
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.05);
}

.left-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.left-tab-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.left-tab-content {
    flex: 1;
    display: none;
    flex-direction: column;
    min-height: 0;
}

.left-tab-content.active {
    display: flex;
}

.left-tab-content > div {
    flex: 1;
    min-height: 0;
}

.json-editor-panel {
    width: 40%;
    display: flex;
    flex-direction: column;
    border-right: 2px solid var(--border-color);
    position: relative;
}

.simulation-panel {
    width: 60%;
    display: flex;
    flex-direction: column;
}

.resize-handle-vertical {
    position: absolute;
    top: 0;
    right: -3px;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    background: transparent;
    z-index: 10;
}

.resize-handle-vertical:hover {
    background: rgba(0, 123, 255, 0.3);
}

.resize-handle-horizontal {
    position: absolute;
    left: 0;
    right: 0;
    height: 12px;
    cursor: row-resize;
    background: transparent;
    z-index: 10;
    top: -6px;
    width: 100%;
}

.resize-handle-horizontal:hover {
    background: rgba(0, 123, 255, 0.3);
}

.panel-header {
    display: none;
}

.panel-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.metrics-editor-panel .panel-content {
    display: flex;
    flex-direction: column;
}

#json-editor {
    height: 100%;
    width: 100%;
}

.simulation-content {
    height: 100%;
    overflow-y: auto;
    padding: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    display: block !important;
    grid-template-columns: unset !important;
    user-select: none;
}

.playground-bottom {
    height: 30%;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    overflow-y: auto;
    position: relative;
    flex-shrink: 0;
}

.validation-panel {
    padding: 1rem;
}

.validation-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.validation-content {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.875rem;
    line-height: 1.4;
}

.validation-error {
    color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    margin: 0.25rem 0;
}

.validation-success {
    color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    margin: 0.25rem 0;
}

.validation-warning {
    color: #856404;
    background: rgba(255, 193, 7, 0.1);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    margin: 0.25rem 0;
}

.toolbar {
    display: flex;
    gap: 0.5rem;
}

.toolbar button {
    background: var(--primary-light);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: background-color var(--transition-normal);
}

.toolbar button:hover {
    background: var(--primary-dark);
}

.toolbar button:disabled {
    background: var(--text-lighter);
    cursor: not-allowed;
}

.toolbar button.hidden {
    display: none;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Metrics Editor Styles */
.metrics-editor-panel {
    background: var(--bg-color);
    border-left: 2px solid var(--border-color);
    position: relative;
}

.metrics-editor-panel .panel-header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metrics-editor-panel .panel-header h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    color: var(--text-color);
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
}

.metrics-tab-bar {
    display: flex;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
}

.playground-top.metrics-mode #add-metric-btn {
    display: block !important;
}

.metrics-tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-normal);
}

.metrics-tab-btn:hover {
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.05);
}

.metrics-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.metrics-tab-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.metrics-tab-content {
    flex: 1;
    display: none;
    flex-direction: column;
    min-height: 0;
}

.metrics-tab-content.active {
    display: flex;
}

.metrics-tab-content > div {
    flex: 1;
    min-height: 0;
}

/* Ensure Monaco editor containers have proper dimensions */
#metrics-catalog-editor,
#metrics-validator-editor {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.json-editor-resize-container {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

#json-editor-metrics {
    flex: 1;
    min-height: 0;
    min-width: 0;
}

/* Force Monaco editor to respect container size during resize */
#json-editor-metrics .monaco-editor {
    min-width: 0 !important;
}

#json-editor-metrics .monaco-editor .overflow-guard {
    min-width: 0 !important;
}

#json-editor-metrics .monaco-editor .monaco-scrollable-element {
    min-width: 0 !important;
}

.metrics-resize {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    cursor: ew-resize;
    z-index: 10;
}

.metrics-resize:hover,
.metrics-resize:active {
    background: var(--primary-color);
}

.mode-toggle-btn {
    background: var(--bg-light);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.mode-toggle-btn:hover {
    background: var(--bg-lighter);
    border-color: var(--primary-color);
}

.mode-toggle-btn.metrics-active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Validation Controls */
.validation-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.metrics-mode-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-filters label {
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

.validation-filters select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    background: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-sm);
}

.btn-compact {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.validation-compact {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.validation-stats-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Generic clickable styles */
.clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.clickable:hover {
    color: var(--primary-color);
}

.stat-item.clickable {
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-normal);
}

.stat-item.clickable:hover {
    background: rgba(18, 108, 168, 0.1);
}

.stat-item.clickable.active {
    background: rgba(18, 108, 168, 0.15);
    border: 1px solid var(--primary-color);
}

.stat-count {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
}

.stat-count.error {
    color: var(--error-color);
}

.stat-count.warning {
    color: #856404;
}

.stat-count.success {
    color: var(--success-color);
}

.stat-count.suggestion {
    color: #0066cc;
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-top: 0.25rem;
}

.validation-results-grouped {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    min-height: 0;
}

.validation-group {
    margin-bottom: 0.25rem;
}

.validation-group:last-child {
    margin-bottom: 0;
}

.validation-group-content {
    max-height: none;
    overflow: visible;
}

.validation-group-content.collapsed {
    display: none;
}

.validation-group.collapsible .validation-group-content.collapsed {
    display: none;
}

.validation-result-item {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: var(--font-size-sm);
    position: relative;
}

.validation-result-item[data-clickable="true"] {
    cursor: pointer;
    transition: all 0.15s ease;
}

.validation-result-item[data-clickable="true"]:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.validation-result-item:last-child {
    border-bottom: none;
}

.validation-result-item.error {
    background: rgba(220, 53, 69, 0.05);
    border-left: 3px solid var(--error-color);
}

.validation-result-item.warning {
    background: rgba(255, 193, 7, 0.05);
    border-left: 3px solid #856404;
}

.validation-result-item.success {
    background: rgba(40, 167, 69, 0.05);
    border-left: 3px solid var(--success-color);
}

.validation-result-item.suggestion {
    background: rgba(0, 102, 204, 0.05);
    border-left: 3px solid #0066cc;
}

.validation-result-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.validation-result-status.error {
    background: var(--error-color);
    color: white;
}

.validation-result-status.warning {
    background: #856404;
    color: white;
}

.validation-result-status.success {
    background: var(--success-color);
    color: white;
}

.validation-result-status.suggestion {
    background: #0066cc;
    color: white;
}

.validation-result-details {
    flex: 1;
    min-width: 0;
}

.validation-result-name {
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
}

/* Action buttons container for builtin metrics in Metrics Editor mode */
.validation-actions {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.25rem;
    z-index: 10;
}

/* Example button for builtin metrics */
.example-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.example-btn:hover {
    opacity: 1;
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Disable button for builtin metrics */
.disable-btn {
    background: var(--bg-secondary);
    border: 1px solid #dc3545;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    color: #dc3545;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.disable-btn:hover {
    opacity: 1;
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.example-btn:active,
.disable-btn:active {
    transform: scale(0.95);
}

/* Ensure validation result items have enough padding for the buttons */
.validation-result-item:has(.validation-actions) {
    padding-right: 6rem;
}

.validation-message-inline {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.9em;
}

.simulation-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block !important;
}

.simulation-timeline {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block !important;
    overflow: hidden;
}

.task-track {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.actor-lanes {
    width: 100%;
    box-sizing: border-box;
    display: block !important;
    /* Firefox flexbox fix */
    min-height: 0;
}

.actor-lane {
    width: 100%;
    box-sizing: border-box;
    display: flex !important;
    /* Firefox flexbox alignment fix */
    align-items: center;
}

.task-block {
    display: flex;
    align-items: center;
    justify-content: center !important;
    padding: 0.25rem 0.5rem;
    gap: 0.25rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    background: white;
    color: black;
    border: 2px solid var(--primary-color);
}

.task-block:hover {
    border: 2px solid var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.task-block.dragging {
    opacity: 0.8;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.task-block.resizing {
    opacity: 0.9;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Resize handles */
.task-block::before,
.task-block::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    z-index: 10;
    background: transparent;
    transition: background-color 0.2s ease;
}

.task-block::before {
    left: -4px;
}

.task-block::after {
    right: -4px;
}

.task-block:hover::before,
.task-block:hover::after {
    background-color: rgba(var(--primary-color-rgb), 0.3);
}

.task-block.resizing::before,
.task-block.resizing::after {
    background-color: rgba(var(--primary-color-rgb), 0.5);
}

/* Duration preview overlay */
.duration-preview {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 1001;
    pointer-events: none;
}

.duration-preview::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
}

.task-emoji {
    font-size: 1.2rem;
    flex-shrink: 0;
    text-align: center;
    user-select: none;
    pointer-events: none;
}

/* Dialog styles */
.dialog-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: 2000;
}

.dialog {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 2rem;
    max-width: none;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

#add-object-modal .dialog,
#add-task-modal .dialog {
    width: 100%;
    max-width: 720px;
    box-shadow: none !important;
}

#welcome-overlay .dialog {
    max-width: 600px;
    width: 90%;
}

#add-task-modal .modal-content,
#add-object-modal .modal-content {
    width: 100%;
    max-width: none;
    box-shadow: none !important;
}

.dialog h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: var(--font-size-lg);
}

.dialog-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dialog-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dialog-field label {
    font-weight: 500;
    color: var(--text-color);
}

.dialog-field input,
.dialog-field select,
.dialog-field textarea {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-base);
}

.dialog-field textarea {
    resize: vertical;
    min-height: 80px;
}

.dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.dialog-buttons button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialog-buttons .btn-primary {
    background: var(--primary-color);
    color: white;
}

.dialog-buttons .btn-primary:hover {
    background: var(--primary-dark);
}

.dialog-buttons .btn-secondary {
    background: var(--bg-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.dialog-buttons .btn-secondary:hover {
    background: var(--border-color);
}

/* Save/Load Modal Specific Styles */
.save-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.save-warning p {
    margin: 0 0 0.5rem 0;
}

.save-warning p:last-of-type {
    margin-bottom: 1rem;
}

.save-warning label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-sm);
    cursor: pointer;
}

.save-warning label input[type="checkbox"] {
    width: auto;
    flex-shrink: 0;
    margin: 0;
}

.save-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.save-success p {
    margin: 0 0 0.5rem 0;
}

.save-code-display {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.save-code-display input {
    flex: 1;
    font-family: "Courier New", monospace;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
}

.save-loading,
.load-loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-light);
}

.load-input-container {
    margin: 1rem 0;
}

.load-input-container input {
    width: 100%;
    font-family: "Courier New", monospace;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-lg);
    text-transform: uppercase;
}

.load-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin: 1rem 0;
}

.load-error p {
    margin: 0;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.fullscreen-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.json-editor-panel.hidden {
    display: none;
}

.simulation-panel.fullscreen {
    flex: 1;
}

/* Submit dialog specific styles */
.submit-dialog {
    min-width: 400px;
}

.cascade-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cascade-dropdown {
    display: none;
}

.cascade-dropdown.visible {
    display: flex;
}

.page-path-preview {
    background: var(--bg-light);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    font-family: monospace;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
}

.task-duration {
    font-size: 0.7rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.validation-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.validation-indicator.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.validation-indicator.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.validation-indicator.error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
}

.validation-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.validation-category {
    background: var(--bg-light);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    border-left: 4px solid;
    flex: 1;
    min-width: 300px;
}

.validation-category.critical-errors {
    border-left-color: var(--error-color);
}

.validation-category.resource-issues {
    border-left-color: #ffc107;
}

.validation-category.scheduling-conflicts {
    border-left-color: #fd7e14;
}

.validation-category.optimization-suggestions {
    border-left-color: #0dcaf0;
}

.validation-category h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.validation-issue {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    border-left: 3px solid;
}

.validation-issue.error {
    border-left-color: var(--error-color);
}

.validation-issue.warning {
    border-left-color: #ffc107;
}

.validation-issue.info {
    border-left-color: #0dcaf0;
}

/* Enhanced features styling */
.json-highlight {
    background-color: #ffeb3b !important;
    animation: highlight-fade 2s ease-out;
}

@keyframes highlight-fade {
    0% {
        background-color: #ffeb3b !important;
    }
    100% {
        background-color: transparent !important;
    }
}

.task-track.drop-zone {
    background: rgba(0, 123, 255, 0.1) !important;
    border: 2px dashed var(--primary-color) !important;
}

.task-track.drop-zone.invalid {
    background: rgba(220, 53, 69, 0.1) !important;
    border: 2px dashed var(--error-color) !important;
}

.resources-panel {
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    margin: 0.5rem 0;
    border: 1px solid var(--border-color);
}

.resources-panel h5 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 600;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    grid-auto-flow: column;
    grid-template-rows: repeat(4, minmax(60px, auto));
    gap: 0.375rem;
    max-height: 280px;
    overflow-x: auto;
}

.resource-item {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
}

.resource-emoji {
    font-size: 1rem;
    flex-shrink: 0;
}

.resource-info {
    flex: 1;
    min-width: 0;
}

.resource-name {
    font-weight: 600;
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-state {
    font-size: 0.7rem;
    padding: 0.125rem 0.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    line-height: 1;
    margin-top: 0.125rem;
    display: inline-block;
}

.resource-state.clean {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.resource-state.dirty {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
}

.resource-state.available {
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.resource-state.in-use {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.undo-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tutorial & Gamification Styles */
.tutorial-panel {
    display: none; /* Hidden by default */
    width: 350px;
    flex-shrink: 0; /* Prevent the panel from shrinking */
    background: #fff;
    z-index: 1500;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.tutorial-panel.visible {
    display: flex; /* Show the panel and let it take up space */
}

.tutorial-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tutorial-header h3 {
    margin: 0;
}

.tutorial-exit-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.tutorial-exit-btn:hover {
    color: var(--text-color);
}

.tutorial-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    line-height: 1.6;
}

.tutorial-content code {
    background: var(--bg-light);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
}

.tutorial-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.tutorial-footer button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
}

.tutorial-footer button:disabled {
    background: var(--border-color);
    color: var(--text-light);
    cursor: not-allowed;
}

.tutorial-footer button#tutorial-next-btn {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tutorial-footer button#tutorial-next-btn:disabled {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

/* Hide buttons when tutorial is active */
body.tutorial-active #load-sample-btn,
body.tutorial-active #render-simulation-btn,
body.tutorial-active #submit-btn,
body.tutorial-active #auto-render-toggle {
    display: none;
}

/* Help Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    right: 0;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Simulation Library specific styles */
#simulation-library-dropdown a {
    font-size: 14px;
    white-space: normal;
    line-height: 1.3;
}

#simulation-library-dropdown a::after {
    content: attr(title);
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    font-style: italic;
}

/* --- Simulation Player Styles --- */
.player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
    border-left: 1px solid var(--border-color);
}

/* --- Dark-mode overrides for simulation render area --- */
/* Force simulation containers and common child elements to use dark backgrounds
       so they don't show up as white when the page is in dark mode. These use
       !important to beat any inline or component-specific white backgrounds. */
[data-theme="dark"] .simulation-panel,
[data-theme="dark"] .simulation-content,
[data-theme="dark"] .simulation-timeline,
[data-theme="dark"] .simulation-container,
[data-theme="dark"] .task-track,
[data-theme="dark"] .actor-lanes,
[data-theme="dark"] .actor-lane,
[data-theme="dark"] #digital-space-canvas,
[data-theme="dark"] #display-canvas,
[data-theme="dark"] .player-controls {
    background: var(--bg-color, #0f1113) !important;
    color: var(--text-color, #e6eef3) !important;
}

/* Child elements that may have hard-coded white backgrounds */
[data-theme="dark"] .task-block,
    [data-theme="dark"] .resource-item,
    [data-theme="dark"] .time-marker,
    /* Keep playhead red in dark mode (avoid global background overrides turning it dark) */
    [data-theme="dark"] .simulation-playhead,
    [data-theme="dark"] .task-block::before,
    [data-theme="dark"] .task-block::after {
    background: var(--bg-surface, #16171a) !important;
    color: var(--text-color, #e6eef3) !important;
    border-color: var(--border-color, #2a2d31) !important;
}

/* Ensure any canvas elements get a dark backing as well */
[data-theme="dark"] canvas {
    background-color: transparent !important;
}

/* If there are inline styles setting white backgrounds, prefer these darker values */
[data-theme="dark"] [style*="background" i] {
    background: var(--bg-surface, #16171a) !important;
}

/* Fix for simulation header and its border in dark mode */
[data-theme="dark"] .simulation-header {
    background: var(--bg-surface, #16171a) !important;
    color: var(--text-color, #e6eef3) !important;
    border-color: var(--border-color, #2a2d31) !important;
}

[data-theme="dark"] .simulation-header,
[data-theme="dark"] .simulation-header * {
    background: transparent !important;
    color: var(--text-color, #e6eef3) !important;
}

/* Fix simulation-container border/shadow in dark mode */
[data-theme="dark"] .simulation-container {
    background: var(--bg-color, #0f1113) !important;
    border: 1px solid var(--border-color, #2a2d31) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .simulation-container * {
    box-shadow: none !important;
}

#player-play-pause-btn {
    font-size: 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 32px;
}

.player-time-display {
    font-size: 0.875rem;
    font-family: monospace;
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.player-speed-control select {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem;
}

/* --- Playhead and Scrubbing Styles --- */
.simulation-playhead {
    position: absolute;
    top: 0;
    bottom: -10000px; /* Extends way down to cover all actor lanes */
    left: 0; /* Positioned by JavaScript */
    width: 2px;
    background-color: rgba(220, 53, 69, 0.8); /* Red line */
    z-index: 50;
    pointer-events: none; /* The handle will capture events */
}

.scrub-handle {
    position: absolute;
    top: 0;
    left: -8px;
    width: 18px;
    height: 30px; /* Matches height of time marker bar */
    cursor: ew-resize;
    pointer-events: all; /* Make the handle interactive */
    z-index: 51;
    background: transparent; /* Keep it invisible but grabbable */
}

.scrub-handle::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 8px;
    width: 2px;
    height: 20px;
    background: #dc3545;
    border-radius: 2px;
}

/* Dark-mode exception: keep playhead and scrub handle visually red */
[data-theme="dark"] .timeline-playhead {
    background-color: rgba(220, 53, 69, 0.95) !important; /* brighter red */
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.6) !important;
}

[data-theme="dark"] .scrub-handle::after {
    background: #dc3545 !important;
}

/* Live State Panel Styles */
#live-state-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 0.75rem; /* Match simulation-content padding */
}

.live-time {
    font-weight: normal;
    color: var(--primary-color);
}

/* Modal Form Styles */
.modal-content {
    margin: 1rem 0;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.form-group {
    flex: 1;
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Enhanced number input spinner controls for modal forms */
.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    opacity: 1;
    height: 24px;
    width: 24px;
    cursor: pointer;
    margin: 0;
}

.form-group input[type="number"]:hover::-webkit-outer-spin-button,
.form-group input[type="number"]:hover::-webkit-inner-spin-button {
    background: rgba(0, 123, 255, 0.1);
    border-radius: 4px;
}

/* Time Input Toggle Styles */
.time-input-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.25rem; /* Reduced from 0.5rem */
    padding: 0.125rem 0; /* Reduced from 0.25rem */
}

/* Make radio button row half height */
.form-row:has(.time-input-toggle) {
    margin-bottom: 0.375rem; /* Half of the normal 0.75rem */
}

.time-input-toggle label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

.time-input-toggle input[type="radio"] {
    width: auto;
    margin: 0;
}

#duration-input-group,
#end-time-input-group {
    transition: opacity 0.2s ease;
}

/* Time input fields are now naturally aligned with the restructured HTML */

/* Auto-populated field styling */
input[style*="background-color: #e8f4f8"] {
    border-left: 3px solid var(--primary-color);
}

/* Required field validation styling */
.form-group input.required-missing,
.form-group select.required-missing {
    border: 2px solid var(--error-color);
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.form-group input.required-missing:focus,
.form-group select.required-missing:focus {
    outline: none;
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

/* Custom properties styling */
.custom-properties-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.custom-properties-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.custom-properties-section .section-header label {
    font-weight: 600;
    margin: 0;
}

.btn-small {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    height: auto;
    line-height: 1.2;
}

.custom-properties-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.custom-property-group {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
}

.custom-property-group .form-row {
    gap: 0.75rem;
}

.form-group-actions {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 80px;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-remove:hover {
    background: #c82333;
}

/* Created object styling in simulation player */
.resource-item.created-object {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-left: 3px solid #4caf50;
    position: relative;
}

.resource-item.created-object::after {
    content: "✨";
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 12px;
    opacity: 0.7;
}

/* Extended Actors (Phase 4) styling */
.interaction-object-select option[value="self"] {
    background: #f0f8ff;
    font-style: italic;
    font-weight: 500;
}

optgroup[label*="Traditional Actors"] {
    font-weight: bold;
    color: #2c5aa0;
}

optgroup[label*="Equipment"] {
    font-weight: bold;
    color: #b8860b;
}

optgroup[label*="Resources"] {
    font-weight: bold;
    color: #8b4513;
}

optgroup[label*="Products"] {
    font-weight: bold;
    color: #556b2f;
}

/* Interactions Section */
.interactions-section {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.property-changes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.property-changes-header h6 {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-color);
}

.property-changes-list {
    margin-top: 0.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-header h4 {
    margin: 0;
    color: var(--text-color);
}

.interaction-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
}

.interaction-item .form-row {
    margin-bottom: 0.5rem;
}

.interaction-item .form-row:last-child {
    margin-bottom: 0;
}

.interaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.interaction-header h5 {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-color);
}

.remove-interaction-btn {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.remove-interaction-btn:hover {
    background: #c82333;
}

.property-change-group {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.property-change-group .form-row {
    margin-bottom: 0.5rem;
}

.property-change-group .form-row:last-child {
    margin-bottom: 0;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #004085;
}

/* Revert After Task checkbox styling */
.revert-after-checkbox {
    width: auto !important;
    flex-shrink: 0;
    margin: 0;
}

.special-subtitle {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    color: rgb(18, 108, 168); /* --primary-color-rgb */
}

/* === INTERACTIONS MODAL STYLES === */

.interaction-group {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.interaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.interaction-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.btn-remove {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-remove:hover {
    background: var(--error-color);
    border-color: var(--error-color);
    color: white;
}

.interaction-fields .form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.inline-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.inline-checkbox input {
    width: auto;
    margin: 0;
}

/* === FEEDBACK MODAL STYLES === */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feedback-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feedback-form-field label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.feedback-form-field input,
.feedback-form-field textarea {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
    color: var(--text-color);
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.feedback-form-field input:focus,
.feedback-form-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(18, 108, 168, 0.1);
}

.feedback-form-field textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.feedback-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.feedback-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 0.75rem;
    border-radius: 4px;
}

.feedback-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 0.75rem;
    border-radius: 4px;
}

/* Ensure feedback modal feels at home in the playground */
#feedback-modal .dialog {
    max-width: 500px;
    width: 90%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

#feedback-modal .dialog h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

#feedback-modal .dialog p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Button consistency with playground theme */
.feedback-actions .btn-secondary {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.feedback-actions .btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.feedback-actions .btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.feedback-actions .btn-primary:hover:not(:disabled) {
    background: #0a5f94;
    border-color: #0a5f94;
}

.feedback-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    min-width: 120px;
    padding: var(--spacing-xs) 0;
    font-family: var(--font-family-body);
    font-size: var(--font-size-sm);
}

.context-menu-item {
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    color: var(--text-color);
    user-select: none;
    transition: background-color var(--transition-fast);
}

.context-menu-item:hover {
    background-color: var(--bg-hover);
}

.context-menu-item:active {
    background-color: var(--bg-dark);
}

/* Save/Load Method Selection Styles */
.save-method-selection,
.load-method-selection {
    margin-bottom: 1.5rem;
}

.save-method-options,
.load-method-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.save-method-option,
.load-method-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-color);
}

.save-method-option:hover,
.load-method-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.save-method-option input[type="radio"],
.load-method-option input[type="radio"] {
    margin-top: 0.2rem;
}

.save-method-option input[type="radio"]:checked + .save-method-content,
.load-method-option input[type="radio"]:checked + .load-method-content {
    color: var(--primary-color);
}

.save-method-option:has(input[type="radio"]:checked),
.load-method-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.05);
}

.save-method-content,
.load-method-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.save-method-content strong,
.load-method-content strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.save-method-content small,
.load-method-content small {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.3;
}

.save-method-option.disabled,
.load-method-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-light);
}

.save-method-option.disabled:hover,
.load-method-option.disabled:hover {
    border-color: var(--border-color);
    background: var(--bg-light);
}

/* Local Save Name Input */
.local-save-name {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-hover);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.local-save-name label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.local-save-name input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    background: white;
}

.local-save-name input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.local-save-name small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Local Load Section */
.local-load-container {
    text-align: center;
    padding: 1rem;
    background: var(--bg-hover);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

#browse-local-file-btn {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

#browse-local-file-btn:hover:not(:disabled) {
    background: #0a5f94;
    border-color: #0a5f94;
}

#browse-local-file-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#selected-file-info {
    text-align: left;
    padding: 0.75rem;
    background: rgba(13, 110, 253, 0.05);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(13, 110, 253, 0.2);
}

#selected-file-info p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

#selected-file-name {
    font-family: monospace;
    font-weight: 600;
    color: var(--primary-color);
}

/* Disable animations during resize */
body.resizing-active * {
    transition: none !important;
    animation: none !important;
}

body.dragging-active * {
    transition: none !important;
    animation: none !important;
}

/* Disable transitions during theme switching */
body.theme-switching * {
    transition: none !important;
    animation: none !important;
}

/* Monaco editor line highlighting for click-to-JSON feature */
.highlighted-line {
    background-color: rgba(255, 223, 0, 0.3) !important;
    animation: highlightFade 2s ease-out;
}

@keyframes highlightFade {
    0% {
        background-color: rgba(255, 223, 0, 0.8) !important;
    }
    100% {
        background-color: rgba(255, 223, 0, 0.1) !important;
    }
}

/* Dark Mode Specific Styles */
[data-theme="dark"] .playground-header {
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Firefox fallback */
    background: rgba(26, 26, 26, 0.95);
}

[data-theme="dark"] .header-actions button {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .header-actions button:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

[data-theme="dark"] .header-actions .action-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .header-actions .action-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

[data-theme="dark"] .mode-toggle-btn.dark-active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.mode-toggle-btn.dark-active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

[data-theme="dark"] .dialog {
    background: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .dialog input,
[data-theme="dark"] .dialog select,
[data-theme="dark"] .dialog textarea {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .dialog input:focus,
[data-theme="dark"] .dialog select:focus,
[data-theme="dark"] .dialog textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 159, 219, 0.2);
}

[data-theme="dark"] .validation-result-item.error {
    background: rgba(248, 113, 113, 0.1);
}

[data-theme="dark"] .validation-result-item.warning {
    background: rgba(251, 191, 36, 0.1);
}

[data-theme="dark"] .validation-result-item.success {
    background: rgba(74, 222, 128, 0.1);
}

[data-theme="dark"] .validation-result-item.suggestion {
    background: rgba(74, 159, 219, 0.1);
}

/* Simulation Timeline Dark Mode Styles */
[data-theme="dark"] .simulation-content {
    background: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .simulation-timeline {
    background: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .task-block {
    background: var(--bg-light) !important;
    color: var(--text-color) !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .task-block:hover {
    background: var(--bg-hover) !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .actor-lane {
    background: var(--bg-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .time-marker {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .resource-item {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .resource-info {
    color: var(--text-color);
}

[data-theme="dark"] .resource-name {
    color: var(--text-color);
}

[data-theme="dark"] .resources-panel {
    background: var(--bg-light);
    border-color: var(--border-color);
}

[data-theme="dark"] .tab-content {
    background: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .tab-btn {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .tab-btn.active {
    background: var(--bg-color);
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

[data-theme="dark"] .tab-btn:hover {
    background: var(--bg-hover);
}

/* Space Editor Dark Mode Styles */
[data-theme="dark"] .space-canvas {
    background-color: var(--bg-color) !important;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px) !important;
}

[data-theme="dark"] #digital-space-canvas {
    background-color: var(--bg-color) !important;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px) !important;
}

[data-theme="dark"] #display-canvas {
    background-color: var(--bg-color) !important;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px) !important;
}

[data-theme="dark"] .space-editor-container {
    background: var(--bg-color);
}

[data-theme="dark"] .properties-panel-container {
    background: var(--bg-light);
    border-color: var(--border-color);
}

[data-theme="dark"] .properties-panel-header {
    background: var(--bg-dark);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .options-panel-container {
    background: var(--bg-light);
    border-color: var(--border-color);
}

[data-theme="dark"] .options-panel-header {
    background: var(--bg-dark);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] #properties-panel-content,
[data-theme="dark"] #digital-properties-panel-content,
[data-theme="dark"] #display-properties-panel-content,
[data-theme="dark"] #options-panel-content,
[data-theme="dark"] #digital-options-panel-content,
[data-theme="dark"] #display-options-panel-content {
    background: var(--bg-light);
    color: var(--text-color);
}

[data-theme="dark"] .option-field {
    color: var(--text-color);
}

[data-theme="dark"] .option-field label {
    color: var(--text-color);
}

[data-theme="dark"] .option-field input,
[data-theme="dark"] .option-field select {
    background: var(--bg-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .zoom-controls {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

[data-theme="dark"] .zoom-btn {
    background: var(--bg-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .zoom-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

/* Simulation Library Dropdown */
[data-theme="dark"] .dropdown-content {
    background: var(--bg-light);
    border-color: var(--border-color);
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .dropdown-content a {
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-content a:hover {
    background: var(--bg-hover);
}

/* Additional Dark Mode Styles */
[data-theme="dark"] .playground-main {
    background: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .validation-panel {
    background: var(--bg-light);
}

[data-theme="dark"] .validation-header {
    color: var(--text-color);
}

[data-theme="dark"] .validation-content {
    color: var(--text-color);
}

[data-theme="dark"] .validation-results-grouped {
    background: var(--bg-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-secondary {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

[data-theme="dark"] .btn:hover,
[data-theme="dark"] .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

[data-theme="dark"] .placeholder {
    color: var(--text-light);
}

/* Panel borders and dividers */
[data-theme="dark"] .panel-content {
    background: var(--bg-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .json-editor-panel {
    border-color: var(--border-color);
}

[data-theme="dark"] .simulation-panel {
    background: var(--bg-color);
}

[data-theme="dark"] .playground-bottom {
    background: var(--bg-light);
    border-color: var(--border-color);
}

[data-theme="dark"] .playground-top {
    border-color: var(--border-color);
}

/* Timeline Header and Background Dark Mode Styles */
[data-theme="dark"] .timeline-header {
    background: var(--bg-light) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .timeline-time-axis {
    background: var(--bg-light) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .timeline-time-markers {
    background: var(--bg-light);
    color: var(--text-color);
}

[data-theme="dark"] .gantt-actor-row {
    border-color: var(--border-color) !important;
    background: var(--bg-color);
}

[data-theme="dark"] .expanded-timeline-header {
    background: var(--bg-light) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .expanded-timeline-header h5 {
    color: var(--text-color) !important;
}

/* Modal-specific Dark Mode Styles */
[data-theme="dark"] #add-object-modal .dialog,
[data-theme="dark"] #add-task-modal .dialog,
[data-theme="dark"] #feedback-modal .dialog {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] #add-object-modal .modal-content,
[data-theme="dark"] #add-task-modal .modal-content,
[data-theme="dark"] #feedback-modal .feedback-form {
    background: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] #add-object-modal .form-group,
[data-theme="dark"] #add-task-modal .form-group {
    color: var(--text-color);
}

[data-theme="dark"] #add-object-modal .form-group label,
[data-theme="dark"] #add-task-modal .form-group label,
[data-theme="dark"] #feedback-modal .feedback-form-field label {
    color: var(--text-color);
}

[data-theme="dark"] #add-object-modal .form-group input,
[data-theme="dark"] #add-object-modal .form-group select,
[data-theme="dark"] #add-task-modal .form-group input,
[data-theme="dark"] #add-task-modal .form-group select,
[data-theme="dark"] #feedback-modal .feedback-form-field input,
[data-theme="dark"] #feedback-modal .feedback-form-field textarea {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] #add-object-modal .form-group input:focus,
[data-theme="dark"] #add-object-modal .form-group select:focus,
[data-theme="dark"] #add-task-modal .form-group input:focus,
[data-theme="dark"] #add-task-modal .form-group select:focus,
[data-theme="dark"] #feedback-modal .feedback-form-field input:focus,
[data-theme="dark"] #feedback-modal .feedback-form-field textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 159, 219, 0.2);
}

[data-theme="dark"] #add-object-modal .form-group small,
[data-theme="dark"] #add-task-modal .form-group small {
    color: var(--text-light);
}

/* Interactions section in task modal */
[data-theme="dark"] #add-task-modal .interactions-section {
    background: var(--bg-color);
    border-color: var(--border-color);
}

[data-theme="dark"] #add-task-modal .section-header h4 {
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .interaction-item {
    background: var(--bg-light);
    border-color: var(--border-color);
}

[data-theme="dark"] #add-task-modal .interaction-header h5 {
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .time-input-toggle label {
    color: var(--text-color);
}

/* Add Interaction Modal/Group Dark Mode Styles */
[data-theme="dark"] #add-task-modal .interaction-group {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .interaction-header {
    border-color: var(--border-color);
}

[data-theme="dark"] #add-task-modal .interaction-header h5 {
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .btn-remove {
    background: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-light);
}

[data-theme="dark"] #add-task-modal .btn-remove:hover {
    background: var(--error-color);
    border-color: var(--error-color);
    color: white;
}

[data-theme="dark"] #add-task-modal .interaction-fields {
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .interaction-fields .form-group label {
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .interaction-fields .form-group input,
[data-theme="dark"] #add-task-modal .interaction-fields .form-group select {
    background: var(--bg-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] #add-task-modal .interaction-fields .form-group input:focus,
[data-theme="dark"]
    #add-task-modal
    .interaction-fields
    .form-group
    select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 159, 219, 0.2);
}

[data-theme="dark"] #add-task-modal .inline-checkbox {
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .inline-checkbox input {
    background: var(--bg-color);
    border-color: var(--border-color);
}

/* Property changes within interactions */
[data-theme="dark"] #add-task-modal .property-changes-header {
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .property-changes-header h6 {
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .property-change-group {
    background: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .property-change-group .form-group label {
    color: var(--text-color);
}

[data-theme="dark"] #add-task-modal .property-change-group .form-group input,
[data-theme="dark"] #add-task-modal .property-change-group .form-group select {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"]
    #add-task-modal
    .property-change-group
    .form-group
    input:focus,
[data-theme="dark"]
    #add-task-modal
    .property-change-group
    .form-group
    select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 159, 219, 0.2);
}

/* Display Options Panel Dark Mode Styles */
[data-theme="dark"] #display-options-panel-content {
    background: var(--bg-light);
    color: var(--text-color);
}

[data-theme="dark"] #display-options-panel-content .option-field {
    color: var(--text-color);
}

[data-theme="dark"] #display-options-panel-content .option-field label {
    color: var(--text-color);
}

[data-theme="dark"] #display-options-panel-content .option-field input,
[data-theme="dark"] #display-options-panel-content .option-field select {
    background: var(--bg-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] #display-options-panel-content .option-field input:focus,
[data-theme="dark"] #display-options-panel-content .option-field select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 159, 219, 0.2);
}

[data-theme="dark"] #display-options-panel-content .btn,
[data-theme="dark"] #display-options-panel-content .btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] #display-options-panel-content .btn:hover,
[data-theme="dark"] #display-options-panel-content .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

[data-theme="dark"] #display-options-panel-content .element-quick-btn {
    background: var(--bg-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] #display-options-panel-content .element-quick-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Dialog buttons dark mode for modals */
[data-theme="dark"] #add-object-modal .dialog-buttons .btn-secondary,
[data-theme="dark"] #add-task-modal .dialog-buttons .btn-secondary,
[data-theme="dark"] #feedback-modal .feedback-actions .btn-secondary {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] #add-object-modal .dialog-buttons .btn-secondary:hover,
[data-theme="dark"] #add-task-modal .dialog-buttons .btn-secondary:hover,
[data-theme="dark"] #feedback-modal .feedback-actions .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

[data-theme="dark"] #add-object-modal .dialog-buttons .btn-primary,
[data-theme="dark"] #add-task-modal .dialog-buttons .btn-primary,
[data-theme="dark"] #feedback-modal .feedback-actions .btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

[data-theme="dark"] #add-object-modal .dialog-buttons .btn-primary:hover,
[data-theme="dark"] #add-task-modal .dialog-buttons .btn-primary:hover,
[data-theme="dark"] #feedback-modal .feedback-actions .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Feedback modal specific elements */
[data-theme="dark"] #feedback-modal .feedback-message {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] #feedback-modal .feedback-success {
    background: rgba(74, 222, 128, 0.1);
    color: var(--success-color);
    border-color: var(--success-color);
}

[data-theme="dark"] #feedback-modal .feedback-error {
    background: rgba(248, 113, 113, 0.1);
    color: var(--error-color);
    border-color: var(--error-color);
}

