/**
 * Native Content Relationships Settings
 * Modern WordPress-compatible styling
 */

/* Main container */
.naticore-settings-container {
	max-width: 900px;
	margin: 0;
}

.naticore-tab-content {
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
	margin-top: 12px;
	box-shadow: none;
}

.naticore-placeholder {
	text-align: center;
	padding: 40px 20px;
	color: #50575e;
}

.naticore-placeholder h3 {
	margin: 0 0 10px 0;
	font-size: 1.2em;
	color: #1d2327;
}

.naticore-placeholder p {
	margin: 0;
	font-size: 14px;
}

/* Tabs */
.wrap .nav-tab-wrapper {
	margin-bottom: 12px;
	border-bottom: 1px solid #c3c4c7;
}

.wrap .nav-tab {
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-bottom: none;
	margin-right: 4px;
	padding: 8px 16px 10px;
	font-size: 14px;
	line-height: 1.4;
}

.wrap .nav-tab:hover {
	background-color: #fff;
	border-color: #c3c4c7;
	color: #2c2e2d;
}

.wrap .nav-tab.nav-tab-active {
	background: #fff;
	border-bottom: 1px solid #fff;
	color: #2c2e2d;
	font-weight: 600;
}

/* Get started / onboarding */
.naticore-get-started {
	max-width: 640px;
}
.naticore-get-started-intro {
	font-size: 15px;
	margin-bottom: 20px;
	color: #1d2327;
}
.naticore-get-started-checklist {
	list-style: none;
	margin: 0 0 24px 0;
	padding: 0;
}
.naticore-checklist-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 20px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}
.naticore-checklist-item.naticore-done {
	border-color: #00a32a;
	background: #f0f6f1;
}
.naticore-checklist-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	min-width: 28px;
	border-radius: 50%;
	background: #f0f0f1;
	color: #2c3338;
	font-weight: 600;
	font-size: 14px;
}
.naticore-checklist-item.naticore-done .naticore-checklist-icon {
	background: #00a32a;
	color: #fff;
}
.naticore-checklist-item div {
	flex: 1;
}
.naticore-checklist-item .description {
	margin: 6px 0 0 0;
	font-size: 13px;
	color: #50575e;
}
.naticore-get-started-dismiss {
	margin-top: 16px;
}

/* Cards */
.naticore-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 12px;
	margin: 0;
	box-shadow: none;
}

.naticore-card h3 {
	margin: 0 0 8px 0;
	font-size: 1.1em;
	font-weight: 600;
	color: #1d2327;
}

.naticore-card p {
	margin: 6px 0;
	font-size: 13px;
	line-height: 1.5;
	color: #50575e;
}

.naticore-card p.description {
	margin-top: 8px;
	font-style: normal;
	color: #646970;
}

/* Wide tables (Relationship Types tab) */
.naticore-widefat-wrap {
	overflow-x: auto;
	max-width: 100%;
	margin-top: 8px;
}

.naticore-widefat-wrap table.widefat {
	min-width: 700px;
}

.naticore-widefat-wrap table.widefat th,
.naticore-widefat-wrap table.widefat td {
	vertical-align: top;
	white-space: nowrap;
}

.naticore-widefat-wrap table.widefat td:last-child,
.naticore-widefat-wrap table.widefat th:last-child {
	white-space: normal;
}

.naticore-widefat-wrap code {
	white-space: nowrap;
}

/* Checkbox Grid */
.naticore-checkbox-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(140px, 1fr));
	gap: 6px 12px;
	margin: 8px 0 0;
}

.naticore-checkbox-item {
	display: flex;
	align-items: center;
	padding: 6px 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	transition: all 0.2s ease;
}

.naticore-checkbox-item:hover,
.naticore-checkbox-item.hover {
	background: #e7f3ff;
	border-color: #0073aa;
	transform: none;
	box-shadow: none;
}

.naticore-checkbox-item input[type="checkbox"] {
	margin-right: 8px;
}

.naticore-checkbox-label {
	font-size: 13px;
	font-weight: 500;
}

/* Radio Cards */
.naticore-radio-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(220px, 1fr));
	gap: 10px;
	margin: 8px 0 0;
}

.naticore-radio-card {
	border: 2px solid #c3c4c7;
	border-radius: 6px;
	padding: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fff;
	position: relative;
}

.naticore-radio-card:hover {
	border-color: #0073aa;
	background: #f0f6fc;
	transform: none;
	box-shadow: none;
}

.naticore-radio-card.selected {
	border-color: #0073aa;
	background: #e7f3ff;
	box-shadow: none;
}

.naticore-radio-card input[type="radio"] {
	position: absolute;
	opacity: 0;
}

.naticore-radio-card-content h4 {
	margin: 0 0 8px 0;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.naticore-radio-card-content p {
	margin: 0;
	font-size: 12px;
	color: #50575e;
}

/* Radio Buttons */
.naticore-radio-buttons label {
	display: block;
	margin: 10px 0;
	font-size: 13px;
}

.naticore-radio-buttons input[type="radio"] {
	margin-right: 8px;
}

/* Field styling */
.naticore-field-suffix {
	margin-left: 8px;
	font-size: 12px;
	color: #646970;
}

/* Environment Badge */
.naticore-env-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
	padding: 8px 12px;
	background: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #ddd;
}

.naticore-env-label {
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
}

.naticore-env-status {
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
}

.naticore-env-status.production {
	background: #00a32a;
	color: white;
}

.naticore-env-status.staging {
	background: #dba617;
	color: #1d2327;
}

.naticore-env-status.development,
.naticore-env-status.local {
	background: #d63638;
	color: white;
}

/* Toggle Switches */
.naticore-toggles {
	margin: 15px 0;
}

.naticore-toggle {
	display: flex;
	align-items: center;
	margin: 15px 0;
	padding: 10px;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.naticore-toggle:hover,
.naticore-toggle.hover {
	background: #f9f9f9;
}

.naticore-toggle input[type="checkbox"] {
	display: none;
}

.naticore-toggle-slider {
	position: relative;
	width: 44px;
	height: 24px;
	background: #c3c4c7;
	border-radius: 12px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	margin-right: 12px;
}

.naticore-toggle-slider:before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: white;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.naticore-toggle input[type="checkbox"]:checked+.naticore-toggle-slider {
	background: #0073aa;
}

.naticore-toggle input[type="checkbox"]:checked+.naticore-toggle-slider:before {
	transform: translateX(20px);
}

.naticore-toggle-label {
	font-size: 13px;
	font-weight: 500;
	color: #1d2327;
}

/* Notice */
.naticore-notice {
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #0073aa;
	padding: 12px;
	margin-top: 20px;
	border-radius: 0 4px 4px 0;
}

.naticore-notice p {
	margin: 0;
	font-size: 12px;
	color: #50575e;
}

/* Responsive */
@media screen and (max-width: 768px) {
	.naticore-checkbox-grid {
		grid-template-columns: repeat(2, minmax(140px, 1fr));
	}

	.naticore-radio-cards {
		grid-template-columns: 1fr;
	}

	.wrap .nav-tab {
		padding: 6px 12px 8px;
		font-size: 13px;
	}
}


/* Switch Toggle in Tables */
.naticore-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 20px;
}

.naticore-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.naticore-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #c3c4c7;
	transition: .4s;
}

.naticore-slider:before {
	position: absolute;
	content: "";
	height: 14px;
	width: 14px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: .4s;
}

input:checked+.naticore-slider {
	background-color: #0085ba;
}

input:focus+.naticore-slider {
	box-shadow: 0 0 1px #0085ba;
}

input:checked+.naticore-slider:before {
	transform: translateX(20px);
}

.naticore-slider.round {
	border-radius: 20px;
}

.naticore-slider.round:before {
	border-radius: 50%;
}

/* Badges */
.naticore-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 500;
	background: #f0f0f1;
	color: #50575e;
	border: 1px solid #c3c4c7;
	margin-right: 4px;
	text-transform: uppercase;
}

.naticore-badge.green {
	background: #e5f5fa;
	border-color: #0085ba;
	color: #0085ba;
}

.naticore-badge.blue {
	background: #edeffc;
	border-color: #2271b1;
	color: #2271b1;
}

/* Custom Types Table */
#naticore-custom-types-table input[type="text"] {
	width: 100%;
}

.naticore-actions-bar {
	margin-top: 15px;
	display: flex;
	justify-content: flex-end;
}

.naticore-remove-custom-type {
	color: #d63638 !important;
	border-color: #d63638 !important;
}

.naticore-remove-custom-type:hover {
	background: #d63638 !important;
	color: #fff !important;
}

/* Hide all row headers generated by Settings API (we render our own headings inside cards) */
.naticore-settings-container .form-table th,
.wrap.naticore-settings-container .form-table th,
.naticore-settings-container .form-table th[scope="row"] {
	display: none !important;
}

/* Ensure the data columns take full width since headers are hidden */
.naticore-settings-container .form-table td,
.wrap.naticore-settings-container .form-table td {
	padding-left: 0 !important;
	width: 100% !important;
}

/* Overview Page Styles */
.naticore-overview-container {
	margin-top: 20px;
}

.naticore-overview-header {
	margin-bottom: 20px;
}

.naticore-empty-state {
	text-align: center;
	padding: 60px 20px !important;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	max-width: 600px;
	margin: 40px auto;
}

.naticore-empty-state .dashicons {
	font-size: 64px;
	width: 64px;
	height: 64px;
	color: #c3c4c7;
	margin-bottom: 20px;
}

.naticore-empty-state h2 {
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 600;
}

.naticore-empty-state p {
	font-size: 16px;
	color: #646970;
	margin-bottom: 30px;
}

.naticore-empty-state-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
}