/**
 * FashionPoint Booking - Cart Button & Modal Styles
 *
 * @since 2.5.0
 */

/* ==========================================================================
	Cart Button & Modal
	========================================================================== */

/* Footer Cart Button */
.fp-booking__footer {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
	min-height: 80px;
	box-sizing: border-box;
}

.fp-booking__cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 32px;
	background: white;
	border: 2px solid var(--fp-primary);
	border-radius: 999px;
	color: var(--fp-primary);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.25s ease;
	white-space: nowrap;
	min-width: 140px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	line-height: 1;
}

.fp-booking__cart:hover {
	background: var(--fp-primary);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(var(--fp-primary-rgb), 0.3);
}

.fp-booking__cart svg {
	width: 20px;
	height: 20px;
}

.fp-booking__cart-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	background: var(--fp-primary);
	color: white;
	font-size: 13px;
	font-weight: 700;
	border-radius: 12px;
	line-height: 1;
	visibility: hidden;
}

.fp-booking__cart:hover .fp-booking__cart-badge {
	background: white;
	color: var(--fp-primary);
}

/* Ensure both buttons have identical sizing */
.fp-booking__cart,
.fp-booking__next {
	flex: 1 1 45%;
	min-width: 140px;
}

@media (max-width: 767px) {
	.fp-booking__cart {
		padding: 12px 28px;
		font-size: 14px;
		min-width: 120px;
	}
	
	.fp-booking__cart,
	.fp-booking__next {
		flex: 1 1 45%;
		min-width: 120px;
	}
}

/* ==========================================================================
	Cart Modal - Modern Clean Design
	========================================================================== */

.fp-cart-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483647;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.fp-cart-modal.is-visible {
	display: flex;
}

.fp-cart-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: transparent;
	cursor: pointer;
}

.fp-cart-modal__content {
	position: relative;
	width: 100%;
	max-width: 540px;
	max-height: 85vh;
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.fp-cart-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem 1.5rem 1rem;
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border-bottom: 1px solid #f1f3f4;
	gap: 1rem;
}

.fp-cart-modal__header h3 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a1a1a;
	letter-spacing: -0.02em;
}

.fp-cart-modal__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: #f8f9fa;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	color: #6b7280;
}

.fp-cart-modal__close:hover {
	background: #e5e7eb;
	color: #374151;
	transform: scale(1.05);
}

.fp-cart-modal__close:active {
	transform: scale(0.95);
}

.fp-cart-modal__body {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem;
	background: #fafbfc;
}

.fp-cart-modal__body::-webkit-scrollbar {
	width: 6px;
}

.fp-cart-modal__body::-webkit-scrollbar-track {
	background: transparent;
}

.fp-cart-modal__body::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 3px;
}

.fp-cart-modal__body::-webkit-scrollbar-thumb:hover {
	background: #9ca3af;
}

.fp-cart-section {
	margin: 0 0 1rem 0;
	padding: 1.25rem;
	background: #ffffff;
	border-radius: 16px;
	border: 1px solid #f1f3f4;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-cart-section--clickable {
	cursor: pointer;
}

.fp-cart-section--clickable:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
	border-color: rgba(247, 197, 86, 0.3);
	background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
}

.fp-cart-section--clickable:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.fp-cart-section:last-child {
	margin-bottom: 0;
}

.fp-cart-section__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.fp-cart-section h4 {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.fp-cart-section h4::before {
	content: '';
	width: 3px;
	height: 16px;
	background: linear-gradient(135deg, #f7c556 0%, #f4b400 100%);
	border-radius: 2px;
}

.fp-cart-edit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: transparent;
	border: 1px solid var(--fp-border);
	border-radius: 6px;
	cursor: pointer;
	transition: var(--fp-transition);
	color: var(--fp-text-light);
	padding: 0;
}

.fp-cart-edit-btn:hover {
	background: var(--fp-primary);
	border-color: var(--fp-primary);
	color: white;
	transform: translateY(-1px);
}

.fp-cart-edit-btn svg {
	width: 14px;
	height: 14px;
}

.fp-cart-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	margin-bottom: 0.5rem;
	background: #f8f9fa;
	border-radius: 12px;
	border: 1px solid #f1f3f4;
	transition: all 0.2s ease;
}

.fp-cart-item:hover {
	background: #f1f3f4;
}

.fp-cart-item:last-child {
	margin-bottom: 0;
}

.fp-cart-item > svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	color: #f7c556;
	background: rgba(247, 197, 86, 0.1);
	padding: 4px;
	border-radius: 8px;
}

/* ── Service/Package item with icon | body | remove ── */
.fp-cart-item--service {
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 0.75rem;
}

.fp-cart-item__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: rgba(247, 197, 86, 0.1);
	color: #f7c556;
}

.fp-cart-item__icon svg {
	width: 14px;
	height: 14px;
}

.fp-cart-item__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.fp-cart-item__name {
	font-size: 0.9rem;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.3;
	letter-spacing: -0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fp-cart-item__meta {
	display: flex;
	align-items: center;
	gap: 0;
	font-size: 0.8rem;
	color: #6b7280;
	font-weight: 500;
	line-height: 1;
}

.fp-cart-item__dur {
	color: #6b7280;
}

.fp-cart-item__dur + .fp-cart-item__price::before {
	content: '·';
	margin: 0 0.4rem;
	color: #d1d5db;
	font-weight: 700;
}

.fp-cart-item__price {
	color: #374151;
	font-weight: 600;
}

/* Remove button */
.fp-cart-item__remove {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: none;
	background: transparent;
	border-radius: 6px;
	cursor: pointer;
	color: #9ca3af;
	transition: all 0.15s ease;
	padding: 0;
}

.fp-cart-item__remove:hover {
	background: #fee2e2;
	color: #dc2626;
}

.fp-cart-item__remove:active {
	transform: scale(0.9);
}

/* ── Totals row ── */
.fp-cart-totals {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem;
	margin-top: 0.25rem;
	border-top: 1px solid #e5e7eb;
}

.fp-cart-totals__label {
	font-size: 0.85rem;
	font-weight: 700;
	color: #374151;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.fp-cart-totals__values {
	display: flex;
	align-items: center;
	gap: 0;
	font-size: 0.85rem;
}

.fp-cart-totals__dur {
	color: #6b7280;
	font-weight: 500;
}

.fp-cart-totals__dur + .fp-cart-totals__price::before {
	content: '·';
	margin: 0 0.4rem;
	color: #d1d5db;
	font-weight: 700;
}

.fp-cart-totals__price {
	color: #1a1a1a;
	font-weight: 700;
}

.fp-cart-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 3rem 2rem;
	text-align: center;
	color: #6b7280;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border-radius: 16px;
	border: 2px dashed #e2e8f0;
}

.fp-cart-empty svg {
	width: 64px;
	height: 64px;
	color: #cbd5e1;
	margin-bottom: 1.5rem;
	background: #f8fafc;
	padding: 1rem;
	border-radius: 50%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.fp-cart-empty p {
	margin: 0 0 0.75rem 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: #374151;
	letter-spacing: -0.01em;
}

.fp-cart-empty small {
	font-size: 0.925rem;
	color: #6b7280;
	line-height: 1.5;
}

.fp-cart-modal__footer {
	display: flex;
	gap: 1rem;
	padding: 1.5rem;
	background: #ffffff;
	border-top: 1px solid #f1f3f4;
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.02);
}

/* Clear cart confirmation overlay inside modal */
.fp-cart-confirm {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.fp-cart-confirm__content {
	background: white;
	border-radius: 14px;
	padding: 1.25rem 1.5rem;
	max-width: 360px;
	width: 90%;
	box-shadow: 0 12px 30px rgba(0,0,0,0.18);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	text-align: center;
}

.fp-cart-confirm__content h4 {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
}

.fp-cart-confirm__content p {
	margin: 0;
	color: var(--fp-text-light);
	font-size: 0.95rem;
}

.fp-cart-confirm__actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.fp-cart-confirm__cancel,
.fp-cart-confirm__confirm {
	flex: 1;
	padding: 0.85rem 1rem;
	border-radius: var(--fp-radius-lg);
	border: 1px solid transparent;
	font-weight: 700;
	cursor: pointer;
	transition: var(--fp-transition);
}

.fp-cart-confirm__cancel {
	background: var(--fp-surface);
	color: var(--fp-text);
	border-color: var(--fp-border);
}

.fp-cart-confirm__cancel:hover {
	background: var(--fp-border);
}

.fp-cart-confirm__confirm {
	background: var(--fp-error);
	color: white;
}

.fp-cart-confirm__confirm:hover {
	background: #d92b2b;
}

.fp-cart-modal__clear,
.fp-cart-modal__continue {
	flex: 1;
	padding: 1rem 1.5rem;
	border: none;
	border-radius: 12px;
	font-size: 0.925rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
	letter-spacing: 0.01em;
}

.fp-cart-modal__clear::before,
.fp-cart-modal__continue::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	transition: left 0.5s;
}

.fp-cart-modal__clear:hover::before,
.fp-cart-modal__continue:hover::before {
	left: 100%;
}

.fp-cart-modal__clear {
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	color: #475569;
	border: 1px solid #e2e8f0;
}

.fp-cart-modal__clear:hover {
	background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
	color: #dc2626;
	border-color: #fca5a5;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
}

.fp-cart-modal__continue {
	background: linear-gradient(135deg, #f7c556 0%, #f4b400 100%);
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(247, 197, 86, 0.3);
}

.fp-cart-modal__continue:hover {
	background: linear-gradient(135deg, #f4b400 0%, #f59e0b 100%);
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(247, 197, 86, 0.4);
}

.fp-cart-modal__clear:active,
.fp-cart-modal__continue:active {
	transform: translateY(0);
}

@media (max-width: 640px) {
	.fp-cart-modal {
		padding: 0;
		background: rgba(0, 0, 0, 0.7);
	}

	.fp-cart-modal__content {
		max-width: 100%;
		max-height: 100vh;
		border-radius: 20px 20px 0 0;
		margin-top: auto;
		animation: slideUpMobile 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	}

	@keyframes slideUpMobile {
		from {
			opacity: 0;
			transform: translateY(100%);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	.fp-cart-modal__header {
		padding: 1.25rem 1.25rem 1rem;
	}

	.fp-cart-modal__header h3 {
		font-size: 1.125rem;
	}

	.fp-cart-modal__close {
		width: 36px;
		height: 36px;
	}

	.fp-cart-modal__body {
		padding: 1.25rem;
	}

	.fp-cart-section {
		padding: 1rem;
		margin-bottom: 0.875rem;
	}

	.fp-cart-item {
		padding: 0.625rem;
		gap: 0.625rem;
	}

	.fp-cart-item > svg {
		width: 16px;
		height: 16px;
		padding: 3px;
	}

	.fp-cart-item--service {
		padding: 0.5rem 0.625rem;
	}

	.fp-cart-item__icon {
		width: 24px;
		height: 24px;
	}

	.fp-cart-item__name {
		font-size: 0.85rem;
	}

	.fp-cart-item__meta {
		font-size: 0.75rem;
	}

	.fp-cart-totals {
		padding: 0.625rem;
		font-size: 0.8rem;
	}

	.fp-cart-modal__footer {
		padding: 1.25rem;
		gap: 0.875rem;
	}

	.fp-cart-modal__clear,
	.fp-cart-modal__continue {
		padding: 0.875rem 1.25rem;
		font-size: 0.9rem;
	}
}
