/* json2mock - Main Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fafafa;
  padding: 20px;
  line-height: 1.6;
  color: #333;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  margin-bottom: 10px;
  color: #333;
  font-size: 2.5rem;
  font-weight: 700;
}

.site-header .header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.header-nav .nav-link {
  color: #0070f3;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.header-nav .nav-link:hover {
  text-decoration: underline;
}

h2 {
  color: #555;
  font-size: 1.25rem;
  margin-bottom: 15px;
}

.subtitle {
  color: #666;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.ai-link {
  color: #0070f3;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-link:hover {
  text-decoration: underline;
}

.ai-link .outbound-icon {
  width: 0.95em;
  height: 0.95em;
  margin-left: 0;
}

.subtitle-sep {
  color: #bbb;
  margin: 0 6px 0 8px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.panel {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
  height: auto;
  min-height: 0;
}

.panel:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

textarea {
  width: 100%;
  height: 400px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 14px;
  resize: vertical;
  background: #f9f9f9;
  transition: border-color 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: #0070f3;
  background: #fff;
}

button {
  margin-top: 15px;
  padding: 12px 30px;
  background: #0070f3;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: #0051cc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 112, 243, 0.3);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  align-items: center;
  justify-content: center;
}

.button-group button {
  margin: 0;
}

.help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #f0f0f0;
  color: #666;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  border: 1px solid #ddd;
  transition: all 0.2s ease;
  padding: 0 8px;
}

.help-button:hover {
  background: #e2e8f0;
  color: #4a5568;
  border-color: #cbd5e0;
  text-decoration: none;
}

/* PNG Download button styling */
#downloadPngBtn {
  background: #28a745;
}

#downloadPngBtn:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

#preview {
  min-height: 400px;
  max-height: none;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 4px;
  border: 2px dashed #ddd;
  transition: border-color 0.3s ease;
  overflow: visible;
  padding: 10px;
}

#preview.has-content {
  border-style: solid;
  border-color: #e0e0e0;
  background: #fafafa;
  align-items: flex-start;
  justify-content: flex-start;
}

#preview svg {
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

.examples {
  margin-top: 10px;
  margin-bottom: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.examples label {
  font-weight: 500;
  margin-right: 10px;
  color: #555;
}

.examples select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.examples select:focus {
  outline: none;
  border-color: #0070f3;
}

/* Loading state */
.loading-text {
  color: #999;
  font-style: italic;
}

/* Error state */
.error-message {
  color: #e00;
  background: #fee;
  padding: 10px;
  border-radius: 4px;
  margin-top: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .panel {
    padding: 20px;
  }
  
  textarea {
    height: 300px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  button {
    width: 100%;
  }
}

/* Preview header */
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.preview-header h2 {
  margin-bottom: 0;
}

.download-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.download-label {
  font-size: 12px;
  color: #666;
  margin-right: 4px;
}

.download-buttons button {
  margin: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 3px;
  min-height: auto;
}

.download-buttons button:hover {
  transform: translateY(-1px);
}

/* Contact Form Styles */
.contact-container {
  max-width: 700px;
  margin: 0 auto;
}

.contact-intro {
  margin-bottom: 15px;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 12px;
}

.form-group.form-group-message {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  margin-bottom: 3px;
  font-weight: 500;
  color: #555;
  font-size: 0.85rem;
}

.form-required {
  color: #e00;
}

.form-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 13px;
  background: #f9f9f9;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #0070f3;
  background: #fff;
}

.form-textarea {
  font-family: system-ui, -apple-system, sans-serif;
  resize: vertical;
  height: 100px;
  min-height: 100px;
  max-height: 120px;
}

.honeypot {
  display: none;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

/* Thanks Page Styles */
.thanks-container {
  max-width: 600px;
  margin: 40px auto;
  text-align: center;
}

.thanks-title {
  color: #28a745;
  margin-bottom: 20px;
}

.thanks-message {
  margin-bottom: 25px;
  color: #666;
  font-size: 1.1rem;
}

.thanks-actions {
  margin: 30px 0;
}

.thanks-links {
  color: #999;
  font-size: 0.9rem;
}

.thanks-links a {
  color: #0070f3;
}

.button-link {
  display: inline-block;
  text-decoration: none;
  color: white;
  background: #0070f3;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.button-link:hover {
  background: #0051cc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 112, 243, 0.3);
}

.home-link {
  color: inherit;
  text-decoration: none;
}

/* Footer */
.site-footer {
  text-align: center;
  margin-top: 60px;
  padding: 20px;
  color: #999;
  font-size: 14px;
  border-top: 1px solid #eee;
}

.site-footer a {
  color: #666;
  text-decoration: none;
  font-weight: normal;
}

.site-footer a:hover {
  color: #333;
  text-decoration: underline;
}