/**
 * Content Studio Styles
 * LinkedIn Content Creator Module
 * Copyright (c) 2026 BlinkRQuotes. All Rights Reserved.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.content-studio-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  height: calc(100vh - 200px);
  min-height: 500px;
}

.content-studio-controls {
  background: var(--bg-surface, #1e293b);
  border-radius: 12px;
  padding: 20px;
  overflow-y: auto;
  border: 1px solid var(--border-color, #334155);
}

.content-studio-output {
  background: var(--bg-surface, #1e293b);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color, #334155);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */

.content-studio-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-surface, #1e293b);
  border-radius: 16px;
  border: 1px solid var(--border-color, #334155);
}

.content-studio-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.content-studio-empty h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  margin-bottom: 8px;
}

.content-studio-empty p {
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 8px;
}

.content-studio-empty .btn-lg {
  margin-top: 24px;
  padding: 14px 32px;
  font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTROL SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.control-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color, #334155);
}

.control-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.control-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h4 {
  margin-bottom: 0;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-primary, #10b981);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

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

/* Voice Summary */
.voice-summary {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.voice-summary p {
  margin: 0;
  color: var(--text-primary, #f1f5f9);
}

.voice-summary .text-muted {
  color: var(--text-secondary, #94a3b8);
  font-size: 12px;
  margin-top: 4px;
}

/* Content Type Grid */
.content-type-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-type-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color, #334155);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: var(--text-primary, #f1f5f9);
}

.content-type-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-primary, #10b981);
}

.content-type-btn.selected {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-primary, #10b981);
}

.content-type-btn .type-name {
  font-weight: 500;
  font-size: 14px;
}

.content-type-btn .type-words {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
}

/* Pillars List */
.pillars-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pillar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color, #334155);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pillar-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pillar-item.selected {
  background: rgba(139, 92, 246, 0.15);
  border-color: #8b5cf6;
}

.pillar-item .pillar-name {
  font-size: 13px;
  color: var(--text-primary, #f1f5f9);
}

.pillar-item .btn-icon {
  opacity: 0;
  transition: opacity 0.2s;
}

.pillar-item:hover .btn-icon {
  opacity: 1;
}

/* Custom Topic Input */
.custom-topic-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color, #334155);
  border-radius: 6px;
  color: var(--text-primary, #f1f5f9);
  font-size: 14px;
}

.custom-topic-input:focus {
  outline: none;
  border-color: var(--accent-primary, #10b981);
}

.custom-topic-input::placeholder {
  color: var(--text-muted, #64748b);
}

/* Generate Button */
.generate-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   OUTPUT AREA
   ═══════════════════════════════════════════════════════════════════════════ */

.output-header {
  margin-bottom: 16px;
}

.output-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  margin: 0;
}

.content-output-area {
  flex: 1;
  overflow-y: auto;
}

.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-secondary, #94a3b8);
}

.output-placeholder p {
  margin: 4px 0;
}

/* Generated Content */
.generated-content {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color, #334155);
  border-radius: 12px;
  padding: 20px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.content-type-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.content-date {
  color: var(--text-muted, #64748b);
  font-size: 12px;
}

.content-editor {
  width: 100%;
  min-height: 300px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color, #334155);
  border-radius: 8px;
  color: var(--text-primary, #f1f5f9);
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
}

.content-editor:focus {
  outline: none;
  border-color: var(--accent-primary, #10b981);
}

.content-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.content-tips {
  margin-top: 20px;
  padding: 14px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
}

.content-tips strong {
  color: #fbbf24;
  font-size: 13px;
}

.content-tips ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  color: var(--text-secondary, #94a3b8);
  font-size: 13px;
}

.content-tips li {
  margin-bottom: 4px;
}

/* Generating Indicator */
.generating-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.generating-indicator .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color, #334155);
  border-top-color: var(--accent-primary, #10b981);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.generating-indicator p {
  margin-top: 16px;
  color: var(--text-secondary, #94a3b8);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HISTORY
   ═══════════════════════════════════════════════════════════════════════════ */

.content-history {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color, #334155);
}

.content-history h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 12px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color, #334155);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-primary, #10b981);
}

.history-type {
  font-size: 11px;
  font-weight: 500;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.history-preview {
  font-size: 13px;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-date {
  font-size: 11px;
  color: var(--text-muted, #64748b);
}

/* ═══════════════════════════════════════════════════════════════════════════
   VOICE WIZARD
   ═══════════════════════════════════════════════════════════════════════════ */

.voice-wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.voice-wizard-modal {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color, #334155);
}

.voice-wizard-header {
  padding: 24px 24px 16px;
  text-align: center;
}

.voice-wizard-header h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  margin: 0 0 8px;
}

.voice-wizard-header p {
  color: var(--text-secondary, #94a3b8);
  font-size: 14px;
  margin: 0;
}

.voice-wizard-progress {
  height: 4px;
  background: var(--border-color, #334155);
  margin: 0 24px;
  border-radius: 2px;
  overflow: hidden;
}

.voice-wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease;
}

.voice-wizard-step-count {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin-top: 12px;
}

.voice-wizard-question {
  padding: 24px;
}

.voice-wizard-question h4 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary, #f1f5f9);
  margin: 0 0 8px;
}

.voice-wizard-question .subtext {
  color: var(--text-secondary, #94a3b8);
  font-size: 14px;
  margin: 0 0 20px;
}

.voice-wizard-input,
.voice-wizard-textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color, #334155);
  border-radius: 8px;
  color: var(--text-primary, #f1f5f9);
  font-size: 15px;
  font-family: inherit;
}

.voice-wizard-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.voice-wizard-input:focus,
.voice-wizard-textarea:focus {
  outline: none;
  border-color: var(--accent-primary, #10b981);
}

.voice-wizard-input::placeholder,
.voice-wizard-textarea::placeholder {
  color: var(--text-muted, #64748b);
}

.voice-wizard-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-wizard-option {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color, #334155);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-wizard-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.voice-wizard-option.selected {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.voice-wizard-option input {
  display: none;
}

.voice-wizard-option .option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color, #475569);
  border-radius: 50%;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.voice-wizard-option.selected .option-radio {
  border-color: #10b981;
}

.voice-wizard-option.selected .option-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
}

.voice-wizard-option .option-label {
  color: var(--text-primary, #e2e8f0);
  font-size: 14px;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MULTISELECT CHECKBOXES
   ═══════════════════════════════════════════════════════════════════════════ */

.voice-wizard-multiselect {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.voice-wizard-checkbox {
  display: flex;
  align-items: flex-start;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color, #334155);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-wizard-checkbox:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.voice-wizard-checkbox.selected {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
}

.voice-wizard-checkbox input {
  display: none;
}

.voice-wizard-checkbox .checkbox-box {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--border-color, #475569);
  border-radius: 4px;
  margin-right: 12px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.voice-wizard-checkbox.selected .checkbox-box {
  background: #10b981;
  border-color: #10b981;
}

.voice-wizard-checkbox.selected .checkbox-box::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.voice-wizard-checkbox .checkbox-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.voice-wizard-checkbox .checkbox-label {
  color: var(--text-primary, #e2e8f0);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.voice-wizard-checkbox .checkbox-desc {
  color: var(--text-muted, #64748b);
  font-size: 12px;
  line-height: 1.4;
}

.voice-wizard-checkbox.selected .checkbox-label {
  color: #10b981;
}

/* Scrollbar for multiselect */
.voice-wizard-multiselect::-webkit-scrollbar {
  width: 6px;
}

.voice-wizard-multiselect::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.voice-wizard-multiselect::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.voice-wizard-multiselect::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.voice-wizard-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px 24px;
}

.voice-wizard-footer .btn-secondary,
.voice-wizard-footer .btn-primary {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-wizard-footer .btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color, #475569);
  color: var(--text-secondary, #94a3b8);
}

.voice-wizard-footer .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.voice-wizard-footer .btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: white;
}

.voice-wizard-footer .btn-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .content-studio-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .content-studio-controls {
    order: 2;
  }

  .content-studio-output {
    order: 1;
    min-height: 400px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

.text-muted {
  color: var(--text-muted, #64748b) !important;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-icon:hover {
  opacity: 1;
}
