/*
Self Host Plugin

Author: Gareth Hadfield
Author URI: https://opdiv.com/self-host-plugin

License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

body {
	margin: 0px;
}

.shp_plugin_label {
	text-transform: capitalize;
}

label.shp_plugin_meta,
label.shp_license_meta {
	text-transform: capitalize;
}

input.shp_plugin_meta,
input.shp_license_meta,
textarea.shp_plugin_meta,
input.shp_plugin_meta {
	width: 100%;
}

.shp_plugin_meta_field_group,
.shp_license_meta_field_group {
	border-radius: 4px;
	margin-top: 13px;
	margin-bottom: 6.5px;
	display: block;
	border: solid #8c8f94 1px;
	padding: 10px;
}

h3.shp_plugin_meta,
h3.shp_license_meta {
	text-transform: capitalize;
}

.shp_plugin_meta_button:hover,
.shp_license_meta_button:hover {
	color: #808080;
	cursor: pointer;
}

.shp_plugin_meta_add,
.shp_plugin_meta_browse,
.shp_license_meta_add,
.shp_license_meta_browse {
	margin-bottom: 1em;
}

img.shp_plugin_url {
	width: 5em;
}

/* Action test page */

.action_test_page {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	font-size: 18px;
}

.action_test_page .main_content {
	padding: 1em;
}

.action_test_page label {
	font-weight: bold;
	margin-top: 1em;
	margin-bottom: 1em;
	display: inline-block;
}

.action_test_page input,
.action_test_page input[type=submit] {
	font-size: 1em;
	padding: 5px 15px;
	border: solid #808080 1px;
}

.action_test_page a {
	text-decoration: none;
}

.action_test_page .action {
	color: coral;
	cursor: pointer;
}

#pg-shp-license {
	padding: 20px;
}

.opdiv-wc-downloads-list,
.shp-pg-license-list {
	display: flex;
	flex-wrap: wrap;
}

.opdiv-wc-download-item,
.shp-pg-license {
	/* border:solid #c0c0c0 2px; */
	box-shadow: 0px 0px 10px #000000;
	border-radius: 10px;
	/* padding:2em; */
	background-color: #f0f0f0;
	margin: 20px;
}

.shp-pg-license a {
	color: rgb(51, 51, 51);
}

.shp-pg-license a:hover {
	color: var(--opdiv-main-color);
}

.shp-pg-license h4 {
	font-size: 14px;
	font-weight: normal;
}

.shp-pg-license h4,
.shp-pg-license h3 {
	padding-left: 20px;
	padding-right: 20px;
}

.shp-pg-license>*:first-child {
	padding: 20px;
	background-color: #c0c0c0;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	/* border-bottom:solid black 2px; */
}

.shp-pg-plugin-icon {
	width: 1.5em;
	margin-right: 0.5em;
}

/* WooCommerce Product Browser Modal */

.shp-woo-browser-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.shp-woo-browser-modal {
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
	width: 600px;
	max-width: 90%;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.shp-woo-browser-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #ddd;
}

.shp-woo-browser-header h2 {
	margin: 0;
	font-size: 1.3em;
}

.shp-woo-browser-close {
	cursor: pointer;
	color: #666;
	font-size: 20px;
}

.shp-woo-browser-close:hover {
	color: #333;
}

.shp-woo-browser-search {
	padding: 12px 20px;
	border-bottom: 1px solid #eee;
}

.shp-woo-browser-search input {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

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

.shp-woo-browser-results {
	flex: 1;
	overflow-y: auto;
	padding: 0;
}

.shp-woo-browser-loading,
.shp-woo-browser-empty,
.shp-woo-browser-error {
	padding: 20px;
	text-align: center;
	color: #666;
}

.shp-woo-browser-error {
	color: #c00;
}

.shp-woo-browser-table {
	width: 100%;
	border-collapse: collapse;
}

.shp-woo-browser-table th {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 2px solid #ddd;
	font-weight: 600;
	color: #333;
	background: #f9f9f9;
}

.shp-woo-browser-table td {
	padding: 8px 12px;
	border-bottom: 1px solid #eee;
	vertical-align: middle;
}

.shp-woo-browser-table tr:hover td {
	background: #f0f7ff;
}

.shp-woo-browser-table .button-small {
	min-height: 28px;
	line-height: 26px;
	padding: 0 10px;
}

/* WooCommerce product select field wrapper */
.shp_plugin_meta_woo_wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.shp_plugin_meta_woo_wrapper input {
	flex: 1;
}

/* Plugin upload field */
.shp-plugin-upload-wrapper {
	margin-top: 13px;
	margin-bottom: 6.5px;
	padding: 10px;
	border: 2px dashed #c3c4c7;
	border-radius: 4px;
	background: #f9f9f9;
}

.shp-plugin-upload-wrapper input[type=file].shp-plugin-upload-input {
	padding: 0.5em;
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	width: 100%;
	box-sizing: border-box;
}

.shp-plugin-upload-wrapper .shp-plugin-upload-input:hover {
	border-color: #2271b1;
}

.shp-plugin-upload-wrapper .description {
	margin-top: 6px;
}

/* Front-end changelog visual cards */

.shp_plugin_changelog {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.shp_plugin_changelog_version {
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.shp_plugin_changelog_version_header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
	background: #f5f5f5;
	border-bottom: 1px solid #e0e0e0;
}

.shp_plugin_changelog_version_number {
	font-weight: 700;
	font-size: 1.1em;
	color: #333;
}

.shp_plugin_changelog_version_date {
	font-size: 0.85em;
	color: #888;
}

.shp_plugin_changelog_version_items {
	margin: 0;
	padding: 12px 20px 12px 40px;
	list-style: disc;
}

.shp_plugin_changelog_version_items li {
	margin-bottom: 6px;
	line-height: 1.5;
	color: #444;
}

.shp_plugin_changelog_version_items li:last-child {
	margin-bottom: 0;
}

/* Empty field values — show grey "(empty)" text via pure CSS */

.entry-content p:empty::after {
	content: "(empty)";
	color: #999;
	font-style: italic;
	font-size: 0.9em;
}

/* Uninstall Behaviour settings box */

#shp_section_uninstall {
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 0 12px 12px;
	margin-top: 20px;
	margin-bottom: 20px;
	background: #fcfcfc;
}

#shp_section_uninstall h2 {
	padding-left: 0;
}

/* Deactivation Intercept Modal */

.shp-deactivate-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.shp-deactivate-modal {
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
	max-width: 480px;
	width: 90%;
	overflow: hidden;
}

.shp-deactivate-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	border-bottom: 1px solid #dcdcde;
}

.shp-deactivate-header h2 {
	margin: 0;
	padding: 0;
	font-size: 1.3em;
	line-height: 1.4;
}

.shp-deactivate-close {
	cursor: pointer;
	color: #787c82;
	font-size: 20px;
}

.shp-deactivate-close:hover {
	color: #1d2327;
}

.shp-deactivate-body {
	padding: 16px 24px;
}

.shp-deactivate-body p {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.5;
	color: #3c434a;
}

.shp-deactivate-body p:last-child {
	margin-bottom: 0;
}

.shp-deactivate-actions {
	padding: 16px 24px;
	border-top: 1px solid #dcdcde;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}
/* License key password field with show/hide toggle */

.shp-license-key-field {
	display: flex;
	align-items: center;
	gap: 4px;
}

.shp-license-key-input {
	font-family: "Courier New", Courier, monospace;
	font-size: 14px;
	padding: 4px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #333;
	width: auto;
	min-width: 200px;
	cursor: pointer;
	flex: 0 1 auto;
}

.shp-license-key-input[readonly] {
	background: #f9f9f9;
	cursor: pointer;
}

.shp-license-key-toggle,
.shp-license-key-copy {
	background: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	padding: 4px;
	font-size: 16px;
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #666;
	line-height: 1;
}

.shp-license-key-toggle:hover,
.shp-license-key-copy:hover {
	color: #333;
	border-color: #999;
	background: #f0f0f0;
}
