/**
 * Download Info Widget Styles
 *
 * Mirrors the theme's downloads.less styles for the download sidebar.
 *
 * @package     Core
 * @copyright   Copyright (c) 2026, Sandhills Development, LLC
 * @since       <next-version>
 */

/* ==========================================================================
   Variables (from theme's variables.less)
   @eddblue: #2794da
   @eddgray: #f4f7fa
   @eddgrayhover: #eaf0f7
   @edddarkgray: #cfd9e6
   @eddtext: #35495c
   @eddtexthover: #6e747b
   @eddtextlight: #6e747b
   @edddarkblue: #35495c
   @green: #24c261
   ========================================================================== */

/* ==========================================================================
   Error State
   ========================================================================== */

.edd-download-info__error {
	padding: 16px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #991b1b;
	font-size: 14px;
}

/* ==========================================================================
   Main Widget Container - Matches .download-sidebar from downloads.less
   ========================================================================== */

.download-sidebar.edd-download-info-shortcode {
	padding-bottom: 1rem;
}

@media all and (min-width: 992px) {
	.download-sidebar.edd-download-info-shortcode {
		padding-bottom: 1rem;
	}
}

/* ==========================================================================
   Download Info Wrap - Matches .download-info-wrap from downloads.less
   ========================================================================== */

.download-sidebar.edd-download-info-shortcode .download-info-wrap {
	background: #f4f7fa;
	border: 1px solid #171717;
	margin-bottom: 3rem;
	font-size: 0.87rem !important;
}

.download-sidebar.edd-download-info-shortcode .download-info-wrap a {
	font-size: inherit !important;
}

/* ==========================================================================
   Thumbnail
   ========================================================================== */

.download-sidebar.edd-download-info-shortcode .download-thumbnail {
	display: block;
	width: 100%;
	height: auto;
	border-bottom: 1px solid #171717;
}

/* ==========================================================================
   Download Access Section - Matches .download-access from downloads.less
   ========================================================================== */

.download-sidebar.edd-download-info-shortcode .download-access {
	padding: 1.5rem;
}

.download-sidebar.edd-download-info-shortcode .download-access .download-detail {
	font-size: 0.87rem !important;
}

.download-sidebar.edd-download-info-shortcode .download-access .download-detail:not(:last-child) {
	margin-bottom: 1.5rem;
}

.download-sidebar.edd-download-info-shortcode .download-access .download-detail a {
	color: #35495c;
}

.download-sidebar.edd-download-info-shortcode .download-access .eddwp-button {
	display: block;
	text-align: center;
}

.download-sidebar.edd-download-info-shortcode .download-access .edd-add-to-cart {
	background-color: #f4f7fa;
	border: 1px solid #35495c;
	color: #35495c !important;
}

.download-sidebar.edd-download-info-shortcode .download-access .edd-add-to-cart:hover {
	background-color: #eaf0f7;
}

/* Terms / Access Messages */
.download-sidebar.edd-download-info-shortcode .download-access .terms {
	font-size: 0.87rem !important;
}

.download-sidebar.edd-download-info-shortcode .download-access .terms:not(.all-access-congrats) {
	color: #6e747b;
	margin-top: 1rem;
}

.download-sidebar.edd-download-info-shortcode .download-access .terms.all-access-congrats {
	color: #35495c;
	margin-bottom: 1.5rem;
	text-align: center;
	font-size: 0.87rem !important;
}

.download-sidebar.edd-download-info-shortcode .download-access .terms.all-access-congrats strong {
	font-size: 1.2rem !important;
	display: block;
	margin-bottom: 0.5rem;
}

.download-sidebar.edd-download-info-shortcode .download-access .terms.all-access-congrats a {
	font-size: 0.87rem !important;
}

.download-sidebar.edd-download-info-shortcode .download-access .terms a {
	color: #35495c;
}

/* Pass Offer Section */
.download-sidebar.edd-download-info-shortcode .download-info-wrap .download-pass-offer {
	text-align: left;
}

.download-sidebar.edd-download-info-shortcode .download-info-wrap .download-pass-offer .or-seperator {
	display: block;
}

.download-sidebar.edd-download-info-shortcode .download-info-wrap .download-pass-offer .offer-title {
	display: block;
	font-size: 1.2rem !important;
	font-weight: 600;
	padding-bottom: 0.5rem;
}

.download-sidebar.edd-download-info-shortcode .download-info-wrap .download-pass-offer .offer-description {
	display: block;
	font-weight: 300;
	padding-bottom: 1rem;
}

.download-sidebar.edd-download-info-shortcode .download-info-wrap .download-pass-offer .offer-list {
	margin: 5px 0;
}

.download-sidebar.edd-download-info-shortcode .download-info-wrap .download-pass-offer .offer-list span {
	display: block;
}

.download-sidebar.edd-download-info-shortcode .download-info-wrap .download-pass-offer .offer-list .fa-check-circle {
	color: #4dc34d;
}

/* Button styling */
.download-sidebar.edd-download-info-shortcode .download-access .button {
	text-align: center;
	width: 100% !important;
}

/* Download Now button - All Access users */
.download-sidebar.edd-download-info-shortcode .download-access .edd-all-access-download-btn {
	display: block;
	width: 100%;
	padding: 12px 20px;
	background-color: #01B7FF;
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
	box-sizing: border-box;
}

.download-sidebar.edd-download-info-shortcode .download-access .edd-all-access-download-btn:hover {
	background-color: #00a3e6;
	color: #fff !important;
}

/* Get a Pass button - Users without access */
.download-sidebar.edd-download-info-shortcode .download-access .download-pass-offer .eddwp-button.lg {
	display: block;
	width: 100%;
	padding: 12px 20px;
	background-color: rgb(5, 168, 46);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
	box-sizing: border-box;
}

.download-sidebar.edd-download-info-shortcode .download-access .download-pass-offer .eddwp-button.lg:hover {
	background-color: rgb(4, 148, 40);
	color: #fff !important;
}

/* Beta file link */
.download-sidebar.edd-download-info-shortcode .download-access.has-beta-file .edd_all_access_download_form {
	margin-bottom: 3px !important;
}

.download-sidebar.edd-download-info-shortcode .download-access.has-beta-file .edd_all_access_download_form ~ .download-beta {
	font-size: 0.87rem;
}

.download-sidebar.edd-download-info-shortcode .download-access.has-beta-file .edd_all_access_download_form ~ .download-beta a {
	color: #35495c;
}

/* ==========================================================================
   Download Details Section - Matches .download-details from downloads.less
   ========================================================================== */

.download-sidebar.edd-download-info-shortcode .download-details {
	font-size: 0.87rem !important;
}

.download-sidebar.edd-download-info-shortcode .download-details a {
	font-size: inherit !important;
}

/* ==========================================================================
   Requirements Section - Matches .download-requirements from downloads.less
   ========================================================================== */

.download-sidebar.edd-download-info-shortcode .download-details .download-requirements {
	margin-bottom: 2rem;
}

.download-sidebar.edd-download-info-shortcode .download-details .download-requirements h5 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	color: #35495c;
}

.download-sidebar.edd-download-info-shortcode .download-details .download-requirements > div {
	display: inline-block;
	background: #eaf0f7;
	font-weight: 700;
	border-radius: 4px;
	margin-bottom: 3px;
}

.download-sidebar.edd-download-info-shortcode .download-details .download-requirements .edd-download-detail-label {
	display: inline-block;
	color: #fff;
	padding: 2px 8px;
	border-radius: 4px 0 0 4px;
}

.download-sidebar.edd-download-info-shortcode .download-details .download-requirements .edd-download-detail {
	display: inline-block;
	padding: 2px 7px 2px 0;
	border-radius: 0 4px 4px 0;
}

/* WordPress version - blue */
.download-sidebar.edd-download-info-shortcode .download-details .download-requirements .wp-ver .edd-download-detail-label {
	background: #0073aa;
}

/* EDD version - EDD blue */
.download-sidebar.edd-download-info-shortcode .download-details .download-requirements .edd-ver .edd-download-detail-label {
	background: #2794da;
}

/* PHP version - purple */
.download-sidebar.edd-download-info-shortcode .download-details .download-requirements .php-ver .edd-download-detail-label {
	background: #8892be;
}

/* ==========================================================================
   Version Section - Matches .download-version from downloads.less
   ========================================================================== */

.download-sidebar.edd-download-info-shortcode .download-details .download-version {
	margin-bottom: 1rem;
}

.download-sidebar.edd-download-info-shortcode .download-details .download-version a {
	color: #35495c;
}

.download-sidebar.edd-download-info-shortcode .download-details .download-version .changelog-link {
	text-decoration: underline;
}

.download-sidebar.edd-download-info-shortcode .download-details .download-version .changelog-link:hover {
	text-decoration: none;
}

/* ==========================================================================
   Documentation Link - Matches .download-doc from downloads.less
   ========================================================================== */

.download-sidebar.edd-download-info-shortcode .download-details .download-doc {
	color: #6e747b;
}

.download-sidebar.edd-download-info-shortcode .download-details .download-doc a {
	color: #35495c;
}

/* ==========================================================================
   Changelog Modal Styles
   ========================================================================== */

.edd-changelog-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.edd-changelog-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
}

.edd-changelog-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	width: 100%;
	max-width: 700px;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.edd-changelog-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
}

.edd-changelog-modal-title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #171717;
}

.edd-changelog-modal-close {
	background: none;
	border: none;
	padding: 4px;
	cursor: pointer;
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: color 0.2s ease, background-color 0.2s ease;
	font-size: 24px;
	line-height: 1;
}

.edd-changelog-modal-close:hover {
	color: #171717;
	background-color: #f3f4f6;
}

.edd-changelog-modal-body {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
}

/* Loading State */
.edd-changelog-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 40px;
	color: #6b7280;
	font-size: 14px;
}

.edd-changelog-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid #e5e7eb;
	border-top-color: #2794da;
	border-radius: 50%;
	animation: edd-changelog-spin 0.8s linear infinite;
}

@keyframes edd-changelog-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Changelog Content */
.edd-changelog-content {
	font-size: 14px;
	line-height: 1.6;
	color: #292929;
}

.edd-changelog-content h4,
.edd-changelog-content .edd-changelog-version {
	font-size: 16px;
	font-weight: 600;
	color: #171717;
	margin: 0 0 4px;
	padding-top: 16px;
}

.edd-changelog-content h4:first-child,
.edd-changelog-entry:first-child .edd-changelog-version {
	padding-top: 0;
}

.edd-changelog-content .changelog-date,
.edd-changelog-date {
	font-size: 13px;
	color: #a1a1a1;
	font-weight: 400;
	margin: 0 0 8px;
}

.edd-changelog-content p {
	margin: 0 0 12px;
}

.edd-changelog-content ul,
.edd-changelog-changes {
	margin: 0 0 16px;
	padding-left: 20px;
}

.edd-changelog-content ul li,
.edd-changelog-changes li {
	margin: 0 0 4px;
	padding: 0;
}

.edd-changelog-entry {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f3f4f6;
}

.edd-changelog-entry:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

/* Empty / Error States */
.edd-changelog-empty,
.edd-changelog-error {
	text-align: center;
	padding: 40px 20px;
	color: #6b7280;
	font-size: 14px;
}

.edd-changelog-error {
	color: #ef4444;
}

/* Footer */
.edd-changelog-modal-footer {
	padding: 16px 24px;
	border-top: 1px solid #e5e7eb;
	text-align: center;
}

.edd-changelog-full-link {
	color: #2794da;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s ease;
}

.edd-changelog-full-link:hover {
	color: #2386c5;
	text-decoration: underline;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
	.edd-changelog-modal {
		padding: 12px;
	}

	.edd-changelog-modal-content {
		max-height: 90vh;
	}

	.edd-changelog-modal-header {
		padding: 16px 20px;
	}

	.edd-changelog-modal-title {
		font-size: 18px;
	}

	.edd-changelog-modal-body {
		padding: 20px;
	}

	.edd-changelog-modal-footer {
		padding: 12px 20px;
	}
}
