/*------------------------------------------------------------------

[Addons Table of contents]

1. Heading & description
2. Buttons
3. Addons list
4. Addons Details (img/h3/text)
5. Addons Action (upgrade/status/activate/deactivate)
6. About Us

@since AFFWPN Updates to tools installed from the About Us page.

-------------------------------------------------------------------*/

/* ---------- 1. Heading & description ---------- */

/* Page description */
#affwp-addons > p {
	margin: 0 0;
}

#affwp-addons .affwp-addon-page-actions {
	display: flex;
	justify-content: right;
	gap: 16px;
	margin: 1.33em 0;
}

/* ---------- 3. Addons list ---------- */
#affwp-addons .affwp-addons-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 20px;
	margin-top: 1.33em;
}

#affwp-addons .affwp-addon {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 3px;
	box-sizing: border-box;
}

/* ---------- 4. Addons Details (img/h3/text) ---------- */
.affwp-addon-details {
	display: flex;
	background-color: #ffffff;
	padding: 30px 20px;
	min-height: 100px;
	border-radius: 3px 3px 0 0;
}

#affwp-addons .affwp-addon-img {
	background: #ed6d62;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 80px;
}

#affwp-addons .affwp-addon-img img {
	width: 80px;
	object-fit: scale-down;
	max-width: none;
}

#affwp-addons .affwp-addon-text {
	margin-left: 20px;
}

#affwp-addons .affwp-addon h3 {
	margin: 0 0 8px;
	font-size: 16px;
}

#affwp-addons .affwp-addon h3 a {
	color: #444;
}

/* ---------- 5. Addons Action (upgrade/status/activate/deactivate) ---------- */
#affwp-addons .affwp-addon-action {
	background-color: #f7f7f7;
	padding: 20px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	border-radius: 0 0 3px 3px;
}

#affwp-addons .affwp-status {
	font-weight: bold;
}

#affwp-addons .affwp-status-active {
	color: #00a32a;
}

#affwp-addons .affwp-status-installed {
	color: #d63638;
}

#affwp-addons .affwp-status-missing {
	color: #666;
}

#affwp-addons button {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
	background: none;
	border: 1px solid #ddd;
	border-radius: 5px;
	padding: 8px 5px;
	width: 140px;
	cursor: pointer;
}

#affwp-addons button:last-child {
	margin-left: auto;
}

#affwp-addons .affwp-styled-checkbox input {
	width: 18px;
	height: 11px;
	position: relative;
	display: inline-block;
	border-radius: 10px;
	background-color: #d63638;
	float: right;
	cursor: pointer;
	border: none;
	margin-top: 0;
}

#affwp-addons .affwp-styled-checkbox input.checked {
	background-color: #00a32a;
}

#affwp-addons .affwp-styled-checkbox input:after {
	left: 2px;
	top: 2px;
	bottom: 2px;
	width: 7px;
	position: absolute;
	content: "";
	background: #fff;
	display: block;
	border-radius: 50%;
}

#affwp-addons .affwp-styled-checkbox input.checked:after {
	right: 2px;
	left: auto;
}

#affwp-addons input[type="checkbox"]:checked::before {
	content: none;
}

.affwp-addon-section-title {
	font-size: 17px;
	margin: 1.5em 0 8px;
}

.affwp-addon-badge {
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
		Cantarell, "Helvetica Neue", sans-serif;
	font-size: 10px;
	letter-spacing: 0.5px;
	padding: 8px 10px;
	text-transform: uppercase;
	font-weight: 700;
	text-align: center;
	line-height: 6px;
	user-select: none;
	transition-property: all;
	transition-duration: 0.15s;
	transition-timing-function: ease-out;
	color: #8c8f94;
	background-color: #e5e5e6;
	display: inline-block;
	border-radius: 3px;
}

/* TODO: Add the official styles */
.affwp-addon-recommended {
	border-color: rgba(0, 128, 0, 0.4) !important;
	box-shadow: 0 4px 8px rgba(0, 128, 0, 0.4);
}

/* ---------- 6. About Us ---------- */
#affwp-addons.about-us button.button-primary {
	background-color: #2271b1;
	color: white;
}

#affwp-addons.about-us button.button-secondary {
	border: 1px solid #2271b1;
	color: #2271b1;
	background: #f6f7f7;
}
