/* Checkout Page Styles */

body {
	background: #f5f5f5;
}

/* Header styling with glass effect */
.navigation {
	background: rgba(255, 255, 255, 0.8) !important;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navigation .logo-white {
	display: none !important;
}

.navigation .logo-default {
	display: block !important;
}

.navigation .navbar {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

.back-link-header {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 600;
	padding: 8px 20px;
	border-radius: 25px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(155, 17, 30, 0.1);
	white-space: nowrap;
	flex-shrink: 0;
}

.back-link-header:hover {
	background: var(--secondary-color);
	color: white;
}

.back-link-header i {
	font-size: 1.1rem;
}

.checkout-page {
	min-height: 100vh;
	background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
	padding: 120px 0 50px 0;
}

.checkout-container {
	max-width: 900px;
	margin: 0 auto;
	background: white;
	border-radius: 20px;
	padding: 50px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.checkout-header {
	text-align: center;
	margin-bottom: 40px;
}

.checkout-header h1 {
	color: var(--primary-color);
	font-size: 2.5rem;
	margin-bottom: 10px;
	font-weight: 700;
}

.checkout-header p {
	color: #666;
	font-size: 1.1rem;
}

.section-title {
	color: var(--primary-color);
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--secondary-color);
}

.product-summary {
	background: #fafafa;
	border: 2px solid var(--secondary-color);
	border-radius: 15px;
	padding: 30px;
	margin-bottom: 40px;
	margin-top: 10px;
	box-shadow: 0 5px 20px rgba(155, 17, 30, 0.08);
	position: relative;
	overflow: hidden;
}

.product-summary::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(90deg, var(--secondary-color) 0%, var(--promotion-color) 100%);
}

.product-summary h3 {
	color: var(--primary-color);
	margin-bottom: 25px;
	font-size: 1.5rem;
	font-weight: 700;
}

.product-detail {
	display: flex;
	justify-content: space-between;
	margin-bottom: 15px;
	color: #333;
	padding-bottom: 15px;
	border-bottom: 1px solid #e0e0e0;
}

.product-detail:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-top: 15px;
	margin-top: 10px;
	font-size: 1.2rem;
	border-top: 2px solid var(--secondary-color);
}

.product-detail .label {
	font-weight: 600;
	color: #555;
}

.product-detail .value {
	font-weight: bold;
	color: var(--primary-color);
}

.product-detail:last-child .label,
.product-detail:last-child .value {
	color: var(--secondary-color);
}

.total-price {
	font-size: 2rem;
}

.billing-form {
	margin-bottom: 40px;
}

.form-group {
	margin-bottom: 12px;
}

.form-group label {
	display: block;
	color: var(--primary-color);
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 0.95rem;
}

.form-group input {
	width: 100%;
	padding: 12px 15px;
	border: 2px solid #ddd;
	border-radius: 10px;
	font-size: 1rem;
	transition: border-color 0.3s ease;
	background: #f9f9f9;
}

.form-group input:focus {
	outline: none;
	border-color: var(--secondary-color);
	background: white;
}

.form-group input.error {
	border-color: #dc3545;
	background-color: #fff5f5;
}

.error-message {
	display: block;
	color: #dc3545;
	font-size: 0.85rem;
	margin-top: 3px;
	min-height: 18px;
	font-weight: 500;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.payment-section {
	margin-top: 30px;
	text-align: center;
}

.payment-section h3 {
	color: var(--primary-color);
	margin-bottom: 20px;
	font-weight: 600;
}

/* Conferma dati section */
.confirm-data-section {
	margin: 30px 0;
	text-align: center;
}

.confirm-data-button {
	background: linear-gradient(135deg, var(--secondary-color) 0%, var(--promotion-color) 100%);
	color: white;
	border: none;
	padding: 18px 50px;
	font-size: 1.2rem;
	font-weight: bold;
	border-radius: 50px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 5px 20px rgba(155, 17, 30, 0.3);
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.confirm-data-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(155, 17, 30, 0.4);
}

.confirm-data-button:active {
	transform: translateY(0);
}

.confirm-data-button i {
	font-size: 1.4rem;
}

/* Loading spinner */
.loading-spinner {
	margin-top: 20px;
}

.spinner {
	width: 50px;
	height: 50px;
	margin: 0 auto 15px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid var(--secondary-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.loading-spinner p {
	color: #666;
	font-size: 1rem;
	font-weight: 500;
}

/* PayPal buttons initially hidden */
.paypal-button-wrapper {
	margin-top: 20px;
}

/* Alert success message */
.alert-success-checkout {
	background: #e8f5e9;
	color: #388e3c;
	border-left: 4px solid #388e3c;
	padding: 20px;
	border-radius: 10px;
	margin-bottom: 25px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.alert-success-checkout i {
	font-size: 3rem;
	color: #388e3c;
	margin-bottom: 10px;
}

.alert-success-checkout strong {
	font-size: 1.2rem;
	display: block;
	margin-bottom: 8px;
}

.alert-success-checkout p {
	margin: 0;
	color: #2e7d32;
	font-size: 1rem;
}

.paypal-button-container {
	max-width: 400px;
	margin: 0 auto;
}

.btn-submit {
	width: 100%;
	max-width: 400px;
	padding: 15px 40px;
	font-size: 1.1rem;
	font-weight: bold;
}

.back-link {
	display: inline-block;
	margin-top: 20px;
	color: #666;
	text-decoration: none;
	transition: color 0.3s ease;
}

.back-link:hover {
	color: var(--secondary-color);
}

.security-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 20px;
	color: #666;
	font-size: 0.9rem;
}

.security-badge i {
	color: #28a745;
	font-size: 1.2rem;
}

/* Responsive Design */

@media (max-width: 991px) {
	.back-link-header span {
		display: none;
	}

	.back-link-header {
		padding: 8px 12px;
	}
}

@media (max-width: 768px) {
	.back-link-header {
		position: static;
		transform: none;
		margin-top: 15px;
		display: inline-flex;
		width: auto;
	}

	.navigation .navbar {
		flex-direction: row;
		align-items: center;
	}

	.checkout-page {
		padding: 120px 20px 50px 20px;
	}

	.checkout-container {
		padding: 30px 20px;
	}

	.checkout-header h1 {
		font-size: 2rem;
	}

	.product-summary {
		padding: 20px;
	}

	.total-price {
		font-size: 1.5rem;
	}

	.form-row {
		grid-template-columns: 1fr;
	}
}

/* Paypal adaptation */
#paypal-form-fields-container-TKFWDSMR8N8FW .item-header .item-title {
	max-width: calc(70% - 0.75rem) !important;
}

.css-178qcrb {
	width: 80% !important;
	max-width: 80% !important;
}

.css-s2u4oi {
	justify-content: center;
	display: flex;
	max-width: 100%;
	gap: 1.5rem;
}
