/**
 * Free Resource - Frontend Styles
 *
 * Styles for the CTA container, download buttons, and CTCT form integration.
 *
 * @package Content_Gate_Pro
 */

/* CSS Custom Properties */
:root {
	--cgp-primary-color: #3f51b5;
	--cgp-primary-hover: #303f9f;
	--cgp-success-color: #4caf50;
	--cgp-bg-color: #ffffff;
	--cgp-bg-light: #f8f9fa;
	--cgp-text-main: #333333;
	--cgp-text-muted: #666666;
	--cgp-border-color: #e0e0e0;
	--cgp-border-radius: 12px;
	--cgp-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	--cgp-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Box sizing reset for plugin elements */
.cgp-cta-container,
.cgp-cta-container * {
	box-sizing: border-box;
}

/* Main CTA Container */
.cgp-cta-container {
	background: var(--cgp-bg-color);
	border: 1px solid var(--cgp-border-color);
	border-radius: var(--cgp-border-radius);
	padding: 30px;
	margin: 30px 0;
	box-shadow: var(--cgp-shadow);
	transition: box-shadow 0.3s ease;
}

.cgp-cta-container:hover {
	box-shadow: var(--cgp-shadow-hover);
}

/* CTA Header */
.cgp-cta-header {
	text-align: center;
	margin-bottom: 25px;
}

.cgp-cta-icon {
	font-size: 48px;
	color: var(--cgp-primary-color);
	display: block;
	margin-bottom: 15px;
}

.cgp-cta-heading {
	font-size: 24px;
	font-weight: 700;
	color: var(--cgp-text-main);
	margin: 0 0 10px 0;
	line-height: 1.3;
}

.cgp-cta-description {
	font-size: 16px;
	color: var(--cgp-text-muted);
	margin: 0;
	line-height: 1.5;
}

/* Download Section */
.cgp-download-section {
	text-align: center;
	padding: 20px 0;
}

.cgp-success-message {
	background: rgba(76, 175, 80, 0.1);
	color: var(--cgp-success-color);
	padding: 15px 20px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 16px;
	font-weight: 500;
}

/* Download Button */
.cgp-download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--cgp-primary-color);
	color: #ffffff !important;
	text-decoration: none !important;
	padding: 16px 32px;
	border-radius: 8px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(63, 81, 181, 0.3);
}

.cgp-download-btn:hover {
	background: var(--cgp-primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(63, 81, 181, 0.4);
	color: #ffffff !important;
	text-decoration: none !important;
}

.cgp-download-btn:active {
	transform: translateY(0);
}

.cgp-download-btn .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* Form Section - CTCT Form Wrapper */
.cgp-form-section {
	padding: 10px 0;
}

.cgp-ctct-form-wrapper {
	max-width: 500px;
	margin: 0 auto;
}

/* CTA Footer */
.cgp-cta-footer {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 20px;
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid var(--cgp-border-color);
}

.cgp-footer-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--cgp-text-muted);
}

.cgp-footer-item .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--cgp-success-color);
}

/* Admin Notices (only visible to editors) */
.cgp-admin-notice {
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-left: 4px solid #ffc107;
	color: #856404;
	padding: 15px 20px;
	border-radius: 4px;
	font-size: 14px;
	margin: 15px 0;
}

/* After Subscribe Section (initially hidden) */
.cgp-after-subscribe {
	animation: cgp-fade-in 0.5s ease;
}

@keyframes cgp-fade-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive Design */
@media (max-width: 768px) {
	.cgp-cta-container {
		padding: 20px;
		margin: 20px 0;
	}

	.cgp-cta-heading {
		font-size: 20px;
	}

	.cgp-cta-description {
		font-size: 14px;
	}

	.cgp-download-btn {
		width: 100%;
		padding: 14px 24px;
		font-size: 16px;
	}

	.cgp-cta-footer {
		flex-direction: column;
		gap: 10px;
		align-items: center;
	}
}

@media (max-width: 480px) {
	.cgp-cta-container {
		padding: 15px;
		border-radius: 8px;
	}

	.cgp-cta-icon {
		font-size: 36px;
	}

	.cgp-cta-heading {
		font-size: 18px;
	}

	.cgp-footer-item {
		font-size: 12px;
	}
}

/* Print Styles */
@media print {
	.cgp-cta-container {
		display: none;
	}
}

/* Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
	.cgp-cta-container {
		/* Only apply if container doesn't have explicit background */
	}
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.cgp-download-btn {
		border: 2px solid currentColor;
	}

	.cgp-cta-container {
		border-width: 2px;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.cgp-cta-container,
	.cgp-download-btn,
	.cgp-after-subscribe {
		transition: none;
		animation: none;
	}

	.cgp-download-btn:hover {
		transform: none;
	}
}

/* ==========================================================================
   ARCHIVE PAGE STYLES
   ========================================================================== */

.cgp-archive-wrapper {
	background: #ffffff;
	min-height: 100vh;
}

.cgp-archive-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 24px 80px;
}

/* Archive Header */
.cgp-archive-header {
	text-align: left;
	margin-bottom: 50px;
	max-width: 700px;
}

.cgp-archive-label {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: #22c55e;
	text-transform: uppercase;
	margin-bottom: 12px;
}

.cgp-archive-title {
	font-size: 42px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 16px 0;
	line-height: 1.2;
}

.cgp-archive-description {
	font-size: 18px;
	color: #64748b;
	line-height: 1.6;
	margin: 0;
}

/* Resources Grid */
.cgp-resources-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}

/* Resource Card */
.cgp-resource-card {
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.cgp-resource-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Card Image */
.cgp-card-image-link {
	display: block;
	text-decoration: none;
}

.cgp-card-image {
	position: relative;
	width: 100%;
	padding-top: 60%;
	overflow: hidden;
	background: #f1f5f9;
}

.cgp-card-thumbnail {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.cgp-resource-card:hover .cgp-card-thumbnail {
	transform: scale(1.05);
}

.cgp-card-image-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
}

.cgp-placeholder-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 64px;
	height: 64px;
	color: #cbd5e1;
}

/* Card Content */
.cgp-card-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.cgp-card-title {
	font-size: 18px;
	font-weight: 600;
	color: #1a1a2e;
	margin: 0 0 12px 0;
	line-height: 1.4;
}

.cgp-card-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.cgp-card-title a:hover {
	color: #3f51b5;
}

.cgp-card-excerpt {
	font-size: 14px;
	color: #64748b;
	line-height: 1.6;
	margin: 0 0 20px 0;
	flex-grow: 1;
}

/* Card Button */
.cgp-card-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px 20px;
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	color: #1a1a2e !important;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none !important;
	cursor: pointer;
	transition: all 0.2s ease;
	box-sizing: border-box;
	margin-top: 10px;
}

.cgp-card-btn:hover {
	border-color: #3f51b5;
	color: #3f51b5 !important;
	background: #f8fafc;
}

.cgp-btn-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* Pagination */
.cgp-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 60px;
}

.cgp-pagination a,
.cgp-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease;
}

.cgp-pagination a {
	color: #64748b;
	background: #ffffff;
	border: 1px solid #e2e8f0;
}

.cgp-pagination a:hover {
	color: #3f51b5;
	border-color: #3f51b5;
	background: #f8fafc;
}

.cgp-pagination span.current {
	color: #ffffff;
	background: #3f51b5;
	border: 1px solid #3f51b5;
}

/* No Resources */
.cgp-no-resources {
	text-align: center;
	padding: 80px 20px;
}

.cgp-empty-icon {
	width: 80px;
	height: 80px;
	color: #cbd5e1;
	margin-bottom: 24px;
}

.cgp-no-resources h2 {
	font-size: 24px;
	color: #1a1a2e;
	margin: 0 0 12px 0;
}

.cgp-no-resources p {
	font-size: 16px;
	color: #64748b;
	margin: 0;
}

/* Archive Responsive */
@media (max-width: 1024px) {
	.cgp-resources-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

	.cgp-archive-title {
		font-size: 36px;
	}
}

@media (max-width: 640px) {
	.cgp-archive-container {
		padding: 40px 16px 60px;
	}

	.cgp-resources-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.cgp-archive-title {
		font-size: 28px;
	}

	.cgp-archive-description {
		font-size: 16px;
	}
}

/* ==========================================================================
   SINGLE PAGE STYLES
   ========================================================================== */

.cgp-single-wrapper {
	background: #ffffff;
	min-height: 100vh;
}

.cgp-single-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 40px 24px 80px;
}

/* Back Link */
.cgp-back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #64748b;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s ease;
	margin-bottom: 32px;
}

.cgp-back-link:hover {
	color: #3f51b5;
}

.cgp-back-icon {
	width: 16px;
	height: 16px;
}

/* Single Layout */
.cgp-single-layout {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 48px;
	align-items: start;
}

/* Main Content */
.cgp-single-main {
	min-width: 0;
}

.cgp-category-badge {
	display: inline-block;
	padding: 4px 10px;
	background: #f0fdf4;
	color: #15803d;
	font-size: 11px;
	font-weight: 600;
	border-radius: 4px;
	border-left: 3px solid #22c55e;
	text-transform: capitalize;
	letter-spacing: 0.01em;
	margin-bottom: 16px;
}

.cgp-single-title {
	font-size: 36px;
	font-weight: 700;
	color: #1a1a2e;
	line-height: 1.25;
	margin: 0 0 24px 0;
}

/* Featured Image */
.cgp-single-image {
	margin-bottom: 32px;
	border-radius: 12px;
	overflow: hidden;
}

.cgp-featured-image {
	width: 100%;
	height: auto;
	display: block;
}

/* Content Preview */
.cgp-content-preview {
	position: relative;
}

.cgp-content-text {
	font-size: 17px;
	line-height: 1.75;
	color: #374151;
}

.cgp-content-text p {
	margin: 0 0 1.5em 0;
}

/* Content Fade */
.cgp-content-fade {
	position: absolute;
	bottom: 60px;
	left: 0;
	right: 0;
	height: 150px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 1) 100%);
	pointer-events: none;
}

/* Read More Button */
.cgp-read-more-wrapper {
	text-align: center;
	padding-top: 10px;
}

.cgp-read-more-wrapper .cgp-read-more-btn {
	display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cgp-read-more-btn:hover {
	border-color: #d1d5db;
	background: #f9fafb;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.cgp-read-more-btn .cgp-btn-icon {
	width: 16px;
	height: 16px;
	color: #6b7280;
}

/* Sidebar */
.cgp-single-sidebar {
	position: sticky;
	top: 24px;
}

.cgp-sidebar-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cgp-sidebar-header {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 16px;
}

.cgp-sidebar-icon {
	width: 40px;
	height: 40px;
	min-width: 40px;
	background: #eff6ff;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cgp-sidebar-icon svg {
	width: 20px;
	height: 20px;
	color: #3f51b5;
}

.cgp-sidebar-text {
	flex: 1;
}

.cgp-sidebar-title {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a2e;
	margin: 0 0 4px 0;
	line-height: 1.3;
}

.cgp-sidebar-description {
	font-size: 13px;
	color: #64748b;
	line-height: 1.5;
	margin: 0;
}

/* Sidebar Download Button */
.cgp-sidebar-card .cgp-sidebar-download-btn,
.cgp-single-sidebar .cgp-sidebar-download-btn,
button.cgp-sidebar-download-btn,
a.cgp-sidebar-download-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	width: 100% !important;
	margin-top: 20px !important;
	padding: 14px 24px !important;
	background-color: rgb(63, 81, 181) !important;
	border: none !important;
	border-radius: 8px !important;
	color: #ffffff !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	box-shadow: 0 4px 15px rgba(63, 81, 181, 0.3) !important;
	text-decoration: none !important;
	font-family: inherit !important;
	line-height: 1.4 !important;
}

.cgp-sidebar-card .cgp-sidebar-download-btn:hover,
.cgp-single-sidebar .cgp-sidebar-download-btn:hover,
button.cgp-sidebar-download-btn:hover,
a.cgp-sidebar-download-btn:hover {
	background-color: rgb(48, 63, 159) !important;
	box-shadow: 0 6px 20px rgba(63, 81, 181, 0.4) !important;
	transform: translateY(-1px);
	color: #ffffff !important;
}

.cgp-sidebar-download-btn:active {
	transform: translateY(0);
}

.cgp-sidebar-download-btn svg {
	width: 20px !important;
	height: 20px !important;
	flex-shrink: 0;
}

.cgp-sidebar-download-btn svg path,
.cgp-sidebar-download-btn svg g {
	stroke: #ffffff !important;
}

/* Sidebar Form Wrapper */
.cgp-sidebar-form-wrapper {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e2e8f0;
}

.cgp-sidebar-form-wrapper .cgp-ctct-form-wrapper {
	max-width: 100%;
}


/* Sidebar Footer Badges */
.cgp-sidebar-footer {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-top: 16px;
}

.cgp-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: #94a3b8;
}

.cgp-badge svg {
	width: 14px;
	height: 14px;
	color: #94a3b8;
}

/* ==========================================================================
   SUBSCRIPTION MODAL
   ========================================================================== */

.cgp-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cgp-modal-overlay.cgp-modal-open {
	opacity: 1;
	visibility: visible;
}

.cgp-modal {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	width: 100%;
	max-width: 420px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	transform: scale(0.95) translateY(10px);
	transition: transform 0.3s ease;
}

.cgp-modal-overlay.cgp-modal-open .cgp-modal {
	transform: scale(1) translateY(0);
}

/* Modal Close Button */
button.cgp-modal-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: transparent !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    padding: 0;
}

.cgp-modal-close:hover {
	background: #f3f4f6;
	transform: scale(1.1);
}

.cgp-modal-close svg {
	width: 20px;
	height: 20px;
	color: #9ca3af;
}

/* Modal Content */
.cgp-modal-content {
	padding: 40px 32px 32px;
	text-align: center;
}

/* Modal Icon */
.cgp-modal-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}

.cgp-modal-close svg {
    width: 20px;
    height: 20px;
    color: #51555c;
    flex-shrink: 0;
}

/* Modal Title & Description */
.cgp-modal-title {
	font-size: 22px;
	font-weight: 600;
	color: #1a1a2e;
	margin: 0 0 8px 0;
	line-height: 1.3;
}

.cgp-modal-description {
	font-size: 14px;
	color: #6b7280;
	margin: 0 0 24px 0;
	line-height: 1.5;
}

/* Modal Form */
.cgp-modal-form {
	margin-bottom: 16px;
}

.cgp-modal-form .cgp-ctct-form-wrapper {
	max-width: 100%;
}

/* Hide CTCT form description and legacy Bloom header (modal has its own) */
.cgp-modal-form .ctct-form-description,
.cgp-modal-form .et_bloom_header_outer,
.cgp-modal-form .et_bloom_form_header,
.cgp-modal-form .et_bloom_form_text {
	display: none !important;
}

/* Hide the CTCT honeypot/usage div */
.cgp-modal-form .ctct_usage {
	display: none !important;
}

/* CTCT form reset */
.cgp-modal-form .ctct-form {
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

/* Field wrapper spacing */
.cgp-modal-form .ctct-form-field {
	margin: 0 0 16px 0 !important;
	padding: 0 !important;
	text-align: left !important;
}

.cgp-modal-form .ctct-form-field:last-of-type {
	margin-bottom: 0 !important;
}

/* Field labels (exclude the submit input which also has ctct-label-top) */
.cgp-modal-form .ctct-form-field span.ctct-label-top,
.cgp-modal-form .ctct-form-field label {
	display: block !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #374151 !important;
	margin-bottom: 6px !important;
	text-align: left !important;
}

/* Name input - person icon */
.cgp-modal-form .ctct-form-field-text input[type="text"] {
	width: 100% !important;
	padding: 14px 16px 14px 44px !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	background-color: #ffffff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='1.5'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: 14px center !important;
	background-size: 18px !important;
	box-sizing: border-box !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Email input - envelope icon */
.cgp-modal-form .ctct-form-field-email input[type="email"] {
	width: 100% !important;
	padding: 14px 16px 14px 44px !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	background-color: #ffffff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='1.5'%3E%3Cpath d='M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: 14px center !important;
	background-size: 18px !important;
	box-sizing: border-box !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Input focus state */
.cgp-modal-form .ctct-form input[type="email"]:focus,
.cgp-modal-form .ctct-form input[type="text"]:focus {
	outline: none !important;
	border-color: rgb(63, 81, 181) !important;
	box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1) !important;
}

/* Input placeholder */
.cgp-modal-form .ctct-form input::placeholder {
	color: #9ca3af !important;
	opacity: 1 !important;
}

/* Submit button wrapper */
.cgp-modal-form .ctct-form-field-submit {
	margin-top: 20px !important;
}

/* Style the CTCT submit button */
.cgp-modal-form .ctct-form-field-submit button[type="submit"],
.cgp-modal-form .ctct-form-field-submit input[type="submit"],
.cgp-modal-form input.ctct-submit {
	width: 100% !important;
	padding: 14px 24px !important;
	background: rgb(63, 81, 181) !important;
	border: none !important;
	border-radius: 8px !important;
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	letter-spacing: 0.5px !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	text-transform: uppercase !important;
	text-align: center !important;
}

.cgp-modal-form .ctct-form-field-submit button[type="submit"]:hover,
.cgp-modal-form .ctct-form-field-submit input[type="submit"]:hover {
	background: rgb(48, 63, 159) !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 4px 12px rgba(63, 81, 181, 0.3) !important;
}

.cgp-modal-form .ctct-form-field-submit button[type="submit"]:active,
.cgp-modal-form .ctct-form-field-submit input[type="submit"]:active {
	transform: translateY(0) !important;
	box-shadow: none !important;
}

/* CTCT form error/success notification styling */
.cgp-modal-form .ctct-form .ctct-form-notification-area {
	margin-top: 12px !important;
	padding: 12px 16px !important;
	border-radius: 8px !important;
	font-size: 14px !important;
}

/* Hide CTCT list selector if hidden */
.cgp-modal-form .ctct-list-selector[style*="display:none"],
.cgp-modal-form .ctct-list-selector[style*="display: none"] {
	display: none !important;
}

/* Modal Footer Note */
.cgp-modal-footer-note {
	font-size: 12px;
	color: #9ca3af;
	margin: 0;
}

/* Modal Success State */
.cgp-modal-icon-success {
	color: #22c55e;
}

.cgp-modal-icon-success svg {
	color: #22c55e;
}

/* Modal Download Button */
.cgp-modal-download-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 16px 24px;
	margin-bottom: 16px;
	background: rgb(63, 81, 181);
	border: none;
	border-radius: 8px;
	color: #ffffff !important;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 15px rgba(63, 81, 181, 0.3);
}

.cgp-modal-download-btn:hover {
	background: rgb(48, 63, 159);
	box-shadow: 0 6px 20px rgba(63, 81, 181, 0.4);
	transform: translateY(-1px);
	color: #ffffff !important;
}

.cgp-modal-download-btn svg {
	width: 20px;
	height: 20px;
	stroke: #ffffff;
}

/* Success state animation */
.cgp-modal-success-state {
	animation: cgp-success-appear 0.4s ease;
}

@keyframes cgp-success-appear {
	from {
		opacity: 0;
		transform: scale(0.9);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Button loading state */
.cgp-sidebar-download-btn:disabled,
.cgp-modal-download-btn:disabled {
	opacity: 0.7;
	cursor: wait;
}

.cgp-btn-loading {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cgp-btn-loading::before {
	content: '';
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: cgp-spin 0.8s linear infinite;
}

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

/* Single Responsive */
@media (max-width: 900px) {
	.cgp-single-layout {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.cgp-single-sidebar {
		position: static;
		order: -1;
	}

	.cgp-single-title {
		font-size: 28px;
	}
}

@media (max-width: 640px) {
	.cgp-single-container {
		padding: 24px 16px 60px;
	}

	.cgp-single-title {
		font-size: 24px;
	}

	.cgp-content-text {
		font-size: 16px;
	}

	.cgp-sidebar-card {
		padding: 20px;
	}
}

/* ==========================================================================
   PROGRESS MODAL
   ========================================================================== */

.cgp-progress-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999999;
	padding: 20px;
}

.cgp-progress-modal {
	background: #ffffff;
	border-radius: 16px;
	padding: 40px;
	width: 100%;
	max-width: 320px;
	text-align: center;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Progress Spinner */
.cgp-progress-spinner {
	width: 64px;
	height: 64px;
	margin: 0 auto 24px;
}

.cgp-progress-spinner svg {
	width: 100%;
	height: 100%;
	animation: cgp-rotate 2s linear infinite;
}

.cgp-progress-spinner circle,
.cgp-spinner-circle {
	stroke: rgb(63, 81, 181);
	stroke-dasharray: 1, 150;
	stroke-dashoffset: 0;
	animation: cgp-dash 1.5s ease-in-out infinite;
}

@keyframes cgp-rotate {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes cgp-dash {
	0% {
		stroke-dasharray: 1, 150;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -35;
	}
	100% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -125;
	}
}

/* Progress Text */
.cgp-progress-text {
	font-size: 16px;
	font-weight: 500;
	color: #1a1a2e;
	margin: 0 0 20px 0;
}

/* Progress Bar */
.cgp-progress-bar {
	width: 100%;
	height: 6px;
	background: #e5e7eb;
	border-radius: 3px;
	overflow: hidden;
}

.cgp-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, rgb(63, 81, 181) 0%, rgb(99, 102, 241) 100%);
	border-radius: 3px;
	width: 0%;
	transition: width 0.4s ease;
}

/* Progress Modal Responsive */
@media (max-width: 480px) {
	.cgp-progress-modal {
		padding: 32px 24px;
		max-width: 280px;
	}

	.cgp-progress-spinner {
		width: 56px;
		height: 56px;
	}

	.cgp-progress-text {
		font-size: 15px;
	}
}
