/* WindWalker Developer Mode Template Editor Styles */
/* Version: v1.0 */
/* Reference: 367번 문서 Priority 3 */

/* 모달 오버레이 */
.dev-editor-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
}

.dev-editor-modal.show {
  display: block;
}

.dev-editor-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* 모달 컨텐츠 */
.dev-editor-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* 헤더 */
.dev-editor-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dev-editor-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.dev-editor-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s;
}

.dev-editor-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* 바디 */
.dev-editor-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.dev-editor-section {
  margin-bottom: 24px;
}

.dev-editor-section h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 8px;
}

/* 폼 */
.dev-editor-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #495057;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 코드 에디터 */
.dev-editor-code {
  margin-bottom: 8px;
}

.dev-editor-code textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

.dev-editor-code textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dev-editor-code-info {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #6c757d;
}

/* 푸터 */
.dev-editor-footer {
  padding: 16px 24px;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #dee2e6;
}

.dev-editor-footer button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.dev-editor-footer .btn-secondary {
  background: white;
  color: #495057;
  border: 1px solid #dee2e6;
}

.dev-editor-footer .btn-secondary:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.dev-editor-footer .btn-primary {
  background: #667eea;
  color: white;
}

.dev-editor-footer .btn-primary:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 스크롤바 스타일 */
.dev-editor-body::-webkit-scrollbar {
  width: 8px;
}

.dev-editor-body::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.dev-editor-body::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 4px;
}

.dev-editor-body::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

/* 반응형 */
@media (max-width: 768px) {
  .dev-editor-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .dev-editor-header {
    padding: 16px;
  }

  .dev-editor-header h2 {
    font-size: 18px;
  }

  .dev-editor-body {
    padding: 16px;
  }

  .form-group-row {
    grid-template-columns: 1fr;
  }

  .dev-editor-code textarea {
    font-size: 12px;
  }
}
