/**
 * OPCO Finder block styles.
 *
 * @package acf-gutenberg-blocs-json
 * @since   1.5.0
 */

.opco-finder-container {
	font-family: var(--wp--preset--font-family--poppins);
	background: var(--wp--preset--color--base-2);
	color: var(--wp--preset--color--main);
	font-size: var(--wp--preset--font-size--normal);
	padding: 20px;
	border-radius: 20px;
}

/* Cards */
.opco-finder-card,
.opco-finder-results {
	background: var(--wp--preset--color--base);
	border-radius: 20px;
	padding: 40px;
	margin-bottom: 30px;
}

/* Tabs */
.opco-finder-tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 30px;
	border-bottom: 2px solid var(--wp--preset--color--base-2);
}

.opco-finder-tab {
	padding: 12px 24px;
	background: none;
	border: none;
	color: #666;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	border-bottom: 3px solid transparent;
	font-family: var(--wp--preset--font-family--poppins);
	font-size: var(--wp--preset--font-size--normal);
}

.opco-finder-tab.active {
	color: var(--wp--preset--color--main);
	border-bottom-color: var(--wp--preset--color--main);
}

.opco-finder-tab-content {
	display: none;
}

.opco-finder-tab-content.active {
	display: block;
}

/* Input Groups */
.opco-finder-input-group {
	margin-bottom: 25px;
}

.opco-finder-container label {
	display: block;
	color: var(--wp--preset--color--main);
	font-weight: 600;
	margin-bottom: 10px;
	font-size: var(--wp--preset--font-size--normal);
}

.opco-finder-container input[type="text"] {
	width: 100%;
	padding: 15px 20px;
	border: 2px solid var(--wp--preset--color--base-3);
	border-radius: 12px;
	font-size: var(--wp--preset--font-size--normal);
	font-family: var(--wp--preset--font-family--poppins);
	transition: all 0.3s ease;
	color: var(--wp--preset--color--main);
}

.opco-finder-container input[type="text"]:focus {
	outline: none;
	border-color: var(--wp--preset--color--main);
}

/* Button */
.opco-finder-btn {
	background: var(--wp--preset--color--main);
	color: var(--wp--preset--color--base);
	border: none;
	padding: 15px 40px;
	font-size: var(--wp--preset--font-size--normal);
	font-weight: 600;
	border-radius: 12px;
	cursor: pointer;
	width: 100%;
	transition: all 0.3s ease;
	font-family: var(--wp--preset--font-family--poppins);
}

.opco-finder-btn:hover {
	transform: translateY(-2px);
	opacity: 0.9;
}

.opco-finder-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Loading */
.opco-finder-loading {
	text-align: center;
	padding: 20px;
	color: var(--wp--preset--color--main);
	display: none;
}

.opco-finder-spinner {
	border: 3px solid var(--wp--preset--color--base-2);
	border-top: 3px solid var(--wp--preset--color--main);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: opco-spinner-spin 1s linear infinite;
	margin: 0 auto 15px;
}

@keyframes opco-spinner-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Results */
.opco-finder-results {
	display: none;
	margin-top: 30px;
}

.opco-result-header {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid var(--wp--preset--color--base-2);
}

.opco-success-icon {
	width: 50px;
	height: 50px;
	background: var(--wp--preset--color--main);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--base);
	font-size: 24px;
	flex-shrink: 0;
}

.opco-warning-icon {
	background: var(--wp--preset--color--primary);
}

.opco-result-title {
	color: var(--wp--preset--color--main);
	font-size: 24px;
	font-weight: 700;
}

/* Info Grid */
.opco-info-grid {
	display: grid;
	gap: 20px;
	margin-bottom: 30px;
}

.opco-info-item {
	background: var(--wp--preset--color--base-2);
	padding: 20px;
	border-radius: 12px;
	border-left: 4px solid var(--wp--preset--color--main);
}

.opco-info-label {
	color: #666;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 5px;
}

.opco-info-value {
	color: var(--wp--preset--color--main);
	font-size: var(--wp--preset--font-size--normal);
	font-weight: 600;
}

/* OPCO Card */
.opco-card {
	background: var(--wp--preset--color--main);
	color: var(--wp--preset--color--base);
	padding: 30px;
	border-radius: 15px;
	margin-top: 20px;
}

.opco-card.probable {
	background: var(--wp--preset--color--primary);
}

.opco-card a {
	display: inline-block;
	color: var(--wp--preset--color--base);
	text-decoration: underline;
	transition: opacity 0.3s;
}

.opco-card a:hover {
	opacity: 0.8;
}

.opco-label {
	font-size: var(--wp--preset--font-size--normal);
	opacity: 0.9;
	margin-bottom: 8px;
}

.opco-name {
	font-size: 28px;
	font-weight: 700;
	margin-bottom: 10px;
}

.opco-description {
	font-size: var(--wp--preset--font-size--normal);
	line-height: 1.6;
	opacity: 0.95;
}

/* Warning Box */
.opco-warning-box {
	background: #FFF8E1;
	border-left: 4px solid var(--wp--preset--color--primary);
	padding: 20px;
	border-radius: 12px;
	margin-top: 20px;
}

.opco-warning-box p {
	color: #F57C00;
	margin-bottom: 10px;
	font-size: var(--wp--preset--font-size--normal);
	line-height: 1.6;
}

.opco-warning-box a {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	text-decoration: underline;
}

/* Error */
.opco-finder-error {
	display: none;
	background: #ffebee;
	color: #c62828;
	padding: 20px;
	border-radius: 12px;
	margin-top: 20px;
	border-left: 4px solid #c62828;
}

/* CTA Section */
.opco-cta-section {
	text-align: center;
	margin-top: 30px;
	padding-top: 30px;
	border-top: 2px solid var(--wp--preset--color--base-2);
}

.opco-cta-text {
	color: #666;
	margin-bottom: 15px;
}

.opco-cta-link {
	display: inline-block;
	color: var(--wp--preset--color--main);
	text-decoration: none;
	font-weight: 600;
	padding: 12px 30px;
	border: 2px solid var(--wp--preset--color--main);
	border-radius: 10px;
	transition: all 0.3s ease;
	font-size: var(--wp--preset--font-size--normal);
}

.opco-cta-link:hover {
	background: var(--wp--preset--color--main);
	color: var(--wp--preset--color--base);
	transform: translateY(-2px);
}

/* Help Text */
.opco-finder-help-text {
	text-align: center;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--wp--preset--color--base-3);
	color: #666;
	font-size: var(--wp--preset--font-size--normal);
}

.opco-finder-help-text a {
	color: var(--wp--preset--color--main);
	text-decoration: none;
	font-weight: 500;
}

/* Manual Description */
.opco-finder-manual-desc {
	color: #666;
	margin-bottom: 20px;
	font-size: var(--wp--preset--font-size--normal);
	line-height: 1.6;
}

.opco-finder-manual-desc a {
	color: var(--wp--preset--color--main);
	font-weight: 600;
}

/* Suggestions */
.opco-finder-input-wrapper {
	position: relative;
}

.opco-finder-suggestions {
	background: var(--wp--preset--color--base);
	border: 2px solid var(--wp--preset--color--base-3);
	border-radius: 12px;
	margin-top: 10px;
	max-height: 300px;
	overflow-y: auto;
	display: none;
	position: absolute;
	width: 100%;
	z-index: 1000;
	left: 0;
	top: 100%;
}

.opco-suggestion-item {
	padding: 15px 20px;
	cursor: pointer;
	transition: background 0.2s;
	border-bottom: 1px solid var(--wp--preset--color--base-2);
}

.opco-suggestion-item:last-child {
	border-bottom: none;
}

.opco-suggestion-item:hover {
	background: var(--wp--preset--color--base-2);
}

.opco-suggestion-name {
	color: var(--wp--preset--color--main);
	font-weight: 600;
	margin-bottom: 3px;
	font-size: var(--wp--preset--font-size--normal);
}

.opco-suggestion-details {
	color: #666;
	font-size: var(--wp--preset--font-size--small);
}

/* Footer */
.opco-finder-footer {
	text-align: center;
	margin-top: 50px;
	padding: 20px;
	color: #666;
	font-size: var(--wp--preset--font-size--normal);
}

.opco-finder-footer a {
	color: var(--wp--preset--color--main);
	text-decoration: none;
	font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
	.opco-finder-card,
	.opco-finder-results {
		padding: 25px;
	}

	.opco-result-title {
		font-size: 20px;
	}

	.opco-name {
		font-size: 22px;
	}

	.opco-finder-tabs {
		flex-direction: column;
	}

	.opco-finder-tab {
		border-bottom: none;
		border-left: 3px solid transparent;
	}

	.opco-finder-tab.active {
		border-bottom: none;
		border-left-color: var(--wp--preset--color--main);
	}
}
