/* -------------------------------------------------------------
 * Truva Studio - Creative Automation Style System
 * ------------------------------------------------------------- */

/* Custom Properties / Color Tokens */
:root {
  --bg-app: #090b10;
  --bg-sidebar: #10141e;
  --bg-card: #151b26;
  --bg-input: #1a2232;
  --border-color: rgba(255, 255, 255, 0.08);
  
  --primary-color: #ff5e36;
  --primary-hover: #ff724f;
  --primary-glow: rgba(255, 94, 54, 0.25);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --transition-speed: 0.2s;
  --font-ui: 'Poppins', sans-serif;
  --font-brand: 'Poppins', sans-serif;
  --font-logo: 'Poppins', sans-serif;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  display: flex;
}

/* App Layout Grid */
.app-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-app);
}

/* -------------------------------------------------------------
 * SIDEBAR PANEL
 * ------------------------------------------------------------- */
.sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(255,94,54,0.03) 0%, rgba(0,0,0,0) 100%);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sidebar Accordions */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Custom Scrollbar for Sidebar */
.sidebar-content::-webkit-scrollbar {
  width: 6px;
}
.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.accordion-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: visible;
  transition: border-color var(--transition-speed);
}

.accordion-item:focus-within,
.accordion-item.active {
  border-color: rgba(255, 94, 54, 0.3);
}

.accordion-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background-color: rgba(255, 255, 255, 0.01);
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.header-icon {
  width: 18px;
  height: 18px;
  color: var(--primary-color);
  margin-right: 12px;
}

.accordion-header h2 {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.arrow-icon {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  transition: transform var(--transition-speed) ease;
}

.accordion-item.active .arrow-icon {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: none;
  flex-direction: column;
  gap: 14px;
}

.accordion-item.active .accordion-body {
  display: flex;
  border-bottom-left-radius: 11px;
  border-bottom-right-radius: 11px;
}

/* Form Controls & Styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.row {
  flex-direction: row;
  gap: 12px;
}

.form-group.row .col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.row.v-align {
  align-items: center;
  justify-content: space-between;
}

label {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea {
  resize: vertical;
}

/* Custom Select Dropdown Wrapper */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "▼";
  font-size: 0.6rem;
  color: var(--text-muted);
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

select {
  appearance: none;
  padding-right: 32px;
}

select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Feature Bullet Controls */
.feature-item-form {
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 8px;
  background-color: rgba(255,255,255,0.01);
  margin-bottom: 8px;
}

.feature-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-selector-wrapper {
  position: relative;
}

.icon-select-btn {
  width: 36px;
  height: 36px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.icon-select-btn:hover {
  border-color: var(--primary-color);
  background-color: rgba(255,94,54,0.05);
}

.icon-select-btn svg {
  width: 18px;
  height: 18px;
}

.icon-dropdown {
  position: absolute;
  top: 42px;
  left: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  z-index: 100;
  display: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  width: 180px;
}

.icon-dropdown.show {
  display: grid;
}

.icon-option {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-speed);
}

.icon-option:hover {
  background-color: var(--primary-color);
  color: white;
}

.icon-option svg {
  width: 16px;
  height: 16px;
}

.feature-text-input {
  flex: 1;
}

.btn-remove-highlight {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary, #999);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-remove-highlight:hover:not(:disabled) {
  background-color: rgba(255, 59, 48, 0.1);
  border-color: rgba(255, 59, 48, 0.4);
  color: #ff3b30;
}

.btn-remove-highlight:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-add-highlight {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  background-color: rgba(255, 94, 54, 0.06);
  border: 1px dashed rgba(255, 94, 54, 0.4);
  border-radius: 8px;
  color: var(--primary-color);
  font-weight: 400;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-highlight:hover:not(:disabled) {
  background-color: rgba(255, 94, 54, 0.12);
}

.btn-add-highlight:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Image Upload Dropzone */
.upload-dropzone {
  border: 2px dashed rgba(255, 94, 54, 0.4);
  background-color: rgba(255, 94, 54, 0.02);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-speed);
  user-select: none;
}

.upload-dropzone:hover {
  border-color: var(--primary-color);
  background-color: rgba(255, 94, 54, 0.05);
  transform: translateY(-2px);
}

.upload-icon {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.upload-dropzone span {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.upload-dropzone p {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.disabled-controls {
  opacity: 0.35;
  pointer-events: none;
  transition: opacity var(--transition-speed);
}

/* Sub-panel sliders & details */
.sub-panel {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  background-color: rgba(255,255,255,0.01);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.label-with-value {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label-with-value span {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--primary-color);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sliders-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.sliders-section h3 {
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

/* Custom Sliders (Range inputs) */
input[type="range"] {
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 0 6px var(--primary-glow);
  transition: transform var(--transition-speed);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Color Picker & Eyedropper */
.color-picker-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

input[type="color"] {
  appearance: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.eyedropper-btn {
  width: 32px;
  height: 32px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.eyedropper-btn:hover,
.eyedropper-btn.active {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: rgba(255,94,54,0.05);
}

.eyedropper-btn svg {
  width: 16px;
  height: 16px;
}

/* Brush controls specific */
.brush-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.brush-btn {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 400;
  transition: all var(--transition-speed);
}

.brush-btn:hover {
  color: var(--text-main);
  border-color: var(--text-dim);
}

.brush-btn.active {
  background-color: rgba(255,94,54,0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.brush-btn svg {
  width: 14px;
  height: 14px;
}

.action-btn-danger {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 400;
  transition: all var(--transition-speed);
}

.action-btn-danger.outline {
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: transparent;
  color: #ef4444;
}

.action-btn-danger.outline:hover {
  background-color: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
}

/* Theme presets container */
.theme-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.theme-btn {
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-speed);
}

.theme-btn span {
  font-size: 0.7rem;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  z-index: 2;
  letter-spacing: 0.02em;
}

.theme-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.25);
  transition: background var(--transition-speed);
}

.theme-btn:hover {
  transform: translateY(-1px);
}

.theme-btn:hover::before {
  background-color: rgba(0,0,0,0.1);
}

.theme-btn.active {
  border-color: white;
  box-shadow: 0 0 0 2px var(--bg-app), 0 0 0 3.5px var(--primary-color);
}

/* AI loader screen */
#ai-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: rgba(16, 20, 30, 0.85);
  border-radius: 8px;
  padding: 20px;
  margin-top: 10px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 94, 54, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

#ai-status-text {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-main);
  text-align: center;
}

/* Action Panel Buttons (Download, Reset) */
.sidebar-actions {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: rgba(0,0,0,0.15);
}

.action-btn {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.action-btn svg {
  width: 18px;
  height: 18px;
}

.action-btn.primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 94, 54, 0.25);
}

.action-btn.primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 20px rgba(255, 94, 54, 0.4);
  transform: translateY(-1px);
}

.action-btn.outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.action-btn.outline:hover {
  border-color: var(--text-dim);
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.02);
}

/* -------------------------------------------------------------
 * WORKSPACE PREVIEW AREA
 * ------------------------------------------------------------- */
.workspace {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #0f121a;
  background-image: radial-gradient(circle at 50% 30%, rgba(255, 94, 54, 0.035) 0%, rgba(0,0,0,0) 70%);
}

.workspace-header {
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(16, 20, 30, 0.4);
  backdrop-filter: blur(10px);
}

.workspace-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-title h2 {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.badge {
  background-color: rgba(255,94,54,0.1);
  color: var(--primary-color);
  border: 1px solid rgba(255,94,54,0.25);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workspace-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.workspace-meta strong {
  color: var(--text-main);
  font-weight: 400;
}

/* Viewport Area */
.viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}

/* Creative Card Frame */
.creative-card-container {
  position: relative;
  width: 480px; /* Base container width */
  height: 720px; /* 2:3 aspect ratio */
  border-radius: 16px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.65);
  background-color: #222;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#creative-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Interactive DOM Overlay */
.interactive-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none; /* only the editable nodes catch the pointer, so the transform box below stays draggable */
  user-select: none;
}

/* Interactive Nodes */
.overlay-node {
  position: absolute;
  text-align: center;
  color: white;
  pointer-events: none;
}
.overlay-node .editable-node,
.overlay-node img { pointer-events: auto; }

/* Property-image transform box */
.img-transform-box {
  position: absolute;
  z-index: 8;
  box-sizing: border-box;
  border: 1.5px dashed rgba(255, 255, 255, 0.85);
  outline: 1px solid rgba(0, 0, 0, 0.25);
  cursor: move;
  transform-origin: center center;
}
.img-transform-box.hidden { display: none; }
.img-transform-box:hover, .img-transform-box.dragging { border-color: var(--primary-color); }
.tb-handle {
  position: absolute;
  width: 14px; height: 14px;
  background: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.tb-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.tb-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.tb-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.tb-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }

/* While exporting, hide every bit of editor chrome and hover styling */
.creative-card-container.exporting .img-transform-box,
.creative-card-container.exporting #brush-cursor,
.creative-card-container.exporting #eyedropper-indicator { display: none !important; }
.creative-card-container.exporting .editable-node { border-color: transparent !important; background: transparent !important; box-shadow: none !important; }

.editable-node {
  display: inline-block;
  cursor: text;
  outline: none;
  border: 1px dashed transparent;
  border-radius: 4px;
  padding: 2px 6px;
  transition: background-color 0.15s, border-color 0.15s;
  pointer-events: auto;
}

.editable-node:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.08);
}

.editable-node:focus {
  border-color: var(--primary-color) !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 0 8px rgba(255, 94, 54, 0.3);
}

/* Typography styles matching canvas drawing */
.tagline-node {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.title-node {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 3.5rem;
  line-height: 1.1;
  word-wrap: break-word;
  white-space: pre-wrap;
  width: 100%;
}

.banner-node-wrapper {
  background-color: white;
  border-radius: 2px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  width: max-content;
  max-width: 100%;
}

.banner-node {
  color: #111;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  text-align: left;
}

.banner-node:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background-color: rgba(0, 0, 0, 0.03);
}

.banner-node:focus {
  border-color: var(--primary-color) !important;
  color: #111 !important;
}

/* Feature bullets layout */
.features-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.overlay-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 4px;
  width: 90%;
}

.feature-icon-span {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.feature-icon-span svg {
  width: 18px;
  height: 18px;
}

.feature-text-span {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.74rem;
  letter-spacing: 0.01em;
}

/* Footer elements style */
.footer-banner-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-banner-node {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: #4b5563;
  text-transform: none;
  letter-spacing: 0.01em;
}

.footer-banner-node strong {
  color: var(--primary-color);
}

.footer-contacts-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 400;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-icon-svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.contact-node {
  padding: 1px 2px;
  font-size: 0.72rem;
}

.footer-contact-divider {
  opacity: 0.4;
}

/* Eyedropper Color Picker Tool UI */
#eyedropper-indicator {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  pointer-events: none;
  z-index: 200;
  transform: translate(-50%, -50%);
}

/* Brush Cursor Tool UI */
#brush-cursor {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.hidden {
  display: none !important;
}

/* Workspace Footer */
.workspace-footer {
  height: 48px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background-color: rgba(16, 20, 30, 0.2);
}

.badge-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.green-dot { background-color: #10b981; box-shadow: 0 0 6px #10b981; }
.orange-dot { background-color: #ff5e36; box-shadow: 0 0 6px #ff5e36; }
.purple-dot { background-color: #8b5cf6; box-shadow: 0 0 6px #8b5cf6; }

/* Responsive adjustments */
@media (max-height: 800px) {
  .sidebar-header {
    padding: 14px 20px;
  }
  .sidebar-content {
    padding: 12px;
    gap: 8px;
  }
  .accordion-header {
    padding: 10px 14px;
  }
  .creative-card-container {
    width: 400px;
    height: 600px;
  }
  /* Scale down overlay text sizes visually */
  .tagline-node { font-size: 0.9rem; }
  .title-node { font-size: 2.8rem; }
  .banner-node { font-size: 0.75rem; padding: 6px 8px; }
  .feature-text-span { font-size: 0.6rem; }
  .feature-icon-span svg { width: 14px; height: 14px; }
  .features-list-wrapper { gap: 8px; }
}

/* ---------------------------------------------------------------
 * Truva CMS Property Search (Select Truva Property)
 * --------------------------------------------------------------- */
.cms-property-box { display: flex; flex-direction: column; gap: 10px; }
.cms-property-box-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--text-muted); gap: 8px;
}
.cms-refresh-btn {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  background: transparent; border: 1px solid var(--border-color); color: var(--text-muted);
  font-size: 11px; padding: 4px 9px; border-radius: 6px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.cms-refresh-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.cms-refresh-btn svg { width: 12px; height: 12px; }
.cms-refresh-btn.spinning svg { animation: cms-spin 0.8s linear infinite; }
@keyframes cms-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.cms-search-row { position: relative; display: flex; align-items: center; }
.cms-search-icon { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--text-dim); pointer-events: none; }
#cms-property-search {
  width: 100%; background-color: var(--bg-input); border: 1px solid var(--border-color);
  color: var(--text-main); border-radius: 8px; padding: 9px 30px 9px 32px; font-size: 12.5px;
  font-family: inherit; outline: none; transition: border-color .15s;
}
#cms-property-search:focus { border-color: var(--primary-color); }
.cms-toggle-btn {
  position: absolute; right: 6px; background: transparent; border: none; color: var(--text-dim);
  cursor: pointer; padding: 4px; display: flex;
}
.cms-toggle-btn:hover { color: var(--text-main); }
.cms-toggle-btn svg { width: 14px; height: 14px; }

.cms-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 280px; overflow-y: auto; background-color: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  z-index: 60;
}
.cms-dropdown.hidden { display: none; }
.cms-dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer;
  border-bottom: 1px solid var(--border-color); transition: background-color .12s;
}
.cms-dropdown-item:last-child { border-bottom: none; }
.cms-dropdown-item:hover { background-color: var(--bg-input); }
.cms-dropdown-thumb { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; background: var(--bg-input); flex-shrink: 0; }
.cms-dropdown-info { min-width: 0; flex: 1; }
.cms-dropdown-title {
  font-size: 11.5px; font-weight: 400; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cms-dropdown-sub {
  font-size: 10.5px; color: var(--text-muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cms-dropdown-price { font-size: 11px; font-weight: 400; color: var(--primary-color); flex-shrink: 0; }
.cms-dropdown-empty { padding: 16px; text-align: center; font-size: 11.5px; color: var(--text-dim); }
