/**
 * Kloira - Trust Bar Popup Styles
 * Beautiful popups for trust bar items with lazy-loaded content
 *
 * @package Onviqa
 * @since 1.0.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

.only-trust-popup {
	--trust-primary: #1A1A1A;
	--trust-accent: #FF6B35;
	--trust-accent-light: rgba(255, 107, 53, 0.08);
	--trust-success: #22c55e;
	--trust-success-light: rgba(34, 197, 94, 0.1);
	--trust-text: #1A1A1A;
	--trust-text-secondary: #666666;
	--trust-text-muted: #999999;
	--trust-border: #E6E9F0;
	--trust-bg: #FFFFFF;
	--trust-bg-secondary: #F8F9FC;
	--trust-radius: 20px;
	--trust-radius-sm: 12px;
	--trust-shadow: 0 25px 80px rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   Overlay
   ========================================================================== */

.only-trust-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: 99998;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.only-trust-popup-overlay.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* ==========================================================================
   Popup Container
   ========================================================================== */

.only-trust-popup {
	position: fixed;
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.only-trust-popup.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Desktop: Wide centered modal */
@media (min-width: 769px) {
	.only-trust-popup {
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%) scale(0.92);
		width: 720px;
		max-width: calc(100vw - 48px);
		max-height: calc(100vh - 48px);
	}

	.only-trust-popup.is-active {
		transform: translate(-50%, -50%) scale(1);
	}

	.only-trust-popup__container {
		border-radius: var(--trust-radius);
		box-shadow: var(--trust-shadow);
	}

	.only-trust-popup__handle {
		display: none;
	}
}

/* Mobile: Bottom sheet */
@media (max-width: 768px) {
	.only-trust-popup {
		bottom: 0;
		left: 0;
		right: 0;
		transform: translateY(100%);
		width: 100%;
		max-height: 90vh;
	}

	.only-trust-popup.is-active {
		transform: translateY(0);
	}

	.only-trust-popup__container {
		border-radius: 24px 24px 0 0;
		box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.2);
	}
}

/* ==========================================================================
   Container Structure
   ========================================================================== */

.only-trust-popup__container {
	background: var(--trust-bg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	max-height: inherit;
	position: relative;
}

/* ==========================================================================
   Drag Handle (Mobile)
   ========================================================================== */

.only-trust-popup__handle {
	display: flex;
	justify-content: center;
	padding: 14px 0 6px;
	cursor: grab;
}

.only-trust-popup__handle:active {
	cursor: grabbing;
}

.only-trust-popup__handle-bar {
	width: 48px;
	height: 5px;
	background: #D1D5DB;
	border-radius: 10px;
	transition: background 0.2s ease;
}

.only-trust-popup__handle:hover .only-trust-popup__handle-bar {
	background: #9CA3AF;
}

/* ==========================================================================
   Header
   ========================================================================== */

.only-trust-popup__header {
	position: relative;
	padding: 20px 24px 0;
	text-align: center;
}

.only-trust-popup__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 12px;
	background: var(--trust-accent-light);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: trustIconPulse 2s ease-in-out infinite;
}

@keyframes trustIconPulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.2);
	}
	50% {
		transform: scale(1.02);
		box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
	}
}

.only-trust-popup__icon svg {
	width: 28px;
	height: 28px;
	color: var(--trust-accent);
}

.only-trust-popup__title {
	font-family: 'DM Serif Display', Georgia, serif;
	font-size: 26px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--trust-primary);
	margin: 0 0 8px;
}

.only-trust-popup__subtitle {
	font-family: 'Roboto Flex', sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--trust-text-secondary);
	margin: 0;
}

/* Close Button */
.only-trust-popup__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	background: var(--trust-bg-secondary);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	color: var(--trust-text-secondary);
}

.only-trust-popup__close:hover {
	background: #E5E7EB;
	color: var(--trust-primary);
	transform: rotate(90deg);
}

.only-trust-popup__close svg {
	width: 18px;
	height: 18px;
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.only-trust-popup__content {
	padding: 16px 24px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* Loading State */
.only-trust-popup__loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	gap: 16px;
}

.only-trust-popup__spinner {
	width: 40px;
	height: 40px;
	border: 3px solid var(--trust-border);
	border-top-color: var(--trust-accent);
	border-radius: 50%;
	animation: trustSpinner 0.8s linear infinite;
}

@keyframes trustSpinner {
	to {
		transform: rotate(360deg);
	}
}

.only-trust-popup__loading-text {
	font-family: 'Roboto Flex', sans-serif;
	font-size: 14px;
	color: var(--trust-text-muted);
}

/* ==========================================================================
   Feature List - Horizontal 4-Column Grid (Desktop)
   ========================================================================== */

.only-trust-popup__features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}

.only-trust-popup__feature {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	padding: 14px 8px;
	background: var(--trust-bg-secondary);
	border-radius: var(--trust-radius-sm);
	border: 1px solid var(--trust-border);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.only-trust-popup__feature:hover {
	transform: translateY(-2px);
	border-color: var(--trust-accent);
	box-shadow: 0 4px 12px rgba(255, 107, 53, 0.1);
}

.only-trust-popup__feature-icon {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--trust-success-light);
	border-radius: 50%;
	color: var(--trust-success);
}

.only-trust-popup__feature-icon svg {
	width: 18px;
	height: 18px;
}

.only-trust-popup__feature-content {
	flex: 1;
}

.only-trust-popup__feature-title {
	font-family: 'Roboto Flex', sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--trust-primary);
	margin: 0;
}

.only-trust-popup__feature-desc {
	display: none; /* Hide descriptions in horizontal mode for cleaner look */
}

/* ==========================================================================
   Stats Grid
   ========================================================================== */

.only-trust-popup__stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin-bottom: 16px;
}

.only-trust-popup__stat {
	text-align: center;
	padding: 16px 12px;
	background: linear-gradient(135deg, var(--trust-bg-secondary) 0%, #FFFFFF 100%);
	border: 1px solid var(--trust-border);
	border-radius: var(--trust-radius-sm);
}

.only-trust-popup__stat-value {
	display: block;
	font-family: 'DM Serif Display', Georgia, serif;
	font-size: 24px;
	font-weight: 400;
	color: var(--trust-accent);
	line-height: 1.2;
}

.only-trust-popup__stat-label {
	display: block;
	font-family: 'Roboto Flex', sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: var(--trust-text-muted);
	margin-top: 4px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* ==========================================================================
   Trust Badges
   ========================================================================== */

.only-trust-popup__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--trust-border);
}

.only-trust-popup__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: var(--trust-success-light);
	border-radius: 50px;
	font-family: 'Roboto Flex', sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #15803d;
}

.only-trust-popup__badge svg {
	width: 14px;
	height: 14px;
}

/* ==========================================================================
   CTA Button
   ========================================================================== */

.only-trust-popup__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 14px 24px;
	margin-top: 16px;
	background: var(--trust-accent);
	border: none;
	border-radius: 10px;
	font-family: 'Roboto Flex', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #FFFFFF;
	cursor: pointer;
	transition: all 0.25s ease;
	text-decoration: none;
}

.only-trust-popup__cta:hover {
	background: #E55A2B;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
}

.only-trust-popup__cta svg {
	width: 18px;
	height: 18px;
}

/* ==========================================================================
   Quote/Promise Block
   ========================================================================== */

.only-trust-popup__promise {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 20px;
	margin-top: 16px;
	background: linear-gradient(135deg, #FFF7ED 0%, #FFFBEB 100%);
	border-radius: var(--trust-radius-sm);
	border: 1px solid rgba(255, 107, 53, 0.15);
}

.only-trust-popup__promise-icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	background: linear-gradient(135deg, var(--trust-accent) 0%, #FF8B5A 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 10px rgba(255, 107, 53, 0.25);
}

.only-trust-popup__promise-icon svg {
	width: 18px;
	height: 18px;
	color: #FFFFFF;
}

.only-trust-popup__promise-content {
	flex: 1;
}

.only-trust-popup__promise-text {
	font-family: 'Roboto Flex', sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--trust-primary);
	margin: 0;
	font-style: italic;
}

.only-trust-popup__promise-author {
	font-family: 'Roboto Flex', sans-serif;
	font-size: 12px;
	font-weight: 600;
	color: var(--trust-accent);
	margin: 6px 0 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

.only-trust-popup__promise-author::before {
	content: '';
	width: 12px;
	height: 2px;
	background: var(--trust-accent);
	opacity: 0.5;
}

/* ==========================================================================
   Payment Methods Grid (for Secure Payments)
   ========================================================================== */

.only-trust-popup__payment-methods {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin: 20px 0;
}

.only-trust-popup__payment-method {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 40px;
	background: #FFFFFF;
	border: 1px solid var(--trust-border);
	border-radius: 8px;
	padding: 6px;
	transition: all 0.2s ease;
}

.only-trust-popup__payment-method:hover {
	border-color: var(--trust-accent);
	transform: scale(1.05);
}

.only-trust-popup__payment-method img,
.only-trust-popup__payment-method svg {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* ==========================================================================
   Delivery Timeline (for Shipping)
   ========================================================================== */

.only-trust-popup__timeline {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 12px 0;
	position: relative;
}

.only-trust-popup__timeline::before {
	content: '';
	position: absolute;
	left: 11px;
	top: 18px;
	bottom: 18px;
	width: 2px;
	background: linear-gradient(to bottom, var(--trust-accent), var(--trust-success));
	border-radius: 1px;
}

.only-trust-popup__timeline-step {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 6px 0;
	position: relative;
}

.only-trust-popup__timeline-dot {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	background: #FFFFFF;
	border: 2px solid var(--trust-accent);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
}

.only-trust-popup__timeline-dot svg {
	width: 12px;
	height: 12px;
	color: var(--trust-accent);
}

.only-trust-popup__timeline-step:last-child .only-trust-popup__timeline-dot {
	border-color: var(--trust-success);
	background: var(--trust-success-light);
}

.only-trust-popup__timeline-step:last-child .only-trust-popup__timeline-dot svg {
	color: var(--trust-success);
}

.only-trust-popup__timeline-content {
	flex: 1;
	padding-top: 2px;
}

.only-trust-popup__timeline-title {
	font-family: 'Roboto Flex', sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: var(--trust-primary);
	margin: 0;
	display: inline;
}

.only-trust-popup__timeline-desc {
	font-family: 'Roboto Flex', sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: var(--trust-text-muted);
	margin: 0;
	display: inline;
}

.only-trust-popup__timeline-desc::before {
	content: ' — ';
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
	.only-trust-popup__header {
		padding: 20px 20px 0;
	}
	
	.only-trust-popup__content {
		padding: 20px;
	}
	
	.only-trust-popup__icon {
		width: 60px;
		height: 60px;
	}
	
	.only-trust-popup__icon svg {
		width: 28px;
		height: 28px;
	}
	
	.only-trust-popup__title {
		font-size: 22px;
	}
	
	.only-trust-popup__stats {
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
	}
	
	.only-trust-popup__stat {
		padding: 12px 8px;
	}
	
	.only-trust-popup__stat-value {
		font-size: 20px;
	}
	
	.only-trust-popup__stat-label {
		font-size: 10px;
	}
	
	.only-trust-popup__features {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.only-trust-popup__feature {
		padding: 12px 10px;
	}
	
	.only-trust-popup__feature-icon {
		width: 28px;
		height: 28px;
	}
	
	.only-trust-popup__feature-icon svg {
		width: 16px;
		height: 16px;
	}
	
	.only-trust-popup__feature-title {
		font-size: 11px;
	}
	
	.only-trust-popup__payment-methods {
		gap: 8px;
	}
	
	.only-trust-popup__payment-method {
		width: 56px;
		height: 36px;
	}
}

@media (max-width: 480px) {
	.only-trust-popup__close {
		top: 12px;
		right: 12px;
		width: 32px;
		height: 32px;
	}
	
	.only-trust-popup__close svg {
		width: 16px;
		height: 16px;
	}
}

/* ==========================================================================
   Accessibility - Focus Styles
   ========================================================================== */

.only-trust-popup__close:focus-visible,
.only-trust-popup__cta:focus-visible {
	outline: 2px solid var(--trust-accent);
	outline-offset: 2px;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.only-trust-popup-overlay,
	.only-trust-popup,
	.only-trust-popup__feature,
	.only-trust-popup__cta,
	.only-trust-popup__close,
	.only-trust-popup__icon {
		transition: none;
		animation: none;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.only-trust-popup,
	.only-trust-popup-overlay {
		display: none !important;
	}
}

