/* Character Page Styles */

/* Main Container */
.character-armory {
	max-width: 1200px;
	margin: 0 auto;
	background: var(--bg-dark);
	border: 1px solid var(--border);
	padding: 15px;
}

/* Character Header */
.character-header {
	background: var(--bg-darker);
	border-bottom: 1px solid var(--border);
	padding: 15px;
}

.character-avatar {
	width: 120px;
	height: 150px;
	object-fit: cover;
	border: 2px solid var(--accent);
	flex-shrink: 0;
}

.character-info {
	flex: 1;
	min-width: 0; /* Prevent text overflow */
}

.character-name-section {
	background: var(--bg-dark);
	border: 1px solid var(--border);
	padding: 1rem;
}

.character-details-section {
	background: var(--bg-dark);
	border: 1px solid var(--border);
	padding: 1rem;
}

.character-details {
	font-size: 0.8rem;
}

.character-details span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	margin: 2px 0;
	padding: 0.2rem 0.8rem;
	background: hsl(225 10 20 / 0.5);
	font-size: 0.8rem !important;
	text-transform: uppercase;
	/* border-radius: 3px; */
	border: 1px solid hsl(225 20 25 / 0.5);
}

.character-details span.class-race .color-c1,
.character-details span.class-race .color-c2,
.character-details span.class-race .color-c3,
.character-details span.class-race .color-c4,
.character-details span.class-race .color-c5,
.character-details span.class-race .color-c6,
.character-details span.class-race .color-c7,
.character-details span.class-race .color-c8,
.character-details span.class-race .color-c9,
.character-details span.class-race .color-c10,
.character-details span.class-race .color-c11,
.character-details span.class-race .color-c12,
.character-details span.class-race .color-c13 {
	background: none !important;
	padding: 0 !important;
	border: none !important;
	text-transform: uppercase !important;
}

.character-name {
	font-size: 1.8rem;
	font-weight: 700;
	margin: 0;
	letter-spacing: 1px;
}

.health-bar,
.mana-bar {
	margin: 0;
	padding: 1rem;
	background: var(--bg-darker);
	border-bottom: 1px solid var(--border);
}

.bar-label {
	font-size: 0.9rem;
	font-weight: bold;
	margin-bottom: 8px;
	color: var(--txt-secondary);
	text-transform: uppercase;
}

.progress {
	height: 25px;
	background-color: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--border);
	border-radius: 0;
}

.health-fill {
	background: #3eaf41 !important;
	animation: healthPulse 2s ease-in-out infinite alternate;
	position: relative;
	overflow: hidden;
}

.health-fill::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	animation: shimmer 3s ease-in-out infinite;
}

.mana-fill {
	background: #008cff !important;
	animation: manaPulse 2s ease-in-out infinite alternate;
	position: relative;
	overflow: hidden;
}

.mana-fill::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	animation: shimmer 3s ease-in-out infinite 1s;
}

.animated-bar {
	transition: width 2s ease-out;
}

.bar-text {
	font-size: 1rem;
	line-height: 1.5;
	z-index: 10;
}

/* Health/Mana Animations */
@keyframes healthPulse {
	0% {
		opacity: 0.8;
	}
	100% {
		opacity: 1;
	}
}

@keyframes manaPulse {
	0% {
		opacity: 0.8;
	}
	100% {
		opacity: 1;
	}
}

@keyframes shimmer {
	0% {
		left: -100%;
	}
	100% {
		left: 100%;
	}
}

/* Character Sheet */
.character-sheet {
	padding: 30px;
	background: var(--bg-darker);
}

/* Equipment Container Height Matching */
.equipment-left,
.equipment-right {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Character Sheet Row Height Matching */
.character-sheet .row.h-100 {
	min-height: 600px; /* Ensure consistent minimum height */
}

/* Make all character sheet columns equal height */
.character-sheet .row.h-100 > .col-12,
.character-sheet .row.h-100 > .col-sm-6,
.character-sheet .row.h-100 > .col-lg-3 {
	display: flex;
	flex-direction: column;
}

/* Ensure primary stats and weapons panel fill available height */
.primary-stats,
.weapons-panel {
	height: 100%;
	flex: 1;
}

/* Remove bottom margin from last equipment slot */
.equipment-left .equipment-slot:last-child,
.equipment-right .equipment-slot:last-child {
	margin-bottom: 0 !important;
}

/* Equipment Slot Styling */
.equipment-slot {
	background: var(--bg-dark);
	border: 1px solid var(--border);
	padding: 0.5rem;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.2s;
	flex: 1;
}

.equipment-slot img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 0;
}

.equipment-slot .item {
	width: 70px;
	height: auto;
	border-radius: 0;
}

.equipment-slot:hover {
	border-color: #fff;
}

.weapon-slot {
	background: var(--bg-dark);
	border: 1px solid var(--border);
	text-align: center;
	display: flex;
	transition: border-color 0.2s;
}

.weapon-slot:hover {
	border-color: var(--accent);
}

.weapon-slot .item {
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.weapon-slot img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* Primary Stats Styling */
.primary-stats {
	background: var(--bg-darker);
	border: 1px solid var(--border);
	padding: 0;
	display: flex;
	flex-direction: column;
}

.primary-stats h3 {
	font-size: 1.1rem;
	margin: 0;
	padding: 15px 20px;
	background: var(--bg-dark);
	border-bottom: 1px solid var(--border);
	color: var(--accent);
	text-transform: uppercase;
	font-weight: bold;
}

.primary-stats .stats-list {
	padding: 15px 20px;
	flex-grow: 1;
}

/* Enhanced Weapons Panel */
.weapons-panel {
	background: var(--bg-darker);
	border: 1px solid var(--border);
	padding: 0;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.weapons-panel h3 {
	font-size: 1.1rem;
	margin: 0;
	padding: 15px 20px;
	background: var(--bg-dark);
	border-bottom: 1px solid var(--border);
	color: var(--accent);
	text-transform: uppercase;
	font-weight: bold;
}

.weapons-grid {
	padding: 0.4rem;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.weapons-grid .row {
	flex-grow: 1;
	margin: 0;
}

.weapon-slot-enhanced {
	background: var(--bg-dark);
	border: 1px solid var(--border);
	transition: border-color 0.2s;
	padding: 15px;
	min-height: 80px;
}

.weapon-slot-enhanced:hover {
	border-color: var(--accent);
}

.weapon-slot-enhanced img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.weapon-slot-enhanced .item {
	width: auto;
	height: auto;
}

.stat-name {
	font-weight: 500;
	color: var(--txt-secondary);
	text-transform: uppercase;
	font-size: 0.9rem;
}

.stat-value {
	font-weight: bold;
	color: var(--txt-primary);
	font-size: 0.9rem;
}

/* Stats Bottom Section */
.stats-bottom {
	padding: 20px;
	background: var(--bg-darker);
}

.stats-panel {
	background: var(--bg-darker);
	border: 1px solid var(--border);
	padding: 0;
	margin-bottom: 20px;
}

.stats-panel h3 {
	font-size: 1.1rem;
	margin: 0;
	padding: 15px 20px;
	background: var(--bg-dark);
	border-bottom: 1px solid var(--border);
	color: var(--accent);
	text-transform: uppercase;
	font-weight: bold;
}

.stats-list {
	padding: 15px 20px;
}

.stat-line {
	display: flex;
	justify-content: space-between;
	margin-bottom: 10px;
	font-size: 0.9rem;
	padding: 8px 12px;
	align-items: center;
	border-radius: 4px;
	transition: all 0.2s ease;
	cursor: pointer;
}

.stat-line:hover {
	background-color: var(--bg-dark);
	color: var(--txt-primary) !important;
}

.stat-line:hover span {
	color: var(--txt-primary) !important;
}

.stat-line:last-child {
	margin-bottom: 0;
}

.stat-line span:first-child {
	color: var(--txt-secondary);
}

.stat-line span:last-child {
	font-weight: bold;
	color: var(--txt-primary);
}

.breadcrumb-item + .breadcrumb-item {
	padding-right: 0.2rem !important;
	color: var(--txt-secondary) !important;
}

/* Class Colors */
.color-c1 {
	color: #c79c6e;
} /* Warrior */
.color-c2 {
	color: #f58cba;
} /* Paladin */
.color-c3 {
	color: #abd473;
} /* Hunter */
.color-c4 {
	color: #fff569;
} /* Rogue */
.color-c5 {
	color: #ffffff;
} /* Priest */
.color-c6 {
	color: #c41f3b;
} /* Death Knight */
.color-c7 {
	color: #0070de;
} /* Shaman */
.color-c8 {
	color: #69ccf0;
} /* Mage */
.color-c9 {
	color: #9482c9;
} /* Warlock */
.color-c10 {
	color: #00ff96;
} /* Monk */
.color-c11 {
	color: #ff7d0a;
} /* Druid */
.color-c12 {
	color: #a330c9;
} /* Demon Hunter */

/* Faction Colors */
.alliance {
	color: #0078ff;
}
.horde {
	color: #ff0000;
}

/* Guild Link */
.guild-link {
	text-decoration: none;
}

.guild-link:hover {
	color: #81d4fa;
	text-decoration: underline;
}

/* Three-Column Stats Layout */
@media (min-width: 992px) {
	.stats-bottom .row .col-12.col-lg-4 {
		flex: 0 0 33.333333%;
		max-width: 33.333333%;
	}
}

/* Two-Column Stats Layout for Tablets */
@media (min-width: 768px) and (max-width: 991px) {
	.stats-bottom .row .col-12.col-lg-4:nth-child(3) {
		flex: 0 0 100%;
		max-width: 100%;
		margin-top: 15px;
	}

	.stats-bottom .row .col-12.col-lg-4:nth-child(1),
	.stats-bottom .row .col-12.col-lg-4:nth-child(2) {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

/* Specialized stats panel enhancements */
.stats-panel .stats-list {
	flex-grow: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
	.character-armory {
		padding: 10px;
		margin: 10px;
	}

	.character-header {
		padding: 10px;
	}

	.character-name {
		font-size: 1.4rem;
	}

	.character-name-section .btn {
		align-self: flex-end;
	}

	.character-sheet {
		padding: 10px;
	}

	.stats-bottom {
		padding: 10px;
	}

	.equipment-slot,
	.weapon-slot {
		min-height: 50px;
	}

	.primary-stats {
		min-height: auto;
		margin-top: 15px;
	}

	/* Force single column layout on mobile for stats */
	.stats-bottom .row .col-12.col-lg-4 {
		margin-bottom: 15px;
	}
}

/* Small Mobile - 425px and below */
@media (max-width: 425px) {
	.character-header .d-flex {
		width: 100%;
	}

	.character-info {
		width: 100%;
	}

	.character-name-section,
	.character-details-section {
		width: 100%;
	}

	.character-details {
		justify-content: center;
		text-align: center;
	}

	.primary-stats .stats-list {
		text-align: center;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.stat-line {
		justify-content: center;
		text-align: center;
		flex-direction: column;
		gap: 4px;
		min-width: 150px;
		padding: 8px 12px;
		background: rgba(255, 255, 255, 0.05);
		margin-bottom: 8px;
	}

	.stat-line span {
		display: block;
		text-align: center;
	}

	.stat-line span:first-child {
		font-size: 0.8rem;
		opacity: 0.8;
	}

	.stat-line span:last-child {
		font-size: 1rem;
		font-weight: bold;
	}

	/* Fix weapons panel padding and alignment */
	.weapons-panel .weapons-grid {
		padding: 0;
	}

	.weapons-grid .row {
		margin: 0;
	}

	.weapons-grid .col-4 {
		padding: 4px;
	}

	.weapon-slot-enhanced {
		padding: 8px;
		min-height: 60px;
	}

	/* Stats bottom panel improvements */
	.stats-bottom .stats-list {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	/* Stack stats panels vertically on small screens */
	.stats-bottom .row {
		flex-direction: column;
	}

	.stats-bottom .col-12.col-lg-4 {
		width: 100% !important;
		flex: none !important;
		max-width: 100% !important;
	}
} /* Ultra Mobile - 320px and below */
@media (max-width: 360px) {
	.character-armory {
		padding: 8px;
		margin: 5px;
	}

	.character-header {
		padding: 8px;
	}

	.character-avatar {
		width: 100px;
		height: 125px;
	}

	.character-name {
		font-size: 1.2rem;
		margin-bottom: 0.5rem;
	}

	.character-name-section,
	.character-details-section {
		padding: 8px 10px;
		margin-bottom: 8px;
	}

	.character-details span {
		font-size: 0.75rem;
		padding: 1px 4px;
		margin: 1px;
	}

	.character-sheet {
		padding: 8px;
	}

	.equipment-slot,
	.weapon-slot-enhanced {
		min-height: 40px;
		font-size: 0.8rem;
	}

	.primary-stats h3,
	.weapons-panel h3 {
		font-size: 1rem;
		margin-bottom: 0.75rem;
	}

	.stat-line {
		font-size: 0.85rem;
		padding: 4px 8px;
	}

	.stats-bottom {
		padding: 8px;
	}

	.stats-panel h3 {
		font-size: 1rem;
		margin-bottom: 0.75rem;
	}

	.bar-label {
		font-size: 0.8rem;
		margin-bottom: 4px;
	}

	.bar-text {
		font-size: 0.8rem;
	}

	/* Ensure weapon slots don't overflow */
	.weapons-grid .col-4 {
		padding: 2px;
	}

	.weapon-slot-enhanced {
		padding: 4px;
		min-height: 35px;
	}
}

/* Bootstrap Tooltip Text Wrap for Character Stats */
.tooltip-inner {
	text-wrap: balance;
	max-width: 250px;
}
