/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */


/* Pretendard Font Family */
.font-pretendard {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 
    'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 
    'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

/* Custom Color Palette from 기획서 */
:root {
  --color-primary: #1E3A8A;     /* 딥 네이비 */
  --color-secondary: #64748B;   /* 미드 그레이 */
  --color-accent: #3B82F6;      /* 브라이트 블루 */
  --color-background: #F8FAFC;  /* 쿨 그레이 */
}

/* Hide scrollbar for scrollbar-hide class */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* Newsletter Editor Enhanced Styles */

/* 태그 스타일 */
.newsletter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  margin: 0 2px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: move;
  user-select: none;
  vertical-align: middle;
  transition: all 0.2s ease;
  position: relative;
}

/* 변수 태그 */
.newsletter-tag--variable {
  background-color: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.newsletter-tag--variable:hover {
  background-color: #fde68a;
  border-color: #fbbf24;
  transform: scale(1.05);
}

/* 링크 태그 */
.newsletter-tag--link {
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.newsletter-tag--link:hover {
  background-color: #bfdbfe;
  border-color: #60a5fa;
  transform: scale(1.05);
}

/* 태그 아이콘 */
.tag-icon {
  font-size: 12px;
  opacity: 0.7;
}

/* 태그 라벨 */
.tag-label {
  font-family: system-ui, -apple-system, sans-serif;
}

/* 태그 제거 버튼 */
.tag-remove {
  display: none;
  margin-left: 4px;
  padding: 0 4px;
  background: transparent;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.newsletter-tag:hover .tag-remove {
  display: inline-block;
}

.tag-remove:hover {
  opacity: 1;
}

/* 드래그 중 스타일 */
.newsletter-tag.dragging {
  opacity: 0.5;
}

/* 변수 메뉴 */
.variable-menu {
  position: fixed;
  z-index: 1000;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 8px;
  min-width: 200px;
  max-width: 300px;
}

.variable-menu-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.variable-menu-item:hover {
  background-color: #f3f4f6;
}

.variable-menu-item code {
  font-size: 12px;
  color: #3b82f6;
  margin-right: 8px;
}

.variable-menu-item span {
  font-size: 14px;
  color: #6b7280;
}

/* Trix 에디터 커스터마이징 */
.enhanced-trix-editor trix-editor {
  min-height: 400px;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.enhanced-trix-editor trix-editor:focus {
  border-color: #3b82f6;
  outline: none;
}

/* 툴바 커스터마이징 */
.enhanced-trix-toolbar {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px 8px 0 0;
  padding: 8px;
  margin-bottom: -2px;
}

.enhanced-trix-toolbar .trix-button-group {
  margin-right: 8px;
  border-right: 1px solid #e5e7eb;
  padding-right: 8px;
}

.enhanced-trix-toolbar .trix-button-group:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.enhanced-trix-toolbar .trix-button {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 6px 8px;
  margin: 0 2px;
  transition: all 0.2s;
}

.enhanced-trix-toolbar .trix-button:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

.enhanced-trix-toolbar .trix-button.trix-active {
  background-color: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

/* 단축키 힌트 */
.shortcut-hint {
  position: absolute;
  bottom: -20px;
  right: 0;
  font-size: 12px;
  color: #9ca3af;
}

/* 드롭 영역 표시 */
.trix-content.drop-active {
  background-color: #f0f9ff;
  border: 2px dashed #3b82f6;
}

/* 태그 더블클릭 시 편집 모드 */
.newsletter-tag.editing {
  border-style: dashed;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* 미리보기 스타일 개선 */
.preview-container {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.preview-header {
  background: linear-gradient(to right, #f3f4f6, #e5e7eb);
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.preview-content {
  padding: 24px;
  background: white;
  min-height: 300px;
}

/* 변수/링크 삽입 버튼 개선 */
.insert-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-weight: 500;
  color: #374151;
  transition: all 0.2s;
}

.insert-button:hover {
  background: #f9fafb;
  border-color: #3b82f6;
  color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.insert-button svg {
  width: 20px;
  height: 20px;
}

