/* JSON to CSV Tool Custom Styles */

.json-csv-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.json-input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 992px) {
  .json-input-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.json-textarea-wrapper {
  position: relative;
  width: 100%;
}

.json-textarea {
  width: 100%;
  height: 320px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-primary);
  font-family: 'Geist Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.json-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background-color: rgba(0, 0, 0, 0.3);
}

.dropzone-premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropzone-premium:hover,
.dropzone-premium.dragover {
  border-color: var(--primary);
  background-color: rgba(99, 102, 241, 0.03);
}

.dropzone-icon {
  color: var(--text-secondary);
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.dropzone-premium:hover .dropzone-icon {
  transform: translateY(-4px);
  color: var(--primary);
}

.dropzone-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dropzone-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.load-url-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.json-url-input-group {
  display: flex;
  gap: 10px;
}

.json-url-input-group input {
  flex: 1;
}

.converter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.preview-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.csv-preview-box {
  width: 100%;
  max-height: 350px;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.15);
}

.csv-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.csv-preview-table th {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  white-space: nowrap;
}

.csv-preview-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  white-space: nowrap;
}

.csv-preview-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.csv-raw-textarea {
  width: 100%;
  height: 250px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-primary);
  font-family: 'Geist Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}
