/* Subject Line Tester Styles */

.slt-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.slt-intro {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left: 4px solid #3b82f6;
  padding: 1.25rem 1.5rem;
  border-radius: 0 10px 10px 0;
  margin-bottom: 1.5rem;
}

.slt-intro p {
  margin: 0;
  color: #1e40af;
  line-height: 1.6;
}

.slt-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.slt-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
}

.slt-hint {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem 0;
}

/* Input */
.slt-input-wrap {
  position: relative;
}

.slt-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1.125rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.slt-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.slt-char-count {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #9ca3af;
}

.slt-input-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Buttons */
.slt-btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  color: #374151;
}

.slt-btn:hover:not(:disabled) {
  background: #f3f4f6;
}

.slt-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.slt-btn-primary {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.slt-btn-primary:hover:not(:disabled) {
  background: #2563eb;
}

.slt-btn-light {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

/* Score Card */
.slt-score-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.slt-score-wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.slt-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 6px solid #d1d5db;
  flex-shrink: 0;
}

.slt-score-circle.score-excellent {
  background: #d1fae5;
  border-color: #10b981;
}

.slt-score-circle.score-good {
  background: #dbeafe;
  border-color: #3b82f6;
}

.slt-score-circle.score-average {
  background: #fef3c7;
  border-color: #f59e0b;
}

.slt-score-circle.score-poor {
  background: #fee2e2;
  border-color: #ef4444;
}

.slt-score-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: #374151;
  line-height: 1;
}

.slt-score-circle.score-excellent .slt-score-num { color: #059669; }
.slt-score-circle.score-good .slt-score-num { color: #2563eb; }
.slt-score-circle.score-average .slt-score-num { color: #d97706; }
.slt-score-circle.score-poor .slt-score-num { color: #dc2626; }

.slt-score-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slt-score-details h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: #111827;
}

.slt-score-details p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

/* Analysis Grid */
.slt-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.slt-analysis-item {
  padding: 1rem;
  background: #f9fafb;
  border-radius: 10px;
  border-left: 4px solid #e5e7eb;
}

.slt-analysis-item.status-good {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.slt-analysis-item.status-warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.slt-analysis-item.status-bad {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.slt-analysis-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.slt-analysis-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.slt-analysis-note {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Preview */
.slt-preview-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.slt-tab {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.slt-tab.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.slt-preview-content {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.slt-inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.slt-inbox-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.slt-inbox-content {
  flex: 1;
  min-width: 0;
}

.slt-inbox-sender {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #111827;
}

.slt-inbox-subject {
  font-weight: 500;
  font-size: 0.875rem;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.slt-inbox-preview {
  font-size: 0.8125rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slt-inbox-time {
  font-size: 0.75rem;
  color: #9ca3af;
  flex-shrink: 0;
}

/* Desktop Preview */
.slt-inbox-desktop {
  align-items: center;
}

.slt-inbox-checkbox, .slt-inbox-star {
  color: #9ca3af;
  padding: 0 0.25rem;
}

.slt-inbox-sender-desktop {
  font-weight: 600;
  font-size: 0.875rem;
  width: 150px;
  flex-shrink: 0;
}

.slt-inbox-subject-desktop {
  flex: 1;
  font-size: 0.875rem;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slt-inbox-time-desktop {
  font-size: 0.75rem;
  color: #6b7280;
  flex-shrink: 0;
}

/* Suggestions */
.slt-suggestions {
  list-style: none;
  padding: 0;
  margin: 0;
}

.slt-suggestions li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
  font-size: 0.9375rem;
  color: #374151;
}

.slt-suggestions li.suggestion-positive {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.slt-suggestions li.suggestion-warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

/* A/B Testing */
.slt-ab-wrap {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.slt-ab-input {
  flex: 1;
}

.slt-ab-input label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: #374151;
}

.slt-ab-input .slt-input {
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
}

.slt-ab-score {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
}

.slt-ab-vs {
  font-weight: 700;
  color: #9ca3af;
  padding-top: 2rem;
}

.slt-ab-result {
  margin-top: 1rem;
  padding: 1rem;
  background: #f0fdf4;
  border-radius: 8px;
  border: 1px solid #10b981;
}

.slt-ab-result.winner-a { border-color: #3b82f6; background: #eff6ff; }
.slt-ab-result.winner-b { border-color: #8b5cf6; background: #f5f3ff; }
.slt-ab-result.tie { border-color: #6b7280; background: #f9fafb; }

/* Tips */
.slt-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.slt-tip {
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
}

.slt-tip h3 {
  font-size: 0.9375rem;
  margin: 0 0 0.75rem 0;
  color: #111827;
}

.slt-tip ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.8125rem;
  color: #4b5563;
  line-height: 1.7;
}

/* FAQ */
.slt-faq details {
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
}

.slt-faq details:last-child {
  border-bottom: none;
}

.slt-faq summary {
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slt-faq summary::-webkit-details-marker {
  display: none;
}

.slt-faq summary::after {
  content: '+';
  font-size: 1.25rem;
  color: #6b7280;
}

.slt-faq details[open] summary::after {
  content: '−';
}

.slt-faq details p {
  margin: 0.75rem 0 0 0;
  color: #4b5563;
  line-height: 1.6;
}

/* Toast */
.slt-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #10b981;
  color: #fff;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 9999;
}

.slt-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
  .slt-score-wrap {
    flex-direction: column;
    text-align: center;
  }
  
  .slt-ab-wrap {
    flex-direction: column;
  }
  
  .slt-ab-vs {
    padding: 0;
    text-align: center;
  }
  
  .slt-input-actions {
    flex-direction: column;
  }
  
  .slt-btn {
    width: 100%;
    text-align: center;
  }
}
