/* === KDP GENERATOR === */
.kdp-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.kdp-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 500px) {
  .kdp-form-grid { grid-template-columns: 1fr; }
}

.form-select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--light);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' opacity='0.5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.form-select:focus { border-color: var(--fun-orange); }
.form-select option { background: #141432; color: var(--light); }

/* KDP Output */
.kdp-output-panel { min-height: 400px; }

.outline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.outline-pillar-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 50px;
}

.outline-book-info {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.outline-book-badge {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
}

/* Title options */
.title-options-section {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.title-options-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fun-orange);
  margin-bottom: 1rem;
}

.title-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
}

.title-option:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

.title-option.selected {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
}

.title-option input[type="radio"] {
  accent-color: var(--fun-orange);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.title-option-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--light);
  line-height: 1.4;
}

/* Subtitle and description */
.kdp-subtitle-box {
  background: rgba(123, 47, 247, 0.08);
  border: 1px solid rgba(123, 47, 247, 0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.kdp-subtitle-label, .kdp-desc-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(123, 47, 247, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.kdp-subtitle-text {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}

.kdp-description-box {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.kdp-desc-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Chapters */
.chapters-section {
  margin-bottom: 1.25rem;
}

.chapters-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--kid-green);
  margin-bottom: 0.75rem;
}

.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chapter-card {
  background: rgba(26, 26, 78, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: border-color 0.15s;
}

.chapter-card:hover { border-color: rgba(255, 215, 0, 0.25); }

.chapter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.chapter-number {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--fun-orange), #d97706);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chapter-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--light);
  line-height: 1.3;
  flex: 1;
}

.chapter-page-range {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

.chapter-theme {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  font-style: italic;
}

.chapter-activities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.activity-chip {
  display: inline-block;
  background: rgba(46, 207, 108, 0.1);
  border: 1px solid rgba(46, 207, 108, 0.25);
  color: var(--kid-green);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 50px;
}

/* Amazon SEO section */
.kdp-amazon-section {
  background: rgba(58, 94, 255, 0.06);
  border: 1px solid rgba(58, 94, 255, 0.2);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.kdp-amazon-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bright-blue);
  margin-bottom: 0.75rem;
}

.kdp-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.kdp-meta-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
  min-width: 90px;
  padding-top: 0.1rem;
}

.kdp-meta-value {
  flex: 1;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

/* KDP Actions */
.kdp-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.generate-kdp-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.generate-kdp-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.5);
}

.generate-kdp-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.view-outlines-link {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

.view-outlines-link:hover { text-decoration: underline; }

/* === KDP OUTLINES LIBRARY === */
.kdp-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.outline-card {
  background: rgba(26, 26, 78, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.18s, border-color 0.18s;
}

.outline-card:hover { transform: translateY(-3px); border-color: rgba(245, 158, 11, 0.3); }

.outline-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.outline-pillar-tag {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--fun-orange);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}

.outline-book-type-tag {
  background: rgba(46, 207, 108, 0.1);
  border: 1px solid rgba(46, 207, 108, 0.25);
  color: var(--kid-green);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}

.outline-card-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--light);
  line-height: 1.3;
}

.outline-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
}

.outline-card-meta span { display: flex; align-items: center; gap: 0.25rem; }

.outline-card-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.outline-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.outline-expand-btn {
  align-self: flex-start;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--fun-orange);
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s;
}

.outline-expand-btn:hover { background: rgba(245, 158, 11, 0.18); }

/* KDP modal content */
.kdp-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.kdp-modal-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
}

.kdp-modal-meta span { display: flex; align-items: center; gap: 0.3rem; }

.kdp-modal-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  margin: 1rem 0 0.5rem;
  line-height: 1.2;
}

.kdp-modal-subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.kdp-modal-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.kdp-modal-chapters-section { margin-bottom: 1.25rem; }

.kdp-modal-section-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--kid-green);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kdp-modal-amazon {
  background: rgba(58, 94, 255, 0.06);
  border: 1px solid rgba(58, 94, 255, 0.15);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

/* Page count badge */
.page-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.2);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
}
/* === PUBLISH TO SHOP PANEL === */
.kdp-publish-panel {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
}

.publish-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 0.4rem;
}

.publish-panel-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}

.publish-price-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.publish-price-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.publish-price-input {
  width: 90px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  padding: 0.4rem 0.65rem;
}

.publish-btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.publish-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.publish-btn:hover { opacity: 0.88; }
.publish-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.draft-btn {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.draft-btn:hover { opacity: 0.8; }
.draft-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.publish-status {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
}
.publish-status.hidden { display: none; }
.publish-status--loading { background: rgba(245,200,66,0.1); color: #f5c842; border: 1px solid rgba(245,200,66,0.2); }
.publish-status--success { background: rgba(16,185,129,0.1); color: #10b981; border: 1px solid rgba(16,185,129,0.25); }
.publish-status--warn   { background: rgba(245,200,66,0.1); color: #f5c842; border: 1px solid rgba(245,200,66,0.2); }
.publish-status--error  { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.publish-status a { color: inherit; font-weight: 700; text-decoration: underline; }
