/* =========================================
   Tools Page Consolidated Styles
   Contains styles for Tools Tabs, Lucky Draw, and Roster
   ========================================= */

/* -----------------------------------------
   1. Tools Page Specific Styles (from tools.html)
   ----------------------------------------- */
.tools-tabs {
	display: flex;
	border-bottom: 1px solid #dee2e6;
	margin-bottom: 20px;
	padding-left: 20px;
	background-color: transparent;
	position: relative;
	z-index: 1002;
	/* Above fixed header on desktop */
}

.tools-tab-item {
	padding: 10px 20px;
	cursor: pointer;
	border: 1px solid transparent;
	border-bottom: none;
	margin-bottom: -1px;
	border-radius: 5px 5px 0 0;
	color: #495057;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease-in-out;
}

.tools-tab-item:hover {
	border-color: #e9ecef #e9ecef #dee2e6;
	background-color: rgba(255, 255, 255, 0.5);
}

.tools-tab-item.active {
	background-color: #fff;
	border-color: #dee2e6 #dee2e6 #fff;
	color: #000;
	font-weight: 600;
	box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

/* Ensure tab content is cleanly separated */
.tools-tab-content {
	animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/* -----------------------------------------
   2. Lucky Draw Styles
   ----------------------------------------- */

/* --- Page Title Row with Icon Button --- */
.page-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.page-title-row .page-title {
	margin: 0;
	text-align: left;
}

.page-title {
	font-family: 'Montserrat', sans-serif;
	color: #333;
	text-align: center;
	margin-bottom: 20px;
}

.meeting-info {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 0.95rem;
	color: #666;
	margin-bottom: 40px;
}

.meeting-info i {
	color: #772432;
}

.no-meeting-message {
	text-align: center;
	font-size: 1.2rem;
	color: #6c757d;
	margin-top: 50px;
}

/* Draw Controls */
.draw-controls {
	background: #f8f9fa;
	border-radius: 12px;
	padding: 20px 30px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	margin-bottom: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 30px;
	flex-wrap: wrap;
}

.draw-type-selector label {
	font-weight: 600;
	color: #333;
	font-size: 0.9rem;
}

.draw-type-selector .custom-select-wrapper {
	width: 100%;
}

.draw-type-selector .custom-select-trigger {
	padding: 10px 16px;
	font-size: 1rem;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background: white;
	color: #333;
	cursor: pointer;
	transition: all 0.3s ease;
	min-width: 280px;
	height: 44px;
	box-sizing: border-box;
}

.draw-type-selector .custom-select-trigger:hover {
	border-color: #772432;
}

.draw-type-selector .custom-select-trigger.active {
	border-color: #772432;
	box-shadow: 0 0 0 3px rgba(119, 36, 50, 0.1);
}


.draw-buttons {
	display: flex;
	gap: 12px;
}

.reset-button {
	padding: 12px 28px;
	font-size: 0.95rem !important;
	font-weight: 600;
	background: #6c757d;
	border: none;
	border-radius: 8px;
	color: white;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
	white-space: nowrap;
	height: auto;
	line-height: normal;
}

.reset-button:hover {
	background: #5a6268;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

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

.reset-button i {
	margin-right: 6px;
}

.draw-button {
	padding: 12px 36px;
	font-size: 0.95rem !important;
	font-weight: 700;
	background: #772432;
	border: none;
	border-radius: 8px;
	color: white;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 3px 10px rgba(119, 36, 50, 0.3);
	white-space: nowrap;
	height: auto;
	line-height: normal;
}

.draw-button:hover {
	background: #8e2a3d;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(119, 36, 50, 0.4);
}

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

.draw-button i {
	margin-right: 8px;
}

/* Winners Wall */
.winners-wall {
	min-height: 300px;
	background: #f8f9fa;
	border-radius: 12px;
	padding: 30px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 20px;
	align-content: start;
}

.wall-placeholder {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	color: #adb5bd;
}

.wall-placeholder i {
	font-size: 4rem;
	margin-bottom: 15px;
	opacity: 0.5;
}

.wall-placeholder p {
	font-size: 1.1rem;
	margin: 0;
}

/* Winner Tile */
.winner-tile {
	background: white;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	position: relative;
	transition: all 0.3s ease;
}

.winner-tile:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.winner-order-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: #fff;
	color: #772432;
	font-weight: 800;
	font-size: 1.3rem;
	padding: 4px 10px;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	font-family: 'Montserrat', sans-serif;
	letter-spacing: -0.5px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.winner-order-badge i {
	font-size: 1rem;
}

.winner-avatar {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	overflow: hidden;
	background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	border: 3px solid #772432;
}

.winner-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.avatar-initials {
	font-size: 2.5rem;
	font-weight: 700;
	color: #772432;
	user-select: none;
}

.winner-name {
	font-size: 1rem;
	font-weight: 600;
	color: #333;
	text-align: center;
	word-break: break-word;
}

/* Notification */
.notification {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 15px 25px;
	border-radius: 8px;
	background: white;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1100;
	opacity: 0;
	transform: translateX(400px);
	transition: all 0.3s ease;
}

.notification.show {
	opacity: 1;
	transform: translateX(0);
}

.notification-warning {
	position: fixed;
	top: 60px;
	margin-left: 20px;
	border-left: 4px solid #ffc107;
	color: #856404;
}

.notification-info {
	border-left: 4px solid #17a2b8;
	color: #0c5460;
}

/* -----------------------------------------
   3. Level Validator Styles
   ----------------------------------------- */
.level-validator-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px 0;
}

.page-subtitle {
	text-align: center;
	color: #6c757d;
	font-size: 0.95rem;
	margin-bottom: 30px;
	margin-top: -10px;
}

.validator-card {
	background: #f8f9fa;
	border-radius: 12px;
	padding: 30px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	margin-bottom: 30px;
}

.validator-form .form-row {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.validator-form .form-group {
	flex: 1;
	min-width: 180px;
}

.validator-form .form-group label {
	display: block;
	font-weight: 600;
	color: #333;
	margin-bottom: 8px;
	font-size: 0.9rem;
}

.validator-form .form-group label i {
	color: #772432;
	margin-right: 4px;
}

.validator-form input,
.validator-form select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	color: #333;
	background: white;
	transition: all 0.3s ease;
	box-sizing: border-box;
	min-height: 38px;
}

.validator-form input:focus,
.validator-form select:focus {
	outline: none;
	border-color: #772432;
	box-shadow: 0 4px 12px rgba(119, 36, 50, 0.15);
}

.validator-form input::placeholder {
	color: #adb5bd;
	font-weight: 400;
}

.form-actions {
	display: flex;
	justify-content: center;
	margin-top: 24px;
}

.verify-button {
	padding: 12px 36px;
	font-size: 0.95rem;
	font-weight: 700;
	background: #772432;
	border: none;
	border-radius: 8px;
	color: white;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 3px 10px rgba(119, 36, 50, 0.3);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.verify-button:hover:not(:disabled) {
	background: #8e2a3d;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(119, 36, 50, 0.4);
}

.verify-button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.verify-button i {
	margin-right: 8px;
}

/* Result Area */
.result-area {
	animation: fadeIn 0.3s ease-in-out;
}

.result-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 24px;
	border-radius: 12px;
	margin-bottom: 16px;
}

.result-card.result-verified {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	border: 1px solid #b1dfbb;
}

.result-card.result-not-found {
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	border: 1px solid #f1b0b7;
}

.result-card.result-error {
	background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
	border: 1px solid #ffd666;
}

.result-card.result-pending {
	background: linear-gradient(135deg, #e2e6ea 0%, #d6dbe0 100%);
	border: 1px solid #ced4da;
}

.result-icon {
	font-size: 2.2rem;
	flex-shrink: 0;
}

.result-spinner {
	font-size: 2.2rem;
	flex-shrink: 0;
	color: #6c757d;
}

.result-verified .result-icon {
	color: #155724;
}

.result-not-found .result-icon {
	color: #721c24;
}

.result-error .result-icon {
	color: #856404;
}

.result-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.result-text strong {
	font-size: 1.1rem;
}

.result-meta {
	font-size: 0.85rem;
	color: #555;
}

.result-hint {
	font-size: 0.8rem;
	color: #888;
	font-style: italic;
}

.result-elapsed {
	font-size: 0.8rem;
	color: #666;
	font-style: italic;
}

.result-elapsed i {
	margin-right: 3px;
}

.result-details {
	background: white;
	border-radius: 10px;
	padding: 16px 20px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.detail-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
	gap: 12px;
}

.detail-row:last-child {
	border-bottom: none;
}

.detail-label {
	font-weight: 600;
	color: #555;
	font-size: 0.88rem;
	white-space: nowrap;
}

.detail-value {
	color: #333;
	font-size: 0.88rem;
	text-align: right;
	word-break: break-all;
}

.detail-value.hash-value {
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.82rem;
	color: #495057;
}