/* Note記事AI Frontend Styles */

.nai-wrap {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 16px;
	font-family: inherit;
	line-height: 1.6;
	color: #333;
}

/* ===== Notice ===== */
.nai-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 14px;
}

.nai-notice-warning {
	background: #fff8e1;
	border: 1px solid #ffe082;
	color: #8d6e00;
}

/* ===== Feature Tabs ===== */
.nai-feature-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 24px;
	background: #f8f9fa;
	border-radius: 10px;
	padding: 4px;
	border: 1px solid #e5e7eb;
}

.nai-feature-tab {
	flex: 1;
	padding: 12px 20px;
	border: none;
	background: transparent;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	color: #6b7280;
	cursor: pointer;
	border-radius: 8px;
	transition: all 0.2s;
	text-align: center;
}

.nai-feature-tab:hover {
	color: #374151;
	background: rgba(255, 255, 255, 0.5);
}

.nai-feature-tab.active {
	background: #fff;
	color: #2563eb;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ===== Step Indicator ===== */
.nai-steps {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
	padding: 16px 20px;
	background: #f8f9fa;
	border-radius: 8px;
}

.nai-step {
	display: flex;
	align-items: center;
	gap: 8px;
	opacity: 0.35;
	transition: opacity 0.3s;
}

.nai-step.active {
	opacity: 1;
}

.nai-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #ddd;
	color: #666;
	font-weight: 700;
	font-size: 14px;
}

.nai-step.active .nai-step-num {
	background: #2563eb;
	color: #fff;
}

.nai-step-text {
	font-size: 14px;
	font-weight: 600;
}

.nai-step-arrow {
	color: #ccc;
	font-size: 18px;
}

/* ===== Card ===== */
.nai-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nai-card-title {
	margin: 0 0 16px 0;
	padding: 0 0 12px 0;
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
	border-bottom: 2px solid #f0f0f0;
}

/* ===== Form Fields ===== */
.nai-field {
	margin-bottom: 16px;
}

.nai-field:last-child {
	margin-bottom: 0;
}

.nai-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.nai-field input[type="text"],
.nai-field textarea,
.nai-field select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
	box-sizing: border-box;
}

.nai-field input:focus,
.nai-field textarea:focus,
.nai-field select:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
	outline: none;
}

.nai-options-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 600px) {
	.nai-options-row {
		grid-template-columns: 1fr;
	}
}

.nai-desc {
	color: #6b7280;
	font-size: 13px;
	margin: 0 0 12px 0;
}

/* ===== Checkboxes ===== */
.nai-checks {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.nai-check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
}

.nai-check:hover {
	background: #eff6ff;
	border-color: #93c5fd;
}

.nai-check input[type="checkbox"]:checked + span {
	color: #2563eb;
	font-weight: 600;
}

/* ===== Buttons ===== */
.nai-actions {
	text-align: center;
	margin: 24px 0 8px;
}

.nai-btn {
	display: inline-block;
	padding: 12px 32px;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
}

.nai-btn-primary {
	background: #2563eb;
	color: #fff;
}

.nai-btn-primary:hover {
	background: #1d4ed8;
}

.nai-btn-primary:disabled {
	background: #93c5fd;
	cursor: not-allowed;
}

.nai-btn-secondary {
	background: #f3f4f6;
	color: #374151;
	border: 1px solid #d1d5db;
	margin-left: 8px;
}

.nai-btn-secondary:hover {
	background: #e5e7eb;
}

.nai-btn-link {
	background: none;
	border: none;
	color: #2563eb;
	font-size: 13px;
	cursor: pointer;
	padding: 0;
	font-family: inherit;
}

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

/* ===== Keyword Cards ===== */
.nai-keyword-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.nai-kw-card {
	padding: 16px;
	background: #fafbfc;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	transition: border-color 0.15s;
}

.nai-kw-card:hover {
	border-color: #93c5fd;
}

.nai-kw-main {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.nai-kw-text {
	font-size: 15px;
	font-weight: 700;
	color: #1a1a1a;
}

.nai-kw-intent {
	display: inline-block;
	padding: 2px 8px;
	background: #dbeafe;
	color: #1d4ed8;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
}

.nai-kw-reason {
	margin: 8px 0 0 28px;
	color: #6b7280;
	font-size: 13px;
}

.nai-kw-longtail {
	margin: 10px 0 0 28px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.nai-kw-lt-label {
	font-size: 12px;
	color: #9ca3af;
	font-weight: 500;
}

.nai-kw-lt-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 12px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s;
}

.nai-kw-lt-item:hover {
	background: #eff6ff;
	border-color: #93c5fd;
}

/* ===== Selected info ===== */
.nai-selected-info {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 6px;
	padding: 16px;
	margin-bottom: 12px;
}

.nai-info-row {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

.nai-info-row:last-child {
	margin-bottom: 0;
}

.nai-info-label {
	font-weight: 600;
	font-size: 13px;
	color: #1e40af;
	min-width: 100px;
}

.nai-info-value {
	font-size: 13px;
	color: #1a1a1a;
}

.nai-tag {
	display: inline-block;
	padding: 2px 10px;
	background: #2563eb;
	color: #fff;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	margin: 2px 4px 2px 0;
}

/* ===== Tabs ===== */
.nai-tabs {
	display: flex;
	border-bottom: 2px solid #e5e7eb;
	margin-bottom: 16px;
}

.nai-tab {
	padding: 8px 20px;
	cursor: pointer;
	border: none;
	background: transparent;
	font-size: 14px;
	font-family: inherit;
	color: #9ca3af;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: all 0.15s;
}

.nai-tab:hover {
	color: #2563eb;
}

.nai-tab.active {
	color: #1a1a1a;
	font-weight: 600;
	border-bottom-color: #2563eb;
}

/* ===== Result textarea ===== */
.nai-result-textarea {
	width: 100%;
	min-height: 400px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.8;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	resize: vertical;
	background: #fafbfc;
	box-sizing: border-box;
}

/* ===== Preview ===== */
.nai-preview-area {
	padding: 20px;
	font-size: 15px;
	line-height: 2.0;
}

.nai-preview-area h2 {
	font-size: 1.4em;
	border-bottom: 2px solid #1a1a1a;
	padding-bottom: 8px;
	margin-top: 32px;
}

.nai-preview-area h3 {
	font-size: 1.15em;
	margin-top: 24px;
}

.nai-preview-area p {
	margin-bottom: 16px;
}

.nai-preview-area ul {
	padding-left: 24px;
	margin-bottom: 16px;
}

.nai-preview-area li {
	margin-bottom: 4px;
}

.nai-preview-area hr {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 32px 0;
}

.nai-preview-area strong {
	font-weight: 700;
}

/* ===== Result actions ===== */
.nai-result-actions {
	display: flex;
	gap: 12px;
	margin-top: 16px;
}

#nai-copy-btn.copied {
	background: #16a34a;
}

/* ===== Stats ===== */
.nai-stats {
	display: flex;
	gap: 24px;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid #f0f0f0;
	color: #9ca3af;
	font-size: 13px;
}

/* ===== Loading ===== */
.nai-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: nai-spin 0.6s linear infinite;
	vertical-align: middle;
	margin-right: 8px;
}

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

/* ===== Progress Bar ===== */
#nai-progress {
	margin: 16px 0;
	padding: 16px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
}

.nai-progress-bar {
	width: 0%;
	height: 6px;
	background: linear-gradient(90deg, #2563eb, #60a5fa);
	border-radius: 3px;
	transition: width 0.3s ease;
}

.nai-progress-text {
	margin-top: 8px;
	font-size: 13px;
	color: #6b7280;
	text-align: center;
}

/* ===== Rate Limit Info ===== */
.nai-rate-limit-info {
	margin-top: 8px;
	font-size: 13px;
	color: #6b7280;
	text-align: center;
}

.nai-rate-limit-info.nai-rate-warning {
	color: #d97706;
}

.nai-rate-limit-info.nai-rate-exhausted {
	color: #dc2626;
	font-weight: 600;
}

/* ===== Profile Result ===== */
.nai-profile-block {
	position: relative;
}

.nai-profile-textarea {
	width: 100%;
	min-height: 80px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.8;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	resize: vertical;
	background: #fafbfc;
	box-sizing: border-box;
}

.nai-concept-area {
	padding: 16px;
	background: #fafbfc;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.8;
	color: #374151;
}

.nai-concept-area p {
	margin: 0;
}

.nai-profile-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
}

.nai-btn-sm {
	padding: 8px 20px;
	font-size: 13px;
}

.nai-char-info {
	font-size: 13px;
	color: #6b7280;
}

#nai-copy-profile-btn.copied,
#nai-copy-concept-btn.copied {
	background: #16a34a;
}
