/*************************************************
 * Excel Composer Overlay
 *
 * Multi-step interface for organizing Excel data
 * into slides before generation.
 *************************************************/

/* Full-screen overlay */
.composer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.composer-overlay.hidden {
  display: none;
}

/* Main container */
.composer-container {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

/*************************************************
 * Header
 *************************************************/

.composer-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.composer-header h2 {
  margin: 0;
  font-size: 20px;
  color: #0b2d4f;
}

.composer-steps {
  display: flex;
  gap: 8px;
}

.composer-step {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
}

.composer-step.active {
  background: #0b2d4f;
}

.composer-step.completed {
  background: #059669;
}

/*************************************************
 * Content Area
 *************************************************/

.composer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.composer-subtitle {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #6b7280;
}

/*************************************************
 * Step 1: File List
 *************************************************/

.composer-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.composer-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: grab;
  transition: all 0.15s ease;
}

.composer-file-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.composer-file-item.dragging {
  opacity: 0.5;
  background: #e5e7eb;
}

.composer-file-item.drag-over {
  border-color: #0b2d4f;
  background: rgba(11, 45, 79, 0.05);
}

.composer-file-item.selected {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.composer-file-item.selected:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.composer-file-item:focus {
  outline: none;
}

.composer-file-drag-handle {
  color: #9ca3af;
  font-size: 18px;
  cursor: grab;
}

.composer-file-icon {
  font-size: 24px;
}

.composer-file-info {
  flex: 1;
}

.composer-file-name {
  font-weight: 500;
  color: #111827;
  margin-bottom: 2px;
}

.composer-file-meta {
  font-size: 12px;
  color: #6b7280;
}

.composer-file-order {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b2d4f;
  color: white;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
}

/*************************************************
 * Step 2: Tab Organization (placeholder)
 *************************************************/

.composer-tabs-section {
  margin-bottom: 24px;
}

.composer-tabs-file-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
}

.composer-tabs-file-name {
  font-weight: 600;
  color: #0b2d4f;
}

.composer-tab-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
}

.composer-tab-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.composer-tab-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.composer-tab-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.composer-tab-name {
  font-weight: 500;
  color: #374151;
}

.composer-tab-rows {
  font-size: 12px;
  color: #6b7280;
  margin-left: auto;
}

/*************************************************
 * Footer
 *************************************************/

.composer-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.composer-footer-left {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.composer-footer-center {
  flex: 1;
  display: flex;
  gap: 6px;
  justify-content: center;
  overflow-x: auto;
  padding: 4px 0;
}

.composer-footer-right {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* Tab pills in footer */
.footer-tab-pill {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.footer-tab-pill:hover {
  background: #e5e7eb;
}

.footer-tab-pill.active {
  background: #0b2d4f;
  border-color: #0b2d4f;
  color: white;
}

.composer-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.composer-btn-secondary {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #374151;
}

.composer-btn-secondary:hover {
  background: #e5e7eb;
}

.composer-btn-primary {
  background: #0b2d4f;
  border: 1px solid #0b2d4f;
  color: #ffffff;
}

.composer-btn-primary:hover {
  background: #0a2540;
}

.composer-btn-primary:disabled {
  background: #9ca3af;
  border-color: #9ca3af;
  cursor: not-allowed;
}

/*************************************************
 * Single File Message
 *************************************************/

.composer-single-file-msg {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.composer-single-file-msg .file-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.composer-single-file-msg .file-name {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.composer-single-file-msg p {
  margin: 0;
}

/*************************************************
 * Full-width mode (Step 3)
 *************************************************/

.composer-container.full-width {
  max-width: 95%;
  width: 95%;
  height: 85vh;
  max-height: 85vh;
}

/*************************************************
 * Step 3: Slide Builder
 *************************************************/

.slide-builder {
  display: flex;
  gap: 24px;
  height: 100%;
  min-height: 0;
}

.slide-builder-left {
  width: 45%;
  min-width: 500px;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  min-height: 0;
}

.slide-builder-right {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e5e7eb;
  padding-left: 24px;
  overflow: hidden;
}

/* Slide Preview */
.slide-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #6b7280;
  gap: 12px;
}

.slide-count-label {
  flex-shrink: 0;
}

/* Slide Navigation Controls */
.slide-nav-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 2px;
}

.slide-nav-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #374151;
  transition: all 0.15s ease;
}

.slide-nav-btn:hover:not(.disabled) {
  background: #e5e7eb;
  color: #111827;
}

.slide-nav-btn.disabled {
  color: #d1d5db;
  cursor: not-allowed;
}

.slide-nav-arrow {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.slide-nav-current {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #0b2d4f;
}

.composer-btn-small {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
}

.composer-btn-small:hover {
  background: #e5e7eb;
}

.slide-canvas {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 300px;
  overflow: hidden;
  flex-shrink: 0;
}

.slide-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #9ca3af;
  font-size: 13px;
  text-align: center;
  padding: 16px;
  width: 80%;
}

/* Slide Elements on Canvas */
.slide-element {
  position: absolute;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.slide-element-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 11px;
  font-weight: 500;
  color: #374151;
}

.slide-element-remove {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
}

.slide-element-remove:hover {
  color: #dc2626;
}

.slide-element-preview {
  padding: 8px 10px;
  text-align: center;
  color: #6b7280;
  font-size: 11px;
}

.slide-element-type {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #0b2d4f;
}

.element-style-label {
  font-size: 11px;
  font-weight: 400;
  color: #6b7280;
}

/* Selected element state */
.slide-element.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slide-element.selected .slide-element-header {
  background: #dbeafe;
  border-bottom-color: #93c5fd;
}

.slide-element:hover:not(.selected) {
  border-color: #9ca3af;
  cursor: grab;
}

/* Text elements are not draggable */
.slide-text-element:hover:not(.selected) {
  cursor: pointer;
}

/* Chart type label styling (no icons) */
.element-type-label {
  font-weight: 500;
  color: #374151;
}

/* Slide Thumbnails */
.slide-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  overflow-x: auto;
  flex-wrap: wrap;
}

.slide-thumbnail {
  min-width: 64px;
  height: 44px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: #6b7280;
}

.slide-thumbnail:hover {
  border-color: #0b2d4f;
}

.slide-thumbnail.active {
  border-color: #0b2d4f;
  background: rgba(11, 45, 79, 0.05);
}

.slide-thumbnail-count {
  font-size: 9px;
  color: #9ca3af;
}

/* Data Browser */
.data-browser-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 600;
  color: #0b2d4f;
}

.data-browser-header select {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  max-width: 200px;
}

.data-browser-content {
  flex: 1;
  overflow: auto; /* Scroll both directions */
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fafafa;
}

.data-browser-empty {
  padding: 40px;
  text-align: center;
  color: #9ca3af;
}

.data-browser-table {
  border-collapse: collapse;
  font-size: 12px;
}

.data-browser-table th,
.data-browser-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.data-browser-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #374151;
  position: sticky;
  top: 0;
  z-index: 1;
}

.editable-header {
  cursor: pointer;
  transition: background 0.15s ease;
}

.editable-header:hover {
  background: #e5e7eb;
}

.editable-header.edited {
  color: #0b2d4f;
  font-style: italic;
}

.editable-header.edited::after {
  content: ' *';
  color: #059669;
}

.header-edit-input {
  width: 100%;
  min-width: 80px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid #0b2d4f;
  border-radius: 4px;
  background: white;
  outline: none;
}

/* Editable row labels */
.editable-row-label {
  cursor: pointer;
  transition: background 0.15s ease;
}

.editable-row-label:hover {
  background: #fef3c7 !important;
}

.editable-row-label.edited {
  color: #0b2d4f;
  font-style: italic;
}

.editable-row-label.edited::after {
  content: ' *';
  color: #059669;
}

.row-label-edit-input {
  width: 100%;
  min-width: 120px;
  padding: 4px 6px;
  font-size: 12px;
  border: 2px solid #d97706;
  border-radius: 4px;
  background: white;
  outline: none;
}

.data-browser-table tbody tr:hover {
  background: #f0f9ff;
}

.data-browser-table tbody tr.selected {
  background: #dbeafe;
}

.row-select-header,
.row-select-cell {
  width: 36px;
  min-width: 36px;
  text-align: center;
  position: sticky;
  left: 0;
  background: #f3f4f6;
  z-index: 2;
}

.row-select-cell {
  background: #fafafa;
}

.row-label-header {
  min-width: 120px;
}

.data-browser-table tbody tr:hover .row-select-cell {
  background: #f0f9ff;
}

.data-browser-table tbody tr.selected .row-select-cell {
  background: #dbeafe;
}

/* Column selection */
.column-checkbox-row th {
  padding: 4px 8px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.col-select-header {
  text-align: center;
}

.col-checkbox {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.col-selected {
  background-color: #dbeafe !important;
}

.editable-header.col-selected {
  background-color: #bfdbfe !important;
}

.more-rows {
  color: #9ca3af;
  font-style: italic;
}

/* Data Browser Actions */
.data-browser-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  justify-content: flex-start;
}

.data-browser-actions .composer-btn {
  padding: 8px 16px;
  font-size: 13px;
}

/*************************************************
 * Element Editing Panel - Vertical Layout
 *************************************************/

.editing-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  flex: 1;
  min-height: 0;
}

.editing-segment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.editing-segment.inactive {
  opacity: 0.4;
  pointer-events: none;
  background: #f3f4f6;
}

.editing-segment.active {
  border-color: #2563eb;
  background: #f0f9ff;
}

.editing-segment-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  min-width: 50px;
  flex-shrink: 0;
}

.editing-segment.active .editing-segment-header {
  color: #2563eb;
}

.editing-segment-content {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.editing-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.editing-btn:hover:not(:disabled) {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.editing-btn.active {
  background: #0b2d4f;
  border-color: #0b2d4f;
  color: white;
}

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

/* No selection message */
.editing-no-selection {
  color: #9ca3af;
  font-size: 11px;
  font-style: italic;
}

/*************************************************
 * Text Zone Overlays
 *************************************************/

.text-zone {
  position: absolute;
  border: 2px dashed #f5a89a;
  background: rgba(245, 168, 154, 0.1);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.text-zone:hover {
  background: rgba(245, 168, 154, 0.2);
  border-color: #ef6c5a;
}

.text-zone.selected {
  border: 3px solid #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.text-zone-title {
  left: 2%;
  top: 2%;
  width: 96%;
  height: 13%;
}

.text-zone-body {
  left: 2%;
  top: 17%;
  width: 96%;
  height: 71%;
}

.text-zone-label {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
  pointer-events: none;
}

.text-zone.selected .text-zone-label {
  color: #dc2626;
}

/*************************************************
 * Text Input Controls
 *************************************************/

.text-input-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.text-add-input {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  border: 2px solid #2563eb;
  border-radius: 4px;
  outline: none;
  min-width: 120px;
}

.text-add-input:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.text-input-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.15s ease;
}

.text-input-btn.commit {
  background: #059669;
  color: white;
}

.text-input-btn.commit:hover {
  background: #047857;
}

.text-input-btn.cancel {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.text-input-btn.cancel:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.text-zone-hint {
  font-size: 11px;
  color: #6b7280;
  font-style: italic;
  margin-left: 8px;
}

.text-size-select {
  padding: 5px 8px;
  font-size: 11px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}

/*************************************************
 * Text Element on Slide
 *************************************************/

.slide-text-element {
  background: rgba(255, 255, 255, 0.9);
  border-style: dashed;
}

.slide-text-preview {
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slide-text-preview.title-text {
  font-size: 14px;
  font-weight: 600;
  color: #1F4E79;
}

.slide-text-preview.body-text {
  font-size: 11px;
  color: #374151;
}

/*************************************************
 * Text Background Color Picker
 *************************************************/

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 2px;
}

.text-bg-color-input {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  background: none;
}

.text-bg-color-input::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.text-bg-color-input::-webkit-color-swatch {
  border-radius: 2px;
  border: none;
}

/*************************************************
 * Image Library Mini Browser
 *************************************************/

.image-library-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  flex: 1;
}

.image-lib-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.image-lib-tab {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.image-lib-tab:hover {
  background: #e5e7eb;
}

.image-lib-tab.active {
  background: #0b2d4f;
  border-color: #0b2d4f;
  color: white;
}

.image-category-select {
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: white;
  margin-left: auto;
  max-width: 120px;
}

.image-lib-grid {
  display: grid;
  grid-template-columns: repeat(4, 85px);
  grid-auto-rows: 85px;
  gap: 8px;
  max-height: 200px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.image-lib-item {
  width: 85px;
  height: 85px;
  background-size: cover;
  background-position: center;
  background-color: #e5e7eb;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.image-lib-item:hover {
  border-color: #9ca3af;
}

.image-lib-item.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.image-select-checkbox {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  accent-color: #2563eb;
}

.image-lib-loading,
.image-lib-empty {
  grid-column: 1 / -1;
  padding: 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 11px;
}

.image-lib-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.image-lib-actions .editing-btn {
  flex: 1;
  font-size: 10px;
  padding: 4px 6px;
}

/* Image editing controls - stacked layout */
.image-library-mini .image-edit-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.image-library-mini .image-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-library-mini .image-edit-row > .editing-btn {
  width: 70px;
  flex-shrink: 0;
  font-size: 11px;
  padding: 5px 8px;
}

.gradient-direction-btns {
  display: flex;
  gap: 2px;
}

.gradient-slider {
  flex: 1;
  min-width: 60px;
  max-width: 100px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e7eb;
  border-radius: 3px;
  outline: none;
}

.gradient-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #0b2d4f;
  border-radius: 50%;
  cursor: pointer;
}

.gradient-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #0b2d4f;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.gradient-value {
  font-size: 11px;
  color: #6b7280;
  min-width: 35px;
}

/*************************************************
 * Image Editing Controls
 *************************************************/

.image-edit-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.image-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.opacity-slider {
  flex: 1;
  min-width: 80px;
  max-width: 120px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e7eb;
  border-radius: 3px;
  outline: none;
}

.opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #0b2d4f;
  border-radius: 50%;
  cursor: pointer;
}

.opacity-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #0b2d4f;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.opacity-value {
  font-size: 11px;
  color: #6b7280;
  min-width: 35px;
}

.gradient-options {
  display: flex;
  gap: 4px;
}

.gradient-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gradient-btn:hover {
  background: #e5e7eb;
}

.gradient-btn.active {
  background: #0b2d4f;
  border-color: #0b2d4f;
  color: white;
}

/*************************************************
 * Image Element on Slide
 *************************************************/

.slide-image-element {
  overflow: hidden;
}

.slide-image-element.background {
  border-style: dotted;
  border-color: #9ca3af;
}

.slide-image-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slide-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-image-element .image-header {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid #e5e7eb;
  border-bottom: none;
  z-index: 5;
}

.slide-image-element.selected .image-header {
  background: rgba(219, 234, 254, 0.95);
  border-top-color: #93c5fd;
}

/* Images segment fills remaining space - column layout */
.editing-segment.images-segment {
  flex-direction: column;
  align-items: stretch;
  flex: 1;
  min-height: 200px;
}

.editing-segment.images-segment .editing-segment-header {
  margin-bottom: 6px;
}

.editing-segment.images-segment .editing-segment-content {
  flex-direction: column;
  flex: 1;
  width: 100%;
}

/*************************************************
 * Mask Picker
 *************************************************/

.mask-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.mask-shapes,
.mask-edges {
  display: flex;
  gap: 4px;
}

.mask-divider {
  width: 1px;
  height: 24px;
  background: #d1d5db;
  margin: 0 4px;
}

.mask-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.mask-btn:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.mask-btn.active {
  border-color: #3b82f6;
  background: #eff6ff;
}

/* Mask Icons */
.mask-icon {
  display: block;
  width: 18px;
  height: 18px;
  position: relative;
}

/* Circle shape */
.mask-icon-circle {
  border: 2px solid #374151;
  border-radius: 50%;
}

/* Rounded rectangle shape */
.mask-icon-rounded {
  border: 2px solid #374151;
  border-radius: 4px;
}

/* Oval diagonal top-left to bottom-right */
.mask-icon-oval-tlbr {
  border: 2px solid #374151;
  border-radius: 50%;
  transform: rotate(-45deg) scaleY(0.6);
}

/* Oval diagonal top-right to bottom-left */
.mask-icon-oval-trbl {
  border: 2px solid #374151;
  border-radius: 50%;
  transform: rotate(45deg) scaleY(0.6);
}

/* No shape (original) - square with X */
.mask-icon-none {
  border: 2px solid #9ca3af;
  border-radius: 2px;
}
.mask-icon-none::before,
.mask-icon-none::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: #9ca3af;
}
.mask-icon-none::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.mask-icon-none::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Sharp edge - clean square */
.mask-icon-sharp {
  border: 2px solid #374151;
  border-radius: 0;
}

/* Feathered edge - dashed/soft border */
.mask-icon-feathered {
  border: 2px dashed #374151;
  border-radius: 2px;
  opacity: 0.7;
}

/* Vignette - darker corners effect */
.mask-icon-vignette {
  border: 2px solid #374151;
  border-radius: 2px;
  background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.4) 100%);
}

/*************************************************
 * Resize Handles
 *************************************************/

.resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #2563eb;
  border-radius: 2px;
  z-index: 100;
  cursor: pointer;
}

.resize-handle-nw {
  top: -6px;
  left: -6px;
  cursor: nw-resize;
}

.resize-handle-ne {
  top: -6px;
  right: -6px;
  cursor: ne-resize;
}

.resize-handle-sw {
  bottom: -6px;
  left: -6px;
  cursor: sw-resize;
}

.resize-handle-se {
  bottom: -6px;
  right: -6px;
  cursor: se-resize;
}

.resize-handle:hover {
  background: #2563eb;
}

/* Dragging state */
.slide-element.dragging {
  opacity: 0.8;
  cursor: grabbing !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Make elements look draggable when selected */
.slide-element.selected {
  cursor: move;
}

/* Don't show move cursor on text elements */
.slide-text-element.selected {
  cursor: default;
}
