/**
 * Escored Betslip (Accumulator) Styles
 * Standalone betslip/accumulator system styles
 * Independent from prediction-builder
 * 
 * @package Escored
 * @since   1.0.0
 */

/* ================================================
   Checkbox (for adding matches to betslip)
   ================================================ */

.escored-betslip-checkbox,
.acca-match-checkbox {
	width: 20px;
	height: 20px;
	cursor: pointer;
	accent-color: var(--theme-palette-color-1, #0073aa);
	transition: all 0.2s ease;
        /* background: var(--theme-palette-color-8);
    -webkit-appearance: none;
    border-radius: 4px; */
}

.escored-betslip-checkbox:hover,
.acca-match-checkbox:hover {
	transform: scale(1.15);
}

.escored-betslip-checkbox:checked,
.acca-match-checkbox:checked {
	animation: checkbox-bounce 0.3s ease;
}

@keyframes checkbox-bounce {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.2); }
}

/* Match in betslip indicator */
.prediction-builder-tip.in-betslip,
.match-tip-item.in-betslip,
.prediction-builder-tip.in-acca,
.match-tip-item.in-acca {
	background: rgba(0, 115, 170, 0.05);
	border-left: 3px solid var(--theme-palette-color-1, #0073aa);
}

.prediction-builder-tip.in-betslip .match-modern__acca-checkbox-floating,
.prediction-builder-tip.in-acca .match-modern__acca-checkbox-floating {
	background: rgba(40, 167, 69, 0.1);
	border: 1px solid rgba(40, 167, 69, 0.3);
}

.prediction-builder-tip.in-betslip .escored-betslip-checkbox,
.prediction-builder-tip.in-betslip .acca-match-checkbox,
.prediction-builder-tip.in-acca .acca-match-checkbox {
	accent-color: #28a745;
}

/* ================================================
   Floating Button
   ================================================ */

.escored-betslip__button,
.prediction-builder__acca-button {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 64px;
	height: 64px;
	background: linear-gradient(135deg, var(--theme-palette-color-1, #0073aa) 0%, #8b5cf6 100%);
	color: white;
	border: none;
	border-radius: 50%;
	box-shadow: 0 4px 20px rgba(0, 115, 170, 0.4);
	cursor: pointer;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	animation: betslip-button-appear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes betslip-button-appear {
	from {
		transform: scale(0) rotate(-180deg);
		opacity: 0;
	}
	to {
		transform: scale(1) rotate(0deg);
		opacity: 1;
	}
}

.escored-betslip__button:hover,
.prediction-builder__acca-button:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 28px rgba(0, 115, 170, 0.5);
}

.escored-betslip__button:active,
.prediction-builder__acca-button:active {
	transform: scale(0.95);
}

.escored-betslip__button svg,
.prediction-builder__acca-button svg {
	animation: betslip-button-pulse 2s ease-in-out infinite;
}

@keyframes betslip-button-pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.8;
		transform: scale(1.05);
	}
}

/* Badge counter */
.escored-betslip__badge,
.acca-button__badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	background: #dc3545;
	color: white;
	border: 3px solid white;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: badge-bounce 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes badge-bounce {
	0% {
		transform: scale(0);
	}
	50% {
		transform: scale(1.2);
	}
	100% {
		transform: scale(1);
	}
}

/* ================================================
   Panel (Floating Sidebar)
   ================================================ */

.escored-betslip__panel,
.prediction-builder__acca-panel {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 360px;
	max-height: 600px;
	background: white;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	display: flex;
	flex-direction: column;
	border: 2px solid var(--theme-palette-color-7, #e0e0e0);
	overflow: hidden;
	animation: betslip-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes betslip-slide-in {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Header */
.escored-betslip__header,
.acca-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
    background: linear-gradient(135deg, var(--theme-palette-color-1, #0073aa) 0%, var(--theme-palette-color-2, #005a87) 100%);	color: white;
	border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.escored-betslip__title,
.acca-panel__title {
	display: flex;
	align-items: center;
    color: #fff;
	gap: 10px;
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	flex: 1;
}

.escored-betslip__title svg,
.acca-panel__title svg {
	flex-shrink: 0;
}

.escored-betslip__count,
.acca-panel__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 14px;
	font-size: 14px;
	font-weight: 700;
}

.escored-betslip__close,
.acca-panel__close {
	background: transparent;
	border: none;
	color: white;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.escored-betslip__close:hover,
.acca-panel__close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: rotate(90deg);
}

/* Content */
.escored-betslip__content,
.acca-panel__content {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
    background: var(--theme-palette-color-5);
}

/* Empty state */
.escored-betslip__empty,
.acca-panel__empty {
	text-align: center;
	padding: 40px 20px;
	color: var(--theme-palette-color-2, #999);
}

.escored-betslip__empty svg,
.acca-panel__empty svg {
	opacity: 0.3;
	margin-bottom: 16px;
}

.escored-betslip__empty p,
.acca-panel__empty p {
	font-size: 14px;
	line-height: 1.6;
	margin: 0;
}

/* ================================================
   Selections List
   ================================================ */

.escored-betslip__selections,
.acca-panel__selections {
	margin-bottom: 16px;
}

.escored-betslip-selection,
.acca-selection {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	background: var(--theme-palette-color-6, #f9f9f9);
	border: 1px solid var(--theme-palette-color-7, #e0e0e0);
	border-radius: 8px;
	margin-bottom: 8px;
	position: relative;
	transition: all 0.2s ease;
}

.escored-betslip-selection:hover,
.acca-selection:hover {
	background: var(--theme-palette-color-7, #f0f0f0);
	border-color: var(--theme-palette-color-3, #0073aa);
}

.escored-betslip-selection__number,
.acca-selection__number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: var(--theme-palette-color-1, #0073aa);
	color: white;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
}

.escored-betslip-selection__info,
.acca-selection__info {
	flex: 1;
	min-width: 0;
}

.escored-betslip-selection__match,
.acca-selection__match {
	font-size: 13px;
	font-weight: 600;
	color: var(--theme-palette-color-1, #333);
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.escored-betslip-selection__match--link,
.acca-selection__match--link {
	color: var(--theme-palette-color-1, #0073aa);
	text-decoration: none;
	transition: all 0.2s ease;
	display: block;
}

.escored-betslip-selection__match--link:hover,
.acca-selection__match--link:hover {
	color: var(--theme-palette-color-3, #005a87);
	text-decoration: underline;
}

.escored-betslip-selection__tip,
.acca-selection__tip {
	font-size: 12px;
	color: var(--theme-palette-color-3, #666);
	margin-bottom: 2px;
}

.escored-betslip-selection__odd,
.acca-selection__odd {
	font-size: 14px;
	font-weight: 700;
	color: var(--theme-palette-color-1, #0073aa);
}

.escored-betslip-selection__remove,
.acca-selection__remove {
	background: transparent;
	border: none;
	color: var(--theme-palette-color-3, #999);
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.escored-betslip-selection__remove:hover,
.acca-selection__remove:hover {
	background: #dc3545;
	color: white;
	transform: scale(1.1);
}

/* ================================================
   Statistics
   ================================================ */

.escored-betslip__stats,
.acca-panel__stats {
	background: var(--theme-palette-color-6, #f9f9f9);
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 16px;
}

.escored-betslip-stat,
.acca-stat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--theme-palette-color-7, #e0e0e0);
}

.escored-betslip-stat:last-child,
.acca-stat:last-child {
	border-bottom: none;
}

.escored-betslip-stat__label,
.acca-stat__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--theme-palette-color-3, #666);
}

.escored-betslip-stat__value,
.acca-stat__value {
	font-size: 16px;
	font-weight: 700;
	color: var(--theme-palette-color-1, #333);
}

.escored-betslip-stat__value--odds,
.acca-stat__value--odds {
	color: var(--theme-palette-color-1, #0073aa);
	font-size: 18px;
}

.escored-betslip-stat__value--prob,
.acca-stat__value--prob {
	color: var(--theme-palette-color-2, #666);
}

.escored-betslip-stat__value--win,
.acca-stat__value--win {
	color: #28a745;
	font-size: 20px;
}

.escored-betslip-stat--highlight,
.acca-stat--highlight {
	background: rgba(40, 167, 69, 0.1);
	margin: 0 -16px -16px -16px;
	padding: 12px 16px;
	border-radius: 0 0 12px 12px;
	border-top: 2px solid rgba(40, 167, 69, 0.2);
}

.escored-betslip-stat__stake-input,
.acca-stat__stake-input {
	width: 100px;
	padding: 6px 10px;
	border: 2px solid var(--theme-palette-color-7, #ddd);
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	text-align: right;
	color: var(--theme-palette-color-1, #333);
}

.escored-betslip-stat__stake-input:focus,
.acca-stat__stake-input:focus {
	outline: none;
	border-color: var(--theme-palette-color-1, #0073aa);
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* ================================================
   Actions (Buttons)
   ================================================ */

.escored-betslip__actions,
.acca-panel__actions {
	display: flex;
	gap: 10px;
}

.escored-betslip__btn,
.acca-panel__btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	border: 2px solid var(--theme-palette-color-7, #ddd);
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.escored-betslip__btn--copy,
.acca-panel__btn--copy {
	background: var(--theme-palette-color-1, #0073aa);
	color: white;
	border-color: var(--theme-palette-color-1, #0073aa);
}

.escored-betslip__btn--copy:hover,
.acca-panel__btn--copy:hover {
	background: var(--theme-palette-color-3, #005a87);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.escored-betslip__btn--clear,
.acca-panel__btn--clear {
	background: white;
	color: var(--theme-palette-color-2, #666);
	border-color: var(--theme-palette-color-7, #ddd);
}

.escored-betslip__btn--clear:hover,
.acca-panel__btn--clear:hover {
	background: #dc3545;
	color: white;
	border-color: #dc3545;
	transform: translateY(-2px);
}

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

@media (max-width: 768px) {
	.escored-betslip-checkbox,
	.acca-match-checkbox {
		width: 18px;
		height: 18px;
	}
	
	.escored-betslip__button,
	.prediction-builder__acca-button {
		right: 15px;
		bottom: 15px;
		width: 56px;
		height: 56px;
	}
	
	.escored-betslip__button svg,
	.prediction-builder__acca-button svg {
		width: 22px;
		height: 22px;
	}
	
	.escored-betslip__badge,
	.acca-button__badge {
		min-width: 22px;
		height: 22px;
		font-size: 11px;
	}
	
	.escored-betslip__panel,
	.prediction-builder__acca-panel {
		right: 10px;
		bottom: 10px;
		width: 320px;
		max-height: 500px;
	}
	
	.escored-betslip__header,
	.acca-panel__header {
		padding: 12px 16px;
	}
	
	.escored-betslip__title,
	.acca-panel__title {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.escored-betslip-checkbox,
	.acca-match-checkbox {
		width: 16px;
		height: 16px;
	}
	
	.escored-betslip__button,
	.prediction-builder__acca-button {
		right: 10px;
		bottom: 10px;
		width: 50px;
		height: 50px;
	}
	
	.escored-betslip__button svg,
	.prediction-builder__acca-button svg {
		width: 20px;
		height: 20px;
	}
	
	.escored-betslip__badge,
	.acca-button__badge {
		min-width: 20px;
		height: 20px;
		font-size: 10px;
		top: -3px;
		right: -3px;
		border-width: 2px;
	}
	
	.escored-betslip__panel,
	.prediction-builder__acca-panel {
		right: 5px;
		left: 5px;
		bottom: 5px;
		width: auto;
		max-width: 100%;
		max-height: 400px;
	}
	
	.escored-betslip__content,
	.acca-panel__content {
		padding: 12px;
	}
	
	.escored-betslip__actions,
	.acca-panel__actions {
		flex-direction: column;
	}
	
	.escored-betslip__btn,
	.acca-panel__btn {
		width: 100%;
	}
}

