/**
 * NoIndexer admin styles.
 *
 * Styles for settings page (with sidebar), list table column,
 * saved flash indicators, and promotional banner.
 */

/* ==========================================================================
   CSS custom properties
   ========================================================================== */

:root {
	--noindexer-brand: #d63638;
}

/* ==========================================================================
   Settings page - General layout
   ========================================================================== */

.noindexer-admin-wrap {
	max-width: 1200px;
}

.noindexer-title-icon {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: var(--noindexer-brand);
	vertical-align: middle;
	margin-right: 5px;
}

.noindexer-description {
	color: #50575e;
	font-size: 14px;
	margin-bottom: 20px;
}

/* ==========================================================================
   Settings page - Two-column layout (main + sidebar)
   ========================================================================== */

.noindexer-content {
	display: flex;
	gap: 20px;
	margin-top: 20px;
}

.noindexer-main {
	flex: 1;
	min-width: 0;
}

.noindexer-sidebar {
	width: 280px;
	flex-shrink: 0;
}

@media screen and (max-width: 960px) {
	.noindexer-content {
		flex-direction: column;
	}

	.noindexer-sidebar {
		width: 100%;
	}
}

/* ==========================================================================
   Settings page - Sections
   ========================================================================== */

.noindexer-section {
	background: #fff;
	border: 1px solid #c3c4c7;
	padding: 20px 25px;
	margin-bottom: 20px;
}

.noindexer-section h2 {
	margin: 0 0 5px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.noindexer-section-desc {
	margin: 0 0 15px;
	color: #50575e;
	font-size: 13px;
}

/* Subsection within a section (exclusions inside post types / taxonomies) */
.noindexer-subsection {
	border-top: 1px solid #dcdcde;
	margin-top: 10px;
	padding-top: 20px;
}

.noindexer-subsection h3 {
	margin: 0 0 5px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

/* Saved flash notification (appears on AJAX add/remove) */
.noindexer-saved-flash {
	display: inline-block;
	color: #00a32a;
	font-size: 12px;
	font-weight: 500;
	margin-left: 8px;
	opacity: 1;
	transition: opacity 0.5s ease;
}

.noindexer-saved-flash.fade-out {
	opacity: 0;
}

/* ==========================================================================
   Settings page - Directive tables (post types and taxonomies)
   ========================================================================== */

.noindexer-directive-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 15px;
}

.noindexer-directive-table thead th {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #50575e;
	text-align: left;
	padding: 6px 10px;
	border-bottom: 1px solid #dcdcde;
}

.noindexer-directive-table tbody td {
	padding: 8px 10px;
	font-size: 13px;
	border-bottom: 1px solid #f0f0f1;
}

.noindexer-directive-table tbody tr:last-child td {
	border-bottom: none;
}

.noindexer-directive-name {
	width: auto;
}

.noindexer-directive-cell {
	width: 90px;
	text-align: center;
}

.noindexer-directive-table tbody td.noindexer-directive-cell label {
	display: inline-flex;
	cursor: pointer;
	padding: 4px;
}

/* Slug label for both post types and taxonomies */
.noindexer-slug,
.noindexer-post-type-slug {
	color: #8c8f94;
	font-size: 12px;
}

/* ==========================================================================
   Settings page - Toggle rows (feeds + additional rules)
   ========================================================================== */

.noindexer-toggles {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.noindexer-toggle-row {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f1;
}

.noindexer-toggle-row:last-child {
	border-bottom: none;
}

.noindexer-toggle-info {
	flex: 1;
	min-width: 0;
}

.noindexer-toggle-info strong {
	display: block;
	color: #1d2327;
	font-size: 13px;
	margin-bottom: 2px;
}

.noindexer-toggle-info span {
	font-size: 13px;
	color: #50575e;
	line-height: 1.5;
}

.noindexer-toggle-checks {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex-shrink: 0;
	min-width: 110px;
}

.noindexer-toggle-checks label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #1d2327;
	cursor: pointer;
}

@media screen and (max-width: 600px) {
	.noindexer-toggle-row {
		flex-direction: column;
		gap: 8px;
	}

	.noindexer-toggle-checks {
		flex-direction: row;
		gap: 16px;
		min-width: 0;
	}
}

/* ==========================================================================
   Settings page - Search sections (exclusions & individual noindex)
   ========================================================================== */

.noindexer-search-wrap {
	position: relative;
	max-width: 400px;
	margin-bottom: 15px;
}

.noindexer-search-input {
	width: 100%;
	padding: 8px 12px;
	font-size: 13px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
}

.noindexer-search-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* Search results dropdown */
.noindexer-search-results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 100;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-top: none;
	border-radius: 0 0 4px 4px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	display: none;
	max-height: 250px;
	overflow-y: auto;
}

.noindexer-search-results.active {
	display: block;
}

.noindexer-search-result {
	padding: 8px 12px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.noindexer-search-result:last-child {
	border-bottom: none;
}

.noindexer-search-result:hover {
	background: #f0f6fc;
}

.noindexer-search-result-title {
	font-weight: 500;
	color: #1d2327;
}

.noindexer-search-result-type {
	color: #8c8f94;
	font-size: 12px;
	margin-left: 10px;
	flex-shrink: 0;
}

.noindexer-search-message {
	padding: 10px 12px;
	color: #8c8f94;
	font-size: 13px;
	font-style: italic;
}

/* Items list */
.noindexer-items-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.noindexer-empty-message {
	color: #8c8f94;
	font-size: 13px;
	font-style: italic;
	margin: 0;
}

.noindexer-item-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	padding: 4px 8px 4px 10px;
	font-size: 13px;
	color: #1d2327;
}

.noindexer-item-tag-type {
	color: #8c8f94;
	font-size: 11px;
}

.noindexer-item-remove {
	background: none;
	border: none;
	color: #b32d2e;
	cursor: pointer;
	padding: 0 2px;
	font-size: 16px;
	line-height: 1;
	opacity: 0.6;
}

.noindexer-item-remove:hover {
	opacity: 1;
}

/* ==========================================================================
   Settings page - Info section (other noindex options)
   ========================================================================== */

.noindexer-info-section {
	background: #f6f7f7;
}

.noindexer-info-list {
	margin: 0;
	padding-left: 0;
	list-style: none;
}

.noindexer-info-list li {
	font-size: 13px;
	color: #50575e;
	line-height: 1.6;
	margin-bottom: 4px;
	padding-left: 16px;
	position: relative;
}

.noindexer-info-list li::before {
	content: "\2013";
	position: absolute;
	left: 0;
	color: #8c8f94;
}

/* ==========================================================================
   List table - robots column (index/follow status with two icons)
   ========================================================================== */

.wp-list-table th.column-robots,
.wp-list-table td.column-robots {
	width: 70px;
	text-align: center;
	white-space: nowrap;
}

.column-robots .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	line-height: 1;
	vertical-align: middle;
	margin: 0 1px;
}

.noindexer-status-noindex,
.noindexer-status-nofollow {
	color: var(--noindexer-brand);
}

.noindexer-status-indexed,
.noindexer-status-followed {
	color: #00a32a;
}

/* ==========================================================================
   Promotional widgets - Sidebar layout (vertical)
   ========================================================================== */

.noindexer-sidebar-widget {
	background: #fff;
	border: 1px solid #c3c4c7;
	padding: 15px;
	margin-bottom: 20px;
}

.noindexer-sidebar-widget h3 {
	margin-top: 0;
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
	font-size: 13px;
	font-weight: 600;
}

.noindexer-sidebar-widget p {
	margin: 0 0 15px;
	color: #50575e;
	font-size: 13px;
	line-height: 1.5;
}

.noindexer-promo-widget > .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: var(--noindexer-brand);
	margin-bottom: 10px;
}

.noindexer-promo-widget .button {
	margin-top: 5px;
	width: 100%;
	text-align: center;
}

/* ==========================================================================
   Promotional notice - Horizontal layout (kept for reuse in other plugins)
   ========================================================================== */

.noindexer-promo-notice {
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	padding: 20px;
	margin-top: 10px;
}

.noindexer-promo-notice > h4 {
	margin: 0 0 20px;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.noindexer-promo-columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 25px;
}

.noindexer-promo-column {
	background: #fff;
	border: 1px solid #dcdcde;
	padding: 20px;
	display: flex;
	flex-direction: column;
}

.noindexer-promo-column > .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: var(--noindexer-brand);
	margin-bottom: 12px;
}

.noindexer-promo-column h5 {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.4;
}

.noindexer-promo-column p {
	margin: 0 0 15px;
	color: #50575e;
	font-size: 13px;
	line-height: 1.5;
	flex-grow: 1;
}

.noindexer-promo-column .button {
	align-self: flex-start;
	white-space: normal;
	height: auto;
	line-height: 1.4;
	padding: 6px 12px;
}

@media screen and (max-width: 1200px) {
	.noindexer-promo-columns {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 782px) {
	.noindexer-promo-columns {
		grid-template-columns: 1fr;
	}
}