/* ============================================
   WordPress Theme.json Generator - Styles
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a {
color:#FFF;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #1e1e5e;
  background-color: #f9f9ff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
.site-header {
  background-color: #00005e;
  color: #fff;
  padding: 2.5rem 1rem;
  text-align: center;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.site-title {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.site-description {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.9;
}

/* --- Main Content --- */
.site-content {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 2rem auto;
  padding: 0;
}

/* --- Generator Wrap --- */
.generator-wrap {
  background: #fff;
  border-radius: 0;
}

/* --- Tab Navigation --- */
.generator-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #f0f0ff;
  border-bottom: 2px solid #00005e;
  padding:  0;
}

.tab-nav {
  background: transparent;
  border: 2px solid transparent;
  border-bottom: none;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: #444;
  cursor: pointer;
  margin-bottom: -2px;
  transition: background 0.2s, color 0.2s;
  border-radius: 0;
}

.tab-nav:hover {
  background: #fff;
  color: #00005e;
}

.tab-nav.selected-tab {
  background: #fff;
  color: #00005e;
  font-weight: 600;
  border-color: #00005e;
}

/* --- Tab Panels --- */
.tab-panels {
  padding: 1.5rem;
  border: 2px solid #00005e;
  border-top: none;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #00005e;
}

.tab-description {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1.5rem;
}

/* --- Fields Grid --- */
.fields-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.field-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.field-row:last-child {
  border-bottom: none;
}

/* --- Toggle Switch --- */
.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toggle-text {
  font-weight: 500;
  font-size: 1rem;
  color: #1e1e5e;
  min-width: 200px;
}

.toggle-desc {
  font-size: 0.85rem;
  color: #888;
  flex: 1;
  min-width: 200px;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 26px;
  transition: background-color 0.3s;
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #00005e;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* --- Text Inputs --- */
.text-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.label-text {
  font-weight: 500;
  font-size: 1rem;
  color: #1e1e5e;
}

.label-desc {
  font-size: 0.85rem;
  color: #888;
}

.text-input {
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid #ddd;
  border-radius: 0;
  transition: border-color 0.2s;
  width: 100%;
  max-width: 400px;
  margin-top: 0.25rem;
}

.text-input:focus {
  outline: none;
  border-color: #00005e;
}

/* --- Color Input --- */
.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-input-wrap input[type="color"] {
  width: 40px;
  height: 36px;
  border: 2px solid #ddd;
  border-radius: 0;
  cursor: pointer;
  padding: 2px;
  background: #fff;
}

.color-input-wrap input[type="text"] {
  width: 120px;
}

/* --- Repeater --- */
.repeater-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.repeater-item {
  background: #f8f8ff;
  border: 1px solid #ddd;
  padding: 1rem;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.repeater-item .field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 140px;
}

.repeater-item .field-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #555;
}

.repeater-item .field-group input[type="text"] {
  padding: 0.5rem;
  font-size: 0.9rem;
  border: 2px solid #ddd;
  border-radius: 0;
  font-family: inherit;
  width: 100%;
}

.repeater-item .field-group input[type="text"]:focus {
  outline: none;
  border-color: #00005e;
}

.btn-remove-item {
  background: #f05d5e;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-remove-item:hover {
  background: #d43d3e;
}

.btn-add-item {
  background: transparent;
  color: #00005e;
  border: 2px dashed #00005e;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  width: 100%;
}

.btn-add-item:hover {
  background: #00005e;
  color: #fff;
}

/* --- Action Buttons --- */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 0 0;
  border-top: 2px solid #eee;
}

.btn-primary {
  background-color: #00005e;
  color: #fff;
  border: 2px solid #00005e;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary:hover {
  background-color: #fff;
  color: #00005e;
}

.btn-secondary {
  background-color: #fff;
  color: #00005e;
  border: 2px solid #00005e;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background-color: #00005e;
  color: #fff;
}

/* --- Generated Code --- */
.generated-code {
  margin: 0;
  border-top: 2px solid #00005e;
}

.output-title {
  padding: 1rem 1.5rem 0;
  font-size: 1.2rem;
  color: #00005e;
}

.generated-code pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.5rem;
  margin: 1rem 1.5rem 1.5rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.generated-code pre code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  white-space: pre;
}

/* --- Syntax Highlighting --- */
.json-key {
  color: #89b4fa;
}

.json-string {
  color: #a6e3a1;
}

.json-number {
  color: #fab387;
}

.json-boolean {
  color: #cba6f7;
}

.json-null {
  color: #f38ba8;
}

.json-bracket {
  color: #cdd6f4;
}

/* --- Copy Success Message --- */
.copy-success {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: #00005e;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  z-index: 1000;
  animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-10px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* --- Footer --- */
.site-footer {
  background: #00005e;
  color: #fff;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .site-title {
    font-size: 1.8rem;
  }

  .site-description {
    font-size: 0.95rem;
  }

  .generator-nav {
    gap: 0;
  }

  .tab-nav {
    font-size: 0.8rem;
    padding: 0.5rem 0.6rem;
  }

  .tab-panels {
    padding: 1rem;
  }

  .toggle-label {
    flex-direction: column;
    align-items: flex-start;
  }

  .toggle-switch {
    align-self: flex-end;
    margin-top: -1.5rem;
  }

  .repeater-item {
    flex-direction: column;
    align-items: stretch;
  }

  .repeater-item .field-group {
    min-width: 100%;
  }

  .btn-remove-item {
    align-self: flex-end;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons button {
    width: 100%;
  }

  .generated-code pre {
    margin: 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 1.5rem 1rem;
  }

  .site-title {
    font-size: 1.4rem;
  }

  .tab-nav {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }
}