/**
 * Admin Styles
 * Mobile Bottom Navigation Settings
 */

.arewa-mbn-admin {
	max-width: 1200px;
}

/* Admin page styles */
.arewa-mbn-admin {
	margin-top: 20px;
}

/* Button Items */
#arewa-mbn-buttons-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.arewa-mbn-button-item {
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	overflow: hidden;
}

.arewa-mbn-button-item.ui-sortable-helper {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.button-handle {
	background: #f5f5f5;
	padding: 12px 15px;
	cursor: move;
	border-bottom: 1px solid #ddd;
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}

.button-handle .dashicons {
	color: #666;
}

.button-handle:hover {
	background: #eee;
}

.button-content {
	padding: 20px;
}

.button-content .form-table {
	margin-top: 0;
}

.button-content .form-table th {
	width: 150px;
	padding: 15px 10px 15px 0;
}

.button-content .form-table td {
	padding: 15px 0;
}

/* Color Picker (Iris - used in Styling and Submenus tabs) */
.color-picker {
	width: 100px;
}

/* Native color inputs (Buttons tab - avoids Iris cross-talk) */
.arewa-mbn-native-color {
	width: 44px;
	height: 28px;
	padding: 2px;
	vertical-align: middle;
	cursor: pointer;
}
.arewa-mbn-bg-color-value {
	width: 90px;
	margin-right: 6px;
}
.arewa-mbn-bg-color-picker {
	width: 44px;
	height: 28px;
	padding: 2px;
	vertical-align: middle;
	margin-right: 6px;
	cursor: pointer;
}
.arewa-mbn-bg-transparent {
	vertical-align: middle;
}

/* WordPress Color Picker Container */
.wp-picker-container {
	display: inline-block;
	vertical-align: top;
}

.wp-picker-container .wp-color-result {
	display: inline-block;
	vertical-align: top;
	margin-right: 5px;
}

/* Hide hex input and Default button until user opens the color picker */
.wp-picker-container .wp-picker-input-wrap {
	display: none;
	vertical-align: top;
}

.wp-picker-container.wp-picker-active .wp-picker-input-wrap {
	display: inline-block;
}

.wp-picker-container .wp-picker-input-wrap input[type="text"] {
	width: 100px;
	vertical-align: top;
}

.wp-picker-container .wp-picker-holder {
	position: absolute;
	z-index: 100;
}

/* Ensure color picker is visible */
.wp-picker-active .wp-picker-holder {
	display: block;
}

/* Color picker button styling */
.wp-color-result {
	height: 30px;
	width: 30px;
	border: 1px solid #ddd;
	border-radius: 3px;
	cursor: pointer;
	display: inline-block;
	vertical-align: middle;
}

.wp-color-result:hover,
.wp-color-result:focus {
	border-color: #999;
	outline: none;
}

.wp-color-result-text {
	display: none;
}

/* Fix for color picker in table cells */
.form-table td .wp-picker-container {
	margin: 0;
}

.form-table td .color-picker {
	max-width: 100px;
}

/* Submenu Sections */
.arewa-mbn-submenu-section {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 20px;
	background: #fff;
}

.arewa-mbn-submenu-section h3 {
	margin-top: 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

.submenu-items-container {
	margin-top: 15px;
}

.submenu-item {
	border: 1px solid #eee;
	border-radius: 4px;
	padding: 15px;
	margin-bottom: 15px;
	background: #fafafa;
	position: relative;
}

.submenu-item .form-table {
	margin-top: 0;
}

.submenu-item .form-table th {
	width: 120px;
	padding: 10px 10px 10px 0;
}

.submenu-item .form-table td {
	padding: 10px 0;
}

.remove-submenu-item {
	margin-top: 10px;
	color: #dc3232;
}

.remove-submenu-item:hover {
	background: #dc3232;
	color: #fff;
	border-color: #dc3232;
}

.add-submenu-item {
	margin-top: 10px;
}

/* Visibility Rows */
.visibility-pages-row,
.visibility-posts-row,
.visibility-categories-row,
.visibility-post-types-row {
	display: none;
}

.visibility-pages-row.active,
.visibility-posts-row.active,
.visibility-categories-row.active,
.visibility-post-types-row.active {
	display: table-row;
}

/* Responsive Admin */
@media (max-width: 782px) {
	.button-content .form-table th,
	.submenu-item .form-table th {
		width: 100%;
		display: block;
		padding-bottom: 5px;
	}

	.button-content .form-table td,
	.submenu-item .form-table td {
		display: block;
		padding-top: 5px;
	}
}

/* Sortable Helper */
.ui-sortable-placeholder {
	border: 2px dashed #0073aa;
	background: #f0f8ff;
	visibility: visible !important;
	height: 100px !important;
	margin-bottom: 20px;
}

/* Horizontal Tabs */
.arewa-mbn-tabs-wrapper {
	margin: 20px 0 0 0;
	border-bottom: 1px solid #ccc;
	background: #fff;
	padding: 0;
}

.arewa-mbn-tabs-wrapper .nav-tab {
	margin: 0;
	border: 1px solid #ccc;
	border-bottom: none;
	background: #f0f0f1;
	color: #50575e;
	text-decoration: none;
	padding: 10px 15px;
	font-size: 14px;
	line-height: 1.71428571;
	font-weight: 600;
	display: inline-block;
	margin-right: 0;
	margin-left: 0;
	border-right: none;
	position: relative;
	top: 0;
}

.arewa-mbn-tabs-wrapper .nav-tab:first-child {
	border-left: 1px solid #ccc;
}

.arewa-mbn-tabs-wrapper .nav-tab:last-child {
	border-right: 1px solid #ccc;
}

.arewa-mbn-tabs-wrapper .nav-tab:hover {
	background: #f6f7f7;
	color: #2271b1;
}

.arewa-mbn-tabs-wrapper .nav-tab.nav-tab-active {
	background: #fff;
	border-bottom: 1px solid #fff;
	color: #1d2327;
	margin-bottom: -1px;
	padding-bottom: 11px;
}

.arewa-mbn-tab-content {
	background: #fff;
	border: 1px solid #ccc;
	border-top: none;
	padding: 0;
	margin-top: -1px;
}

.arewa-mbn-tab-panel {
	padding: 20px;
}

/* Enable/Disable Select Styles */
.arewa-mbn-enable-disable-select {
	cursor: pointer !important;
	min-width: 120px;
}

.arewa-mbn-enable-disable-select:hover {
	border-color: #2271b1;
}

.arewa-mbn-enable-disable-select:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* Documentation Button */
.arewa-mbn-docs-button {
	background: #2271b1 !important;
	color: #fff !important;
	border-color: #2271b1 !important;
	margin-left: 10px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.arewa-mbn-docs-button:hover {
	background: #135e96 !important;
	border-color: #135e96 !important;
	color: #fff !important;
}

.arewa-mbn-docs-button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1;
}

/* Multi-Select Container Styles */
.arewa-mbn-multi-select-container {
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	max-height: 500px;
	display: flex;
	flex-direction: column;
}

.arewa-mbn-multi-select-header {
	padding: 15px;
	border-bottom: 1px solid #eee;
	background: #f9f9f9;
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.arewa-mbn-search-input {
	flex: 1;
	min-width: 200px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

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

.arewa-mbn-select-actions {
	display: flex;
	gap: 8px;
}

.arewa-mbn-checkbox-container {
	padding: 15px;
	max-height: 400px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 10px;
}

.arewa-mbn-checkbox-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #fafafa;
	cursor: pointer;
	transition: all 0.2s ease;
	user-select: none;
}

.arewa-mbn-checkbox-item:hover {
	background: #f0f0f0;
	border-color: #2271b1;
}

.arewa-mbn-checkbox-item input[type="checkbox"] {
	margin: 0;
	cursor: pointer;
	width: 18px;
	height: 18px;
}

.arewa-mbn-checkbox-item input[type="checkbox"]:checked + span {
	font-weight: 600;
	color: #2271b1;
}

.arewa-mbn-checkbox-item.arewa-mbn-hidden {
	display: none;
}

.arewa-mbn-checkbox-item span {
	flex: 1;
	font-size: 14px;
	line-height: 1.4;
}

/* Display Mode Container */
.arewa-mbn-display-mode-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fafafa;
}

.arewa-mbn-display-mode-container .arewa-mbn-checkbox-item {
	margin: 0;
}

@media (max-width: 782px) {
	.arewa-mbn-checkbox-container {
		grid-template-columns: 1fr;
	}

	.arewa-mbn-multi-select-header {
		flex-direction: column;
		align-items: stretch;
	}

	.arewa-mbn-select-actions {
		width: 100%;
		justify-content: space-between;
	}

	.arewa-mbn-select-actions .button {
		flex: 1;
	}
}
/* User-Agent Settings */
.user-agent-settings-row {
	transition: opacity 0.3s ease;
}

.user-agent-settings-row.hidden {
	opacity: 0.5;
}

#arewa_mbn_user_agent_list {
	font-family: monospace;
	resize: vertical;
}

.user-agent-examples {
	background: #f9f9f9;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: 10px;
	margin-top: 10px;
}

.user-agent-examples code {
	background: #fff;
	padding: 2px 4px;
	border-radius: 2px;
	font-size: 12px;
}

/* WebView Section Styling */
.arewa-mbn-tab-panel h2 {
	border-bottom: 1px solid #ddd;
	padding-bottom: 10px;
	margin-bottom: 20px;
	color: #23282d;
}

.arewa-mbn-tab-panel h2:not(:first-child) {
	margin-top: 40px;
}

/* Enhanced form styling for User-Agent section */
.user-agent-mode-description {
	background: #f0f6fc;
	border: 1px solid #c3d9ff;
	border-radius: 4px;
	padding: 12px;
	margin-top: 8px;
}

.user-agent-mode-description strong {
	color: #0073aa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	#arewa_mbn_user_agent_list {
		width: 100%;
		min-height: 120px;
	}

	.user-agent-examples {
		font-size: 13px;
	}
}
