@import "tailwindcss";

@theme {
  /* Define all Tailwind default colors explicitly */
  --color-indigo-50: #eef2ff;
  --color-indigo-100: #e0e7ff;
  --color-indigo-200: #c7d2fe;
  --color-indigo-300: #a5b4fc;
  --color-indigo-400: #818cf8;
  --color-indigo-500: #6366f1;
  --color-indigo-600: #4f46e5;
  --color-indigo-700: #4338ca;
  --color-indigo-800: #3730a3;
  --color-indigo-900: #312e81;

  --color-violet-50: #f5f3ff;
  --color-violet-100: #ede9fe;
  --color-violet-200: #ddd6fe;
  --color-violet-300: #c4b5fd;
  --color-violet-400: #a78bfa;
  --color-violet-500: #8b5cf6;
  --color-violet-600: #7c3aed;
  --color-violet-700: #6d28d9;
  --color-violet-800: #5b21b6;
  --color-violet-900: #4c1d95;

  --color-pink-50: #fdf2f8;
  --color-pink-100: #fce7f3;
  --color-pink-200: #fbcfe8;
  --color-pink-300: #f9a8d4;
  --color-pink-400: #f472b6;
  --color-pink-500: #ec4899;
  --color-pink-600: #db2777;
  --color-pink-700: #be185d;
  --color-pink-800: #9f1239;
  --color-pink-900: #831843;

  --color-blue-50: #eff6ff;
  --color-blue-100: #dbeafe;
  --color-blue-200: #bfdbfe;
  --color-blue-300: #93c5fd;
  --color-blue-400: #60a5fa;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-blue-700: #1d4ed8;
  --color-blue-800: #1e40af;
  --color-blue-900: #1e3a8a;

  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
}
.editable-text:hover {
  background-color: rgba(59, 130, 246, 0.1);
  outline: 2px dashed rgba(59, 130, 246, 0.3);
  outline-offset: 2px;
}
.editable-text:focus {
  outline: 2px solid rgb(59, 130, 246);
  outline-offset: 4px;
  background-color: rgba(59, 130, 246, 0.05);
}

/* 드래그앤드롭 스타일 */
.section-item {
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.sortable-ghost {
  opacity: 0.4;
  background: #f3f4f6;
}
.sortable-drag {
  opacity: 1;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  cursor: grabbing !important;
}
.drag-handle {
  cursor: grab;
  touch-action: none;
}
.drag-handle:active {
  cursor: grabbing;
}

/* ★ 핸들링 요소 hover 시에만 표시 */
.section-item .handling-element,
.section-item .drag-handle,
.section-item .section-controls,
.feature-item .drag-handle,
.feature-item .handling-element,
.add-feature-btn {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
/* 섹션 호버 시 섹션 컨트롤만 표시 */
.section-item:hover > .section-controls,
.section-item:hover > .drag-handle {
  opacity: 1 !important;
  pointer-events: auto;
}
/* 개별 요소 호버 시에만 해당 요소의 핸들 표시 */
.feature-item:hover > .drag-handle,
.feature-item:hover > .handling-element,
.editable-element:hover > .element-drag-handle,
.editable-element:hover > .element-delete-btn {
  opacity: 1 !important;
  pointer-events: auto;
}
/* 섹션 hover 시 항목 추가 버튼 표시 */
.section-item:hover .add-feature-btn {
  opacity: 1 !important;
  pointer-events: auto;
}

/* ★ 칼럼 컨테이너(row) 호버 표시 */
.column-row-editable {
  position: relative;
  transition: outline 0.15s ease;
}
.column-row-editable:hover {
  outline: 1px dashed rgba(139, 92, 246, 0.4);
  outline-offset: 2px;
}
.column-row-editable .row-label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #8b5cf6;
  color: #fff;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 9px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 49;
  white-space: nowrap;
}
.column-row-editable:hover .row-label {
  opacity: 1;
}

/* ★ 칼럼 호버 표시 */
.column-editable {
  position: relative;
  transition:
    outline 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  min-height: 80px;
  /* 편집 모드에서 칼럼 경계 표시 */
  outline: 1px dashed rgba(59, 130, 246, 0.25);
  outline-offset: -1px;
}
.column-editable:hover {
  outline: 2px dashed rgba(59, 130, 246, 0.6);
  outline-offset: -1px;
  background: rgba(59, 130, 246, 0.03);
}
.column-editable.column-selected {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
  background: rgba(59, 130, 246, 0.05);
}
/* 빈 칼럼 강조 */
.column-editable.column-empty {
  background: rgba(59, 130, 246, 0.05);
  min-height: 100px;
}

/* ★ 칼럼 미니멀 컨트롤 (호버 시 바깥 상단) */
.column-editable .column-controls {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 100;
  background: rgba(17, 24, 39, 0.95);
  padding: 3px;
  border-radius: 6px;
}
.column-editable:hover .column-controls {
  opacity: 1;
}
.column-controls .col-ctrl-btn {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s;
}
.column-controls .col-ctrl-btn:hover {
  background: #3b82f6;
  color: #fff;
}
.column-controls .col-ctrl-btn.danger:hover {
  background: #ef4444;
}

/* ★ 빈 칼럼에 + 버튼 */
.column-editable .column-add-element {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.15);
  border: 2px dashed rgba(59, 130, 246, 0.5);
  border-radius: 10px;
  color: #3b82f6;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all 0.2s;
  z-index: 50;
}
/* 빈 칼럼이거나 호버 시 + 버튼 표시 */
.column-editable.column-empty .column-add-element,
.column-editable:hover .column-add-element {
  display: flex;
}
/* 내용이 있는 칼럼은 호버 시에만 작게 표시 */
.column-editable:not(.column-empty):hover .column-add-element {
  width: 28px;
  height: 28px;
  font-size: 14px;
  opacity: 0.7;
  top: auto;
  bottom: 8px;
  right: 8px;
  left: auto;
  transform: none;
}
.column-editable .column-add-element:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  transform: translate(-50%, -50%) scale(1.1);
}

/* 칼럼 리사이즈 핸들 - 가운데 세로선 */
.column-editable .column-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
  opacity: 0;
  transition:
    opacity 0.2s,
    background 0.2s;
  z-index: 60;
}
.column-editable .column-resize-handle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: transparent;
  transition: background 0.2s;
}
.column-editable:hover .column-resize-handle {
  opacity: 1;
}
.column-editable:hover .column-resize-handle::before {
  background: rgba(59, 130, 246, 0.5);
}
.column-editable .column-resize-handle:hover::before,
.column-editable .column-resize-handle.active::before {
  background: #3b82f6;
  width: 3px;
}

/* ★ 우클릭 컨텍스트 메뉴 */
.context-menu {
  position: fixed;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 8px;
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10002;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.context-menu.show {
  display: block;
}
.context-menu-item {
  padding: 8px 12px;
  color: #d1d5db;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.context-menu-item:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #fff;
}
.context-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
.context-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}
.context-menu-item i {
  width: 14px;
  text-align: center;
}

/* ★ 요소 드래그 핸들 - 비활성화 (우클릭 메뉴로 대체) */
.draggable-element {
  position: relative;
}
.draggable-element .drag-element-handle {
  display: none !important; /* 드래그 핸들 숨김 - 우클릭 메뉴 사용 */
}
.draggable-element.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}
.drop-indicator {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: #3b82f6;
  border-radius: 2px;
  z-index: 999;
  pointer-events: none;
}
.drop-zone-highlight {
  outline: 2px dashed #3b82f6 !important;
  outline-offset: 2px;
  background: rgba(59, 130, 246, 0.05) !important;
}

/* CTA 링크 변경, 이미지 변경 버튼 등 */
.cta-link-btn,
.image-change-overlay {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.group:hover .cta-link-btn,
.group:hover .image-change-overlay {
  opacity: 1;
}

/* ★ 이미지 변경 가능한 래퍼 */
.img-editable-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.img-editable-wrapper .img-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  pointer-events: none;
}
.img-editable-wrapper:hover .img-edit-overlay {
  opacity: 1;
  pointer-events: auto;
}
.img-edit-overlay button {
  padding: 8px 16px;
  background: white;
  color: #374151;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s;
}
.img-edit-overlay button:hover {
  transform: scale(1.05);
}

/* ★ 콘텐츠 블록 편집 컨트롤 */
.content-block {
  position: relative;
  transition: background-color 0.2s ease;
}
.content-block:hover {
  background-color: rgba(59, 130, 246, 0.05);
  border-radius: 8px;
}
.block-controls {
  z-index: 10;
}
.block-controls button {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* 모달 애니메이션 */
@keyframes slide-up {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.animate-slide-up {
  animation: slide-up 0.3s ease-out;
}

/* 선택된 요소/섹션 하이라이트 */
.element-selected {
  outline: 3px solid #3b82f6 !important;
  outline-offset: 4px !important;
  background-color: rgba(59, 130, 246, 0.05) !important;
}

.section-selected {
  outline: 3px dashed #8b5cf6 !important;
  outline-offset: 8px !important;
  position: relative;
}

.section-selected::before {
  content: "섹션 선택됨";
  position: absolute;
  top: 8px;
  left: 8px;
  background: #8b5cf6;
  color: white;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  z-index: 10;
}

/* ============================================
   컴팩트 플로팅 텍스트 에디터 (Smart Mini)
   ============================================ */
#floatingEditor {
  position: fixed;
  z-index: 10001;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#floatingEditor.show {
  display: flex;
}
#floatingEditor.above::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(17, 24, 39, 0.95);
}
#floatingEditor.below::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(17, 24, 39, 0.95);
}

/* ★ 이미지/버튼 플로팅 에디터 공통 스타일 */
.floating-element-editor {
  position: fixed;
  z-index: 10001;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  max-width: 500px;
}
.floating-element-editor.show {
  display: flex;
}
.floating-element-editor.above::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(17, 24, 39, 0.95);
}
.floating-element-editor.below::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(17, 24, 39, 0.95);
}
.floating-element-editor .fe-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: rgba(17, 24, 39, 0.98);
  border-radius: 8px;
  padding: 12px;
  min-width: 200px;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.floating-element-editor .fe-dropdown.show {
  display: block;
}

.fe-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 12px;
}
.fe-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.fe-btn.active {
  background: #3b82f6;
  color: #fff;
}
.fe-btn-danger {
  color: #f87171;
}
.fe-btn-danger:hover {
  background: #dc2626;
  color: #fff;
}

/* 버튼 호버 효과 클래스 */
.hover-scale {
  transition: all 0.3s ease !important;
}
.hover-scale:hover {
  transform: scale(1.05) !important;
}
.hover-brightness {
  transition: all 0.3s ease !important;
}
.hover-brightness:hover {
  filter: brightness(1.15) !important;
}
.hover-shadow {
  transition: all 0.3s ease !important;
}
.hover-shadow:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
}
.hover-translate {
  transition: all 0.3s ease !important;
}
.hover-translate:hover {
  transform: translateY(-3px) !important;
}

/* 토글 스위치 */
.fe-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}
.fe-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.fe-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #374151;
  border-radius: 20px;
  transition: 0.3s;
}
.fe-toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.fe-toggle input:checked + .fe-toggle-slider {
  background: #3b82f6;
}
.fe-toggle input:checked + .fe-toggle-slider:before {
  transform: translateX(16px);
}

/* 슬라이더 */
.fe-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: #374151;
  border-radius: 2px;
  outline: none;
}
.fe-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
}
.fe-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}
.fe-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}
.fe-select {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  max-width: 70px;
}
.fe-select:focus {
  outline: none;
}
.fe-select option {
  background: #1f2937;
  color: #fff;
}
.fe-input {
  width: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 4px;
  border-radius: 5px;
  font-size: 11px;
  text-align: center;
}
.fe-input:focus {
  outline: 1px solid #3b82f6;
}
.fe-color {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}
.fe-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: rgba(17, 24, 39, 0.98);
  border-radius: 8px;
  padding: 8px;
  min-width: 200px;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.fe-dropdown.show {
  display: block;
}
.fe-dropdown-title {
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.fe-color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.fe-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
}
.fe-color-swatch:hover {
  transform: scale(1.15);
}
.fe-gradient-preview {
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 4px;
}
.icon-pick-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-pick-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #c084fc;
  transform: scale(1.1);
}

/* 섹션 호버 메뉴는 .section-controls로 통합됨 */

/* ============================================
   좌측 요소 팔레트 패널
   ============================================ */
#elementPalettePanel {
  position: fixed;
  top: 60px;
  left: 56px;
  width: 220px;
  background: #1f2937;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
}
#elementPalettePanel.show {
  display: block;
}
.ep-title {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ep-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: #d1d5db;
}
.ep-item:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #fff;
  transform: translateY(-2px);
}
.ep-item i,
.ep-item svg {
  font-size: 20px;
  width: 24px;
  height: 24px;
}
.ep-item span {
  font-size: 10px;
  font-weight: 500;
}

/* ============================================
   요소 설정 패널 (Element Settings Panel)
   ============================================ */
#elementSettingsPanel {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  height: 100vh;
  background: #111827;
  z-index: 10001;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
#elementSettingsPanel.open {
  right: 0;
}

/* ============================================
   우측 사이드바 (Section Settings Panel)
   ============================================ */
#sectionSettingsPanel {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  height: 100vh;
  background: #111827;
  z-index: 10000;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
#sectionSettingsPanel.open {
  right: 0;
}
.ssp-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #111827;
  z-index: 10;
}
.ssp-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.ssp-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  background: transparent;
  border: none;
  cursor: pointer;
}
.ssp-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.ssp-section {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ssp-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ssp-section-title i {
  color: #3b82f6;
}
.ssp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ssp-label {
  font-size: 12px;
  color: #9ca3af;
  min-width: 70px;
}
.ssp-input {
  flex: 1;
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.ssp-input:focus {
  outline: none;
  border-color: #3b82f6;
}
.ssp-input option {
  background: #1f2937;
  color: #fff;
}
.ssp-color-input {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}
.ssp-btn-group {
  display: flex;
  gap: 4px;
  flex: 1;
}
.ssp-btn {
  flex: 1;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 6px;
  color: #9ca3af;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.ssp-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.ssp-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
.ssp-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}
.ssp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
}
/* 투명도 바 슬라이더 (그라데이션 배경 위에 표시) */
.ssp-slider.opacity-bar {
  height: 20px;
  background: transparent !important;
}
.ssp-slider.opacity-bar::-webkit-slider-thumb {
  width: 16px;
  height: 20px;
  background: #fff;
  border: 2px solid #333;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.ssp-slider.opacity-bar::-moz-range-thumb {
  width: 16px;
  height: 20px;
  background: #fff;
  border: 2px solid #333;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.ssp-color-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ssp-color-preset {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
}
.ssp-preset-btn {
  padding: 4px 8px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  color: #a5b4fc;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.ssp-preset-btn:hover {
  background: rgba(99, 102, 241, 0.4);
  color: #fff;
}
.ssp-ai-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ============================================
   요소 선택 하이라이트 스타일
   ============================================ */
.element-ai-selected {
  outline: 3px solid #6366f1 !important;
  outline-offset: 2px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5) !important;
  position: relative;
}
.element-ai-selected::before {
  content: "✓ 선택됨";
  position: absolute;
  top: -24px;
  left: 0;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  z-index: 100;
}
/* 요소 호버 시 선택 가능 힌트 */
#sections .pattern-content *:hover:not(.element-ai-selected) {
  outline: 2px dashed rgba(99, 102, 241, 0.4);
  outline-offset: 2px;
  cursor: pointer;
}
/* 사이드바 고정 버튼 */
.sidebar-pin-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 8px;
}
.sidebar-pin-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.sidebar-pin-btn.pinned {
  background: #3b82f6;
  color: #fff;
}
/* 선택된 요소 정보 표시 */
.selected-element-info {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2) 0%,
    rgba(139, 92, 246, 0.2) 100%
  );
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.selected-element-tag {
  display: inline-block;
  background: #6366f1;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
}
.selected-element-preview {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 8px;
  margin-top: 8px;
  max-height: 100px;
  overflow: hidden;
  font-size: 11px;
  color: #9ca3af;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 탭 스타일 */
.ssp-tab {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
}
.ssp-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.ssp-tab.active {
  background: #3b82f6;
  color: #fff;
}
/* 이미지 프리셋 */
.ssp-img-preset {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.ssp-img-preset:hover {
  border-color: #3b82f6;
  transform: scale(1.05);
}
.ssp-color-preset:hover {
  transform: scale(1.1);
}
.ssp-color-preset.active {
  border-color: #fff;
}

/* 그라데이션 텍스트 */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--gradient-start),
    var(--gradient-end)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   드래그앤드롭 요소 스타일
   ============================================ */
.editable-element {
  position: relative;
  transition:
    outline 0.15s,
    box-shadow 0.15s;
}
.editable-element.draggable {
  cursor: move;
}
.editable-element.dragging {
  opacity: 0.5;
  z-index: 1000;
}
.editable-element.drag-over {
  outline: 2px dashed #3b82f6;
  outline-offset: 4px;
}
.editable-element:hover .element-drag-handle,
.editable-element:hover .element-delete-btn {
  opacity: 1;
}
.element-drag-handle {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 18px;
  background: #374151;
  border-radius: 4px;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.element-drag-handle:active {
  cursor: grabbing;
}
.element-drag-handle i {
  color: #9ca3af;
  font-size: 10px;
}
.element-delete-btn {
  position: absolute;
  top: -8px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border: none;
}
.element-delete-btn:hover {
  background: #dc2626;
}
.element-delete-btn i {
  color: #fff;
  font-size: 10px;
}

/* ============================================
   이미지 리사이즈 핸들러
   ============================================ */
.image-resizable {
  position: relative;
  display: inline-block;
}
.image-resizable:hover .resize-handle {
  opacity: 1;
}
.resize-handle {
  position: absolute;
  background: #3b82f6;
  border: 2px solid #fff;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 50;
}
.resize-handle-se {
  width: 12px;
  height: 12px;
  bottom: -6px;
  right: -6px;
  cursor: se-resize;
}
.resize-handle-e {
  width: 8px;
  height: 24px;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  cursor: e-resize;
}
.resize-handle-s {
  width: 24px;
  height: 8px;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  cursor: s-resize;
}

/* ============================================
   칼럼 리사이즈 핸들러
   ============================================ */
.column-resizable {
  position: relative;
}
.column-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  background: transparent;
  cursor: col-resize;
  z-index: 50;
  opacity: 0;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.column-resizable:hover .column-resize-handle {
  opacity: 1;
  background: rgba(59, 130, 246, 0.3);
}
.column-resize-handle:hover,
.column-resize-handle.active {
  background: rgba(59, 130, 246, 0.6);
}
.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 40px;
  background: #3b82f6;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}
.column-resize-handle:hover::after,
.column-resize-handle.active::after {
  opacity: 1;
}

/* 드롭 영역 표시 */
.drop-indicator {
  height: 4px;
  background: #3b82f6;
  border-radius: 2px;
  margin: 8px 0;
  animation: pulse-indicator 1s ease-in-out infinite;
}
@keyframes pulse-indicator {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ★ JSON Designer에서 가져온 섹션 스타일 지원 */
.pattern-content {
  overflow: hidden;
}
.pattern-content .glow-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 50%,
    var(--glow-color, rgba(59, 130, 246, 0.1)),
    transparent 70%
  );
  pointer-events: none;
}
.pattern-content .text-accent {
  background: linear-gradient(
    135deg,
    var(--accent-start, #3b82f6),
    var(--accent-end, #8b5cf6)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pattern-content .img-hover img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.pattern-content .img-hover:hover img {
  transform: scale(1.05);
}

/* Tailwind 호환 클래스 */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}
.bg-white\/80 {
  background-color: rgba(255, 255, 255, 0.8);
}
.bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.1);
}
.bg-white\/5 {
  background-color: rgba(255, 255, 255, 0.05);
}
.bg-black\/50 {
  background-color: rgba(0, 0, 0, 0.5);
}
.ring-2 {
  box-shadow: 0 0 0 2px var(--tw-ring-color);
}
.ring-gray-100 {
  --tw-ring-color: #f3f4f6;
}
.ring-gray-700 {
  --tw-ring-color: #374151;
}
/* Website Editor Styles */

/* Hide top navigation for full editor experience */
nav.bg-white.border-b.border-gray-200 {
  display: none !important;
}

body {
  overflow: hidden;
}

/* Ensure sections flow seamlessly */
.editor-container {
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

/* Remove margins from section containers */
.section-container {
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  transition: border 0.2s ease;
  border: 1px solid transparent;
}

.section-container:hover {
  border: 1px solid transparent;
}

/* Keep content styles but remove vertical margins between sections */
.section-content {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Remove border-radius from section's outer container */
.section-content > div:first-child {
  border-radius: 0 !important;
}

/* Remove margins between sections */
.section-container + .section-container {
  margin-top: 0 !important;
}

/* Ensure add section buttons don't create gaps */
.add-section-between {
  margin: 0 !important;
  height: 1px !important;
  position: relative;
  overflow: visible;
  background: transparent;
  transition: background 0.2s ease;
}

/* Show line on hover */
.add-section-between:hover {
  background: rgba(59, 130, 246, 0.2);
}

/* Add section button styling */
.add-section-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  opacity: 0;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Show add button on hover */
.add-section-between:hover .add-section-btn {
  opacity: 1;
}

/* Drag and drop styles */
.drag-over {
  background-color: rgba(59, 130, 246, 0.05);
  border: 2px dashed #3b82f6;
}

.drop-indicator {
  transition: all 0.2s ease;
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Element hover controls */
.element-controls {
  z-index: 10;
}

.edit-element:hover {
  background-color: #1d4ed8;
}

/* Fix editing overlay */
.editing {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  background-color: rgba(59, 130, 246, 0.1) !important;
}

/* Element wrapper controls - Default hidden state */
.element-wrapper > .element-controls,
.element-wrapper > .drag-handle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
}

/* Force better line-height for all headings */
.section-content h1,
.section-content h2,
.section-content h3,
.section-content h4,
.section-content h5,
.section-content h6 {
  line-height: 1.3 !important;
}

/* Override Tailwind's text-5xl line-height */
.section-content .text-5xl,
.section-content .text-4xl {
  line-height: 1.3 !important;
}

/* Fix section controls visibility and interaction */
.section-controls {
  z-index: 9999 !important;
  pointer-events: auto !important;
}

.section-controls button {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Fix inline edit overlay to not block controls */
.section-container .absolute.inset-0.pointer-events-none {
  z-index: 1 !important;
}

/* Ensure editable elements are clickable */
.editable-element {
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 10 !important;
}

.editable-element:hover {
  outline: 1px solid rgba(59, 130, 246, 0.8) !important;
}

/* Drag handle styling - removed, using element-wrapper rules instead */

/* Hide controls from nested elements by default */
.column-dropzone .element-wrapper > .drag-handle,
.column-dropzone .element-wrapper > .element-controls {
  opacity: 0 !important;
  pointer-events: none;
}

/* Show controls only on direct element hover */
.column-dropzone .element-wrapper:hover > .drag-handle,
.column-dropzone .element-wrapper:hover > .element-controls {
  opacity: 1 !important;
  pointer-events: auto;
}

/* Remove center image controls */
.image-element .image-placeholder {
  position: relative;
}

/* Ensure icons are visible */
.element-controls button svg {
  display: block;
  width: 12px;
  height: 12px;
}

/* Add section button styling - invisible by default */
.add-section-between .add-section-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: transparent;
  transition: all 0.2s ease;
}

.add-section-between:hover .add-section-line {
  background: #3b82f6;
}

.add-section-between .add-section-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

/* Element wrapper specific hover - show controls only on individual element hover */
.element-wrapper {
  position: relative;
}

/* Show controls only when hovering the specific element */
.element-wrapper:hover > .element-controls,
.element-wrapper:hover > .drag-handle {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Section thumbnail styles */
.section-thumbnail {
  transition: all 0.2s ease;
}

.section-thumbnail:hover {
  transform: translateX(2px);
}

.section-thumbnail.active {
  border-left: 4px solid #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
