/* 
102 Nano Bananary Redesign 
Matches Mindventure & Daily News Style
*/

.hnc-nb {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #4a5568;
  line-height: 1.6;
  font-size: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============= Header ============= */
.hnc-nb-header {
  display: none;
  /* Hidden because outer container already has title */
}

/* ============= Layout Grid ============= */
.hnc-nb-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 30px;
  align-items: start;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .hnc-nb-layout {
    grid-template-columns: 1fr;
  }
}

/* ============= Panels/Cards ============= */
.hnc-nb-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 24px;
}

.hnc-nb-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hnc-nb-panel-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* ============= Form Elements ============= */
.hnc-nb-field {
  margin-bottom: 20px;
}

.hnc-nb-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}

/* Custom File Upload */
.hnc-nb-upload-zone {
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f7fafc;
  position: relative;
  overflow: hidden;
}

.hnc-nb-upload-zone:hover {
  border-color: #667eea;
  background: #ebf4ff;
}

.hnc-nb-upload-zone.has-file {
  border-style: solid;
  border-color: #667eea;
  background: #ebf4ff;
}

.hnc-nb-upload-icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}

.hnc-nb-upload-text {
  font-size: 0.9rem;
  color: #718096;
}

.hnc-nb-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Inputs & Textareas */
.hnc-nb-input,
.hnc-nb-select,
.hnc-nb-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 0.95rem;
  color: #2d3748;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

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

.hnc-nb-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Range Slider */
.hnc-nb-range-wrap {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hnc-nb-range {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  background: #e2e8f0;
  border-radius: 3px;
  outline: none;
}

.hnc-nb-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.hnc-nb-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.hnc-nb-range-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #667eea;
  min-width: 45px;
  text-align: right;
}

/* Checkboxes */
.hnc-nb-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.hnc-nb-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.hnc-nb-checkbox:hover {
  background: #f7fafc;
}

.hnc-nb-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

.hnc-nb-checkbox-text {
  font-size: 0.9rem;
  color: #4a5568;
  font-weight: 500;
}

/* ============= Canvas Area ============= */
.hnc-nb-canvas-container {
  position: relative;
  background: #f8fafc;
  /* Light gray background */
  border-radius: 16px;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #e2e8f0;
}

.hnc-nb-canvas-container.has-image {
  border-style: solid;
  background: #2d3748;
  /* Dark background for image viewing */
}

.hnc-nb-canvas-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 600px;
}

.hnc-nb-preview-img,
.hnc-nb-canvas-mask,
.hnc-nb-result-img {
  display: block;
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
}

.hnc-nb-canvas-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

.hnc-nb-canvas-mask.active {
  pointer-events: auto;
  cursor: crosshair;
}

.hnc-nb-placeholder-text {
  text-align: center;
  color: #a0aec0;
  padding: 20px;
}

.hnc-nb-placeholder-icon {
  font-size: 48px;
  margin-bottom: 10px;
  display: block;
  opacity: 0.5;
}

/* ============= Actions ============= */
.hnc-nb-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hnc-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.hnc-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  flex: 2;
}

.hnc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.hnc-btn-secondary {
  background: #edf2f7;
  color: #4a5568;
  flex: 1;
}

.hnc-btn-secondary:hover {
  background: #e2e8f0;
  color: #2d3748;
}

.hnc-btn-secondary.active {
  background: #ebf8ff;
  color: #3182ce;
  border: 1px solid #bee3f8;
}

/* ============= Status & Error ============= */
.hnc-nb-status-bar {
  margin-top: 15px;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.hnc-nb-status-bar.info {
  display: block;
  background: #ebf8ff;
  color: #2b6cb0;
  border-left: 4px solid #4299e1;
}

.hnc-nb-status-bar.error {
  display: block;
  background: #fff5f5;
  color: #c53030;
  border-left: 4px solid #f56565;
}

.hnc-nb-status-bar.success {
  display: block;
  background: #f0fff4;
  color: #2f855a;
  border-left: 4px solid #48bb78;
}

/* ============= Result Overlay ============= */
.hnc-nb-result-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #2d3748;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hnc-nb-result-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

