.this-or-that{
	width: 100%;
	min-height: 200px;
	margin: 1em 0;
	display: block;
	background-image: url('../img/seperat_or.png');
	background-repeat: no-repeat;
	background-position: 50% 35%;
}

.this-or-that:before,
.this-or-that:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.this-or-that:after {
    clear: both;
}

.this-or-that_column{
	width: 50%;
	min-height: 100px;
	float: left;
	display: block;
	margin: 0;
}

.this-or-that_column .this-or-that_item{ margin: 0 10% 0 0; }
.this-or-that_column:last-child .this-or-that_item{ margin: 0 0 0 10%; }

.this-or-that_column .this-or-that_item{
	text-align: center;
	opacity: 1;
	position: relative;
}

.this-or-that_column .this-or-that_item.selected{
	transition: all .4s ease;
	transform: scale(1.4);
	opacity: 0;
}

.this-or-that_thumbwrapper{
	padding: 0%;
	overflow: hidden;
	display: block;
	transition: box-shadow .2s ease,
				transform .3s ease;
	-webkit-transition: box-shadow .2s ease,
						-webkit-transform .3s ease;
	position: relative;
	margin-bottom: 20px; /* More breathing room */
}

.this-or-that_thumbwrapper:hover{
	/* box-shadow: 2px 4px 8px rgba(0,0,0,0.3); */
	transform: scale(1.03); /* Smaller scale to avoid text jostling */
}

.this-or-that_thumbwrapper:hover a img {
	/* Remove individual image scaling */
}

.this-or-that_thumbwrapper a img{
	display: block;
	width: 100%;
	max-width: 256px !important;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	border-radius: 10px;
}

/* Remove focus/active states that create the black box */
.this-or-that_thumbwrapper a:focus,
.this-or-that_thumbwrapper a:active,
.this-or-that_thumbwrapper a:focus img,
.this-or-that_thumbwrapper a:active img,
.this-or-that-btn:focus,
.this-or-that-btn:active {
	outline: none !important;
	border: none !important;
	box-shadow: none !important;
	background: none !important;
}

.this-or-that_thumbwrapper a{
	display: flex;
    justify-content: center;
    align-items: center;
	margin: 0;
	padding: 0;
}

.this-or-that h3{
	margin: 5px 0;
	padding: 0;
	font-size: 20px;
}
.this-or-that h3 a{
	text-decoration: none;
}

.this-or-that.round .this-or-that_thumbwrapper,
.this-or-that.round .this-or-that_thumbwrapper a img{
		border-radius: 100%;
}

.this-or-that:has(.vote-limit-reached) {
    background-image: none !important;
}

/* Rating Delta Animation Styles - overlay on image */
.rating-display {
	position: relative;
	display: inline-block;
}

.rating-delta {
	position: absolute;
	bottom: 10px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100;
	opacity: 0;
	transition: all 0.3s ease;
	white-space: nowrap;
	pointer-events: none; /* Don't interfere with image clicks */
}

.this-or-that_thumbwrapper {
	position: relative; /* Needed for absolute positioning of deltas */
}

.this-or-that_thumbwrapper .rating-delta {
	position: absolute;
	bottom: 10px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100;
	opacity: 0;
	transition: all 0.3s ease;
	white-space: nowrap;
	pointer-events: none;
	display: block !important; /* Override PHP's display: none */
}

.this-or-that_thumbwrapper .rating-delta.show {
	opacity: 1;
}

.delta-indicator {
	display: inline-block;
	padding: 4px 8px; /* Reduced padding for narrower width */
	border-radius: 4px; /* Smaller border radius */
	font-weight: bold;
	font-size: 12px; /* Slightly smaller font */
	color: white;
	min-width: 35px; /* Reduced min-width */
	text-align: center;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.delta-indicator.positive {
	background: linear-gradient(135deg, #22c55e, #16a34a);
	animation: bounce-in 0.6s ease;
}

.delta-indicator.negative {
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	animation: bounce-in 0.6s ease;
}

.rating-value {
	transition: all 0.5s ease;
}

.rating-value.updating {
	font-weight: bold;
}

/* Different colors for winner vs loser rating text */
.winner .rating-value.updating {
	color: #22c55e; /* Green for winner */
}

.loser .rating-value.updating {
	color: #3b82f6; /* Blue for loser */
}

/* Winner celebration effect - no scaling to avoid black box artifacts */
.this-or-that_item.winner {
	/* Remove scaling animation entirely to prevent black box rendering issues */
}

.this-or-that_item.loser {
	/* Don't fade the entire item anymore */
}

.this-or-that_item.loser .this-or-that_thumbwrapper {
	opacity: 0.6; /* Fade only the image container, not the text */
}

@keyframes bounce-in {
	0% {
		transform: scale(0);
		opacity: 0;
	}
	50% {
		transform: scale(1.3);
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes winner-pulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.01); /* Much more subtle pulse */
	}
	100% {
		transform: scale(1);
	}
}

@keyframes loser-fade {
	0% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
	100% {
		opacity: 1;
	}
}

/* Counter animation for rolling numbers */
@keyframes number-roll {
	0% {
		transform: translateY(-10px);
		opacity: 0;
	}
	100% {
		transform: translateY(0);
		opacity: 1;
	}
}

.rating-value.rolling {
	animation: number-roll 0.3s ease;
}

/* Listings */
ol.this_that_ranking_list, ol.this_that_ranking_list li{
	list-style-type: none;
	margin: 0;
	padding: 0;
}

.this_that_ranking_list li:before,
.this_that_ranking_list li:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.this_that_ranking_list li:after {
    clear: both;
}

.this_that_ranking_list .thisorthat_right h3{
	margin: 0;
	padding: 0;
}

.this_that_ranking_list .thisorthat_left{
	display: block;
	float: left;
	width: 30%;
}
.this_that_ranking_list .thisorthat_left .thisorthat_thumb{
	margin: 0 2em 2em 0;
}
.this_that_ranking_list .thisorthat_right{
	display: block;
	float: left;
	width: 70%;
}

.this_that_ranking_list .thisorthat_meta{
	margin: .5em 0;
	font-size: .875em;
}

.thisorthat_rating, .thisorthat_wins{
	border-right: 1px solid #ccc;
	padding-right: .5em;
	margin-right: .5em;
}

.vote-limit-reached {
    background: #2a2a2a;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    color: #e0e0e0;
}

.vote-limit-reached p {
    margin: 5px 0;
    color: #e0e0e0;
}

.vote-limit-reached strong {
    color: #ffa726;
}

/* Tier Header Styles */
.this_that_ranking_list .tier-header {
    margin: 1em 0 0.5em 0;
    padding: 0;
}

.this_that_ranking_list .tier-header:first-child {
    margin-top: 0;
}

.tier-title {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin: 0;
    padding: 0.3em;
    border-radius: 4px;
    text-transform: uppercase;
    color: white;
}

/* Tier-specific styling */
.tier-ss { background: #A855F7; }  /* Vibrant purple - reserved for future SS tier */
.tier-s { background: #DC2626; }   /* Red - premium tier */
.tier-a { background: #F97316; }   /* Orange - high tier */
.tier-b { background: #EAB308; }   /* Yellow - good tier */
.tier-c { background: #84CC16; }   /* Lime green - decent tier */
.tier-d { background: #10B981; }   /* Blue-green - below average */
.tier-e { background: #06B6D4; }   /* Cyan - poor tier */
.tier-f { background: #1D4ED8; }   /* Dark blue - bottom tier */

/* Trend arrow graphics */
.trend-indicator {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 6px;
	vertical-align: middle;
	position: relative;
}

.trend-up {
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-bottom: 7px solid #22c55e;
}

.trend-up-strong {
	width: 10px;
	height: 14px;
	position: relative;
}

.trend-up-strong::before,
.trend-up-strong::after {
	content: '';
	position: absolute;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-bottom: 7px solid #22c55e;
	left: 0;
}

.trend-up-strong::before {
	top: 0;
}

.trend-up-strong::after {
	top: 7px;
}

.trend-down {
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 7px solid #ef4444;
}

.trend-down-strong {
	width: 10px;
	height: 14px;
	position: relative;
}

.trend-down-strong::before,
.trend-down-strong::after {
	content: '';
	position: absolute;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 7px solid #ef4444;
	left: 0;
}

.trend-down-strong::before {
	top: 0;
}

.trend-down-strong::after {
	top: 7px;
}

.trend-neutral {
	width: 10px;
	height: 3px;
	border: none;
	background-color: #6b7280;
	vertical-align: middle;
}