/**
 * SoS Name Checker — Frontend Styles
 *
 * All classes prefixed with .sos-nc- to avoid conflicts.
 * Uses CSS custom properties for easy theme overrides.
 */

/* =============================================
   CSS Custom Properties
   ============================================= */

.sos-nc-widget {
	--sos-nc-primary: #2563EB;
	--sos-nc-primary-hover: #1d4ed8;
	--sos-nc-success: #16A34A;
	--sos-nc-success-bg: #f0fdf4;
	--sos-nc-error: #DC2626;
	--sos-nc-error-bg: #fef2f2;
	--sos-nc-bg: #FFFFFF;
	--sos-nc-bg-page: #F9FAFB;
	--sos-nc-text: #111827;
	--sos-nc-text-secondary: #6b7280;
	--sos-nc-border: #e5e7eb;
	--sos-nc-radius: 8px;
	--sos-nc-radius-sm: 6px;
	--sos-nc-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
	--sos-nc-shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	--sos-nc-font: inherit;
	--sos-nc-max-width: 600px;
}

/* =============================================
   Widget Container
   ============================================= */

.sos-nc-widget {
	font-family: var(--sos-nc-font), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	max-width: var(--sos-nc-max-width);
	margin: 0 auto;
	color: var(--sos-nc-text);
	line-height: 1.5;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.sos-nc-widget *,
.sos-nc-widget *::before,
.sos-nc-widget *::after {
	box-sizing: border-box;
}

/* =============================================
   Card
   ============================================= */

.sos-nc-card {
	background: var(--sos-nc-bg);
	border-radius: var(--sos-nc-radius);
	box-shadow: var(--sos-nc-shadow);
	padding: 32px;
	border: 1px solid var(--sos-nc-border);
}

/* =============================================
   Heading
   ============================================= */

.sos-nc-heading {
	margin: 0 0 24px 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--sos-nc-text);
	line-height: 1.3;
}

/* =============================================
   State Indicator
   ============================================= */

.sos-nc-state-indicator {
	margin: -16px 0 20px 0;
	font-size: 13px;
	color: var(--sos-nc-text-secondary);
	font-weight: 500;
	letter-spacing: 0.01em;
}

/* =============================================
   State Dropdown
   ============================================= */

.sos-nc-state-select {
	margin-bottom: 16px;
}

.sos-nc-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--sos-nc-text);
	margin-bottom: 6px;
}

.sos-nc-state-dropdown {
	width: 100%;
	padding: 10px 14px;
	font-size: 15px;
	border: 1.5px solid var(--sos-nc-border);
	border-radius: var(--sos-nc-radius-sm);
	background: var(--sos-nc-bg);
	color: var(--sos-nc-text);
	appearance: auto;
	outline: none;
	transition: border-color 0.2s ease;
}

.sos-nc-state-dropdown:focus {
	border-color: var(--sos-nc-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* =============================================
   Search Input Group
   ============================================= */

.sos-nc-search-group {
	margin-bottom: 0;
}

.sos-nc-input-wrap {
	position: relative;
	display: flex;
	align-items: stretch;
}

.sos-nc-input {
	flex: 1;
	padding: 12px 16px;
	padding-right: 52px;
	font-size: 16px;
	border: 1.5px solid var(--sos-nc-border);
	border-radius: var(--sos-nc-radius-sm);
	background: var(--sos-nc-bg);
	color: var(--sos-nc-text);
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
}

.sos-nc-input::placeholder {
	color: #9ca3af;
}

.sos-nc-input:focus {
	border-color: var(--sos-nc-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sos-nc-input:disabled {
	background: #f9fafb;
	color: #9ca3af;
	cursor: not-allowed;
}

/* =============================================
   Search Button
   ============================================= */

.sos-nc-search-btn {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--sos-nc-primary);
	color: #ffffff;
	border: none;
	border-radius: calc(var(--sos-nc-radius-sm) - 2px);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
	padding: 0;
	line-height: 1;
}

.sos-nc-search-btn:hover:not(:disabled) {
	background: var(--sos-nc-primary-hover);
}

.sos-nc-search-btn:active:not(:disabled) {
	transform: translateY(-50%) scale(0.96);
}

.sos-nc-search-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.sos-nc-icon-search {
	display: block;
}

/* =============================================
   Spinner
   ============================================= */

.sos-nc-spinner {
	width: 20px;
	height: 20px;
	border: 2.5px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: sos-nc-spin 0.6s linear infinite;
}

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

/* =============================================
   Search Status & Validation
   ============================================= */

.sos-nc-search-status {
	margin-top: 8px;
	font-size: 13px;
	color: var(--sos-nc-text-secondary);
	font-style: italic;
	text-align: center;
	font-weight: bold;
}

.sos-nc-validation-msg {
	margin-top: 8px;
	font-size: 13px;
	color: var(--sos-nc-error);
	font-weight: 500;
}

.sos-nc-search-counter {
	font-size: 13px;
	color: var(--sos-nc-text-secondary);
	text-align: center;
	margin-top: 8px;
}

/* =============================================
   Results Area
   ============================================= */

.sos-nc-results {
	margin-top: 24px;
}

/* =============================================
   Fade In Animation
   ============================================= */

@keyframes sos-nc-fadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.sos-nc-result-available,
.sos-nc-result-unavailable,
.sos-nc-result-error {
	animation: sos-nc-fadeIn 0.35s ease-out;
}

/* =============================================
   Result Icon Row
   ============================================= */

.sos-nc-result-icon-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.sos-nc-icon-check {
	color: var(--sos-nc-success);
	flex-shrink: 0;
}

.sos-nc-icon-x {
	color: var(--sos-nc-error);
	flex-shrink: 0;
}

.sos-nc-result-text {
	font-size: 20px;
	font-weight: 700;
}

.sos-nc-text-available {
	color: var(--sos-nc-success);
}

.sos-nc-text-unavailable {
	color: var(--sos-nc-error);
}

/* =============================================
   Available: Message
   ============================================= */

.sos-nc-available-msg {
	margin: 0 0 20px 0;
	font-size: 14px;
	color: var(--sos-nc-text-secondary);
}

/* =============================================
   Inactive Filings (inside unavailable state)
   ============================================= */

.sos-nc-inactive-filings-section {
	margin: 16px 0;
}

.sos-nc-inactive-msg {
	color: var(--sos-nc-text-secondary);
	font-size: 14px;
	margin: 0 0 16px 0;
}

.sos-nc-inactive-filings {
	background: #f9fafb;
	border: 1px solid var(--sos-nc-border);
	border-radius: var(--sos-nc-radius-sm);
	padding: 16px;
}

.sos-nc-filings-heading {
	font-size: 14px;
	font-weight: 600;
	color: var(--sos-nc-text);
	margin: 0 0 12px 0;
}

.sos-nc-filing-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid var(--sos-nc-border);
	font-size: 14px;
}

.sos-nc-filing-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.sos-nc-filing-name {
	font-weight: 500;
	color: var(--sos-nc-text);
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin-right: 12px;
}

.sos-nc-filing-status {
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 10px;
	font-weight: 500;
	white-space: nowrap;
	flex-shrink: 0;
}

.sos-nc-status-terminated {
	background: #FEE2E2;
	color: #991B1B;
}

.sos-nc-status-suspended {
	background: #FEF3C7;
	color: #92400E;
}

.sos-nc-status-dissolved {
	background: #FEE2E2;
	color: #991B1B;
}

.sos-nc-status-merged {
	background: #E5E7EB;
	color: #374151;
}

.sos-nc-status-inactive {
	background: #F3F4F6;
	color: #6B7280;
}

.sos-nc-status-withdrawn {
	background: #F3F4F6;
	color: #6B7280;
}

.sos-nc-status-default {
	background: #F3F4F6;
	color: #6B7280;
}

/* =============================================
   CTA Section
   ============================================= */

.sos-nc-cta {
	background: var(--sos-nc-success-bg);
	border: 1px solid #bbf7d0;
	border-radius: var(--sos-nc-radius-sm);
	padding: 20px;
}

.sos-nc-cta-heading {
	margin: 0 0 14px 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--sos-nc-text);
}

/* =============================================
   Entity Type Radio Options
   ============================================= */

.sos-nc-entity-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 18px;
}

.sos-nc-radio-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	color: var(--sos-nc-text);
	padding: 8px 12px;
	background: var(--sos-nc-bg);
	border: 1px solid var(--sos-nc-border);
	border-radius: var(--sos-nc-radius-sm);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sos-nc-radio-label:hover {
	border-color: var(--sos-nc-primary);
	background: #eff6ff;
}

.sos-nc-radio-label input[type="radio"] {
	accent-color: var(--sos-nc-primary);
	width: 16px;
	height: 16px;
	margin: 0;
	flex-shrink: 0;
}

.sos-nc-radio-label input[type="radio"]:checked+span {
	font-weight: 600;
}

/* =============================================
   CTA Button
   ============================================= */

.sos-nc-cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
	background: var(--sos-nc-primary);
	border: none;
	border-radius: var(--sos-nc-radius-sm);
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.1s ease;
	line-height: 1.4;
	justify-content: center;
	min-width: 200px;
	animation: double-ring 1.7s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}

.sos-nc-cta-btn:hover {
	background: var(--sos-nc-primary-hover);
	color: #ffffff;
	text-decoration: none;
}

.sos-nc-cta-btn:active {
	transform: scale(0.98);
}

@keyframes double-ring {
	0% {
		box-shadow: 0 0 0 0px rgba(26, 115, 232, 0.5), 0 0 0 0px rgba(26, 115, 232, 0.25);
	}

	100% {
		box-shadow: 0 0 0 14px rgba(26, 115, 232, 0), 0 0 0 28px rgba(26, 115, 232, 0);
	}
}

/* =============================================
   CTA Actions Row (button + partner logo)
   ============================================= */

.sos-nc-cta-actions {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
	justify-content: space-between;
}

/*.sos-nc-partner-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	border: 1.5px solid var(--sos-nc-border);
	border-radius: var(--sos-nc-radius-sm);
	padding: 8px 14px;
	height: 48px;
	box-shadow: var(--sos-nc-shadow);
}*/

.sos-nc-partner-logo img {
	display: block;
	max-height: 40px;
	width: auto;
	object-fit: contain;
}

/* =============================================
   Unavailable: Company Details Card
   ============================================= */

.sos-nc-details-card {
	background: #f9fafb;
	border: 1px solid var(--sos-nc-border);
	border-radius: var(--sos-nc-radius-sm);
	padding: 18px 20px;
	margin: 16px 0;
}

.sos-nc-details-heading {
	margin: 0 0 12px 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--sos-nc-text);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.sos-nc-details-list {
	margin: 0;
	padding: 0;
}

.sos-nc-detail-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 6px 0;
	border-bottom: 1px solid #f3f4f6;
	gap: 12px;
}

.sos-nc-detail-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.sos-nc-detail-row dt {
	font-size: 13px;
	color: var(--sos-nc-text-secondary);
	font-weight: 500;
	white-space: nowrap;
	flex-shrink: 0;
}

.sos-nc-detail-row dd {
	font-size: 13px;
	color: var(--sos-nc-text);
	font-weight: 600;
	margin: 0;
	text-align: right;
	word-break: break-word;
}

/* =============================================
   Try Different / Result Actions
   ============================================= */

.sos-nc-try-different {
	margin: 12px 0 0;
	font-size: 14px;
	color: var(--sos-nc-text-secondary);
}

.sos-nc-result-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
	gap: 12px;
}

.sos-nc-btn-secondary {
	display: inline-block;
	padding: 10px 20px;
	background-color: #ffffff;
	color: var(--sos-nc-primary);
	border: 1.5px solid var(--sos-nc-primary);
	border-radius: var(--sos-nc-radius-sm);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.sos-nc-btn-secondary:hover {
	background-color: var(--sos-nc-primary);
	color: #ffffff;
}

/* =============================================
   Error State
   ============================================= */

.sos-nc-result-error {
	background: var(--sos-nc-error-bg);
	border: 1px solid #fecaca;
	border-radius: var(--sos-nc-radius-sm);
	padding: 14px 18px;
}

.sos-nc-error-msg {
	margin: 0;
	font-size: 14px;
	color: var(--sos-nc-error);
	font-weight: 500;
}

.sos-nc-official-link {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #fecaca;
}

.sos-nc-official-link-anchor {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--sos-nc-primary);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.15s ease;
}

.sos-nc-official-link-anchor:hover {
	color: var(--sos-nc-primary-hover);
	text-decoration: underline;
}

.sos-nc-official-link-anchor::after {
	content: "\2192";
	font-size: 16px;
}

/* =============================================
   "View Full Details" Button (Unavailable)
   ============================================= */

.sos-nc-full-details-wrap {
	margin-top: 0;
}

.sos-nc-full-details-btn {
	display: inline-block;
	padding: 10px 20px;
	background-color: var(--sos-nc-primary);
	color: #ffffff;
	border-radius: var(--sos-nc-radius-sm);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	transition: background-color 0.15s ease;
}

.sos-nc-full-details-btn:hover {
	background-color: var(--sos-nc-primary-hover);
	color: #ffffff;
	text-decoration: none;
}

/* =============================================
   "File Annual Report" Button (Unavailable)
   ============================================= */

.sos-nc-annual-filing-wrap {
	margin-top: 0;
}

.sos-nc-annual-filing-btn {
	display: inline-block;
	padding: 10px 20px;
	background-color: var(--sos-nc-primary);
	color: #ffffff;
	border-radius: var(--sos-nc-radius-sm);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	transition: background-color 0.15s ease;
}

.sos-nc-annual-filing-btn:hover {
	background-color: var(--sos-nc-primary-hover);
	color: #ffffff;
	text-decoration: none;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 640px) {
	.sos-nc-card {
		padding: 24px 20px;
	}

	.sos-nc-heading {
		font-size: 19px;
	}

	.sos-nc-result-text {
		font-size: 18px;
	}

	.sos-nc-detail-row {
		flex-direction: column;
		gap: 2px;
	}

	.sos-nc-detail-row dd {
		text-align: left;
	}

	.sos-nc-filing-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.sos-nc-filing-name {
		margin-right: 0;
		white-space: normal;
	}

	.sos-nc-cta-actions {
		flex-direction: row;
	}

	.sos-nc-cta-btn {
		width: 100%;
		justify-content: center;
		min-width: auto;
	}
}

@media (max-width: 380px) {
	.sos-nc-card {
		padding: 20px 16px;
	}

	.sos-nc-heading {
		font-size: 17px;
	}

	.sos-nc-cta {
		padding: 16px;
	}

	.sos-nc-cta-btn {
		width: 100%;
		justify-content: center;
		min-width: auto;
	}

	.sos-nc-result-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.sos-nc-btn-secondary,
	.sos-nc-full-details-btn,
	.sos-nc-annual-filing-btn {
		width: 100%;
		text-align: center;
	}
}