/* style.css - SNS Char Counter スタイル（Figma風＋追加仕様） */

#sns-char-counter-app {
  font-family: 'Segoe UI', sans-serif;
  background: #f9fafb;
  padding: 2rem;
  max-width: 800px;
  margin: auto;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.scc-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.scc-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.scc-controls label {
  flex: 1;
  font-weight: bold;
}

.scc-controls select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  background: #fff;
}

.scc-block {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
}

.scc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.scc-header button {
  margin-left: 0.5rem;
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  background-color: #374151;
  transition: background 0.2s ease;
}

.scc-header button:hover {
  background-color: #d1d5db;
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  font-size: 1rem;
  resize: vertical;
  background: #fff;
  font-family: monospace;
  line-height: 1.6;
  white-space: pre-wrap;
}

.scc-preview {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #f3f4f6;
  font-family: monospace;
  border-radius: 0.5rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
}

.scc-status {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.scc-footer {
  margin-top: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scc-footer button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  background: #3b82f6;
  color: white;
  transition: background 0.2s ease;
}

.scc-footer button:hover {
  background: #2563eb;
}

#char-total {
  font-size: 0.95rem;
  color: #374151;
}

.scc-toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: #10b981;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  z-index: 1000;
  display: none;
}

.scc-visual-settings {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.scc-visual-settings label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.scc-visual-settings input[type="checkbox"] {
  accent-color: #3b82f6;
  transform: scale(1.2);
}

/* 強調スタイル */
.mark-space {
  background-color: rgba(147, 197, 253, 0.4);
  border-radius: 3px;
}

.excluded-char {
  opacity: 0.5;
  color: #9ca3af;
  text-decoration: line-through;
  background-color: rgba(255, 0, 0, 0.1);
  border-radius: 2px;
  padding: 0 1px;
}

.over-limit {
  background-color: rgba(255, 99, 132, 0.2);
  color: #ef4444;
  font-weight: bold;
  border-radius: 2px;
  padding: 0 1px;
}
