/* Watchlist Container */
.pn-finance-manager-watchlist-container {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px 0;
}

.pn-finance-manager-watchlist-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.pn-finance-manager-watchlist-header h2 {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	color: #212529;
}

.pn-finance-manager-watchlist-refresh-btn {
	background: none;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
	color: #6c757d;
	transition: all 0.2s ease;
}

.pn-finance-manager-watchlist-refresh-btn:hover {
	background-color: #f8f9fa;
	color: #212529;
	border-color: #adb5bd;
}

.pn-finance-manager-watchlist-refresh-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

@keyframes pn-finance-manager-spin-animation {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.pn-finance-manager-spin {
	animation: pn-finance-manager-spin-animation 1s linear infinite;
}

/* Add Form */
.pn-finance-manager-watchlist-add-form {
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 24px;
}

.pn-finance-manager-watchlist-form-row {
	display: flex;
	gap: 16px;
	align-items: flex-end;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.pn-finance-manager-watchlist-form-row:last-child {
	margin-bottom: 0;
}

.pn-finance-manager-watchlist-form-field {
	flex: 1;
	min-width: 180px;
}

.pn-finance-manager-watchlist-form-field label {
	display: block;
	font-weight: 500;
	color: #495057;
	margin-bottom: 6px;
	font-size: 14px;
}

.pn-finance-manager-watchlist-type-select,
.pn-finance-manager-watchlist-symbol-select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ced4da;
	border-radius: 6px;
	font-size: 14px;
	color: #495057;
	background-color: #fff;
}

.pn-finance-manager-watchlist-alert-row {
	flex-direction: column;
	align-items: stretch;
}

.pn-finance-manager-watchlist-alert-toggle-field {
	flex: 0 0 auto;
}

.pn-finance-manager-watchlist-alert-toggle-field label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	margin-bottom: 0;
}

.pn-finance-manager-watchlist-threshold-field {
	flex: 1;
	min-width: 200px;
}

.pn-finance-manager-watchlist-threshold-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pn-finance-manager-watchlist-threshold-wrapper input[type="range"] {
	flex: 1;
	-webkit-appearance: none;
	height: 6px;
	border-radius: 3px;
	background: #dee2e6;
	outline: none;
}

.pn-finance-manager-watchlist-threshold-wrapper input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #007bff;
	cursor: pointer;
}

.pn-finance-manager-watchlist-threshold-wrapper input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #007bff;
	cursor: pointer;
	border: none;
}

.pn-finance-manager-watchlist-threshold-value {
	font-weight: 600;
	color: #495057;
	min-width: 40px;
	text-align: right;
}

.pn-finance-manager-watchlist-add-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	background-color: #007bff;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.pn-finance-manager-watchlist-add-btn:hover {
	background-color: #0056b3;
}

.pn-finance-manager-watchlist-add-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.pn-finance-manager-watchlist-add-btn i {
	font-size: 18px;
}

/* Watchlist Items */
.pn-finance-manager-watchlist-items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
	gap: 16px;
}

.pn-finance-manager-watchlist-empty {
	text-align: center;
	color: #6c757d;
	padding: 40px 20px;
	font-size: 15px;
	grid-column: 1 / -1;
}

/* Watchlist Item Card */
.pn-finance-manager-watchlist-item {
	background-color: #fff;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 16px;
	transition: box-shadow 0.2s ease;
}

.pn-finance-manager-watchlist-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pn-finance-manager-watchlist-item-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.pn-finance-manager-watchlist-item-symbol {
	display: flex;
	align-items: center;
	gap: 8px;
}

.pn-finance-manager-watchlist-display-name {
	font-size: 18px;
	font-weight: 600;
	color: #212529;
}

.pn-finance-manager-watchlist-symbol-name {
	font-size: 12px;
	color: #6c757d;
	margin-top: 2px;
}

.pn-finance-manager-watchlist-type-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-left: 10px;
}

.pn-finance-manager-watchlist-type-stock {
	background-color: #007bff;
	color: #fff;
}

.pn-finance-manager-watchlist-type-crypto {
	background-color: #6f42c1;
	color: #fff;
}

.pn-finance-manager-watchlist-item-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.pn-finance-manager-watchlist-edit-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: #6c757d;
	opacity: 0.6;
	padding: 4px;
	transition: opacity 0.2s ease;
}

.pn-finance-manager-watchlist-edit-btn:hover {
	opacity: 1;
	color: #007bff;
}

.pn-finance-manager-watchlist-edit-btn.active {
	opacity: 1;
	color: #007bff;
}

.pn-finance-manager-watchlist-remove-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: #dc3545;
	opacity: 0.6;
	padding: 4px;
	transition: opacity 0.2s ease;
}

.pn-finance-manager-watchlist-remove-btn:hover {
	opacity: 1;
}

/* Price Section */
.pn-finance-manager-watchlist-price-section {
	display: flex;
	gap: 16px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.pn-finance-manager-watchlist-current-price,
.pn-finance-manager-watchlist-price-change {
	flex: 1;
	min-width: 140px;
}

.pn-finance-manager-watchlist-price-label,
.pn-finance-manager-watchlist-change-label {
	display: block;
	font-size: 12px;
	color: #6c757d;
	margin-bottom: 4px;
}

.pn-finance-manager-watchlist-price-value {
	font-size: 20px;
	font-weight: 700;
	color: #212529;
}

.pn-finance-manager-watchlist-change-value {
	font-size: 15px;
	font-weight: 600;
}

.pn-finance-manager-watchlist-price-change.positive .pn-finance-manager-watchlist-change-value {
	color: #155724;
}

.pn-finance-manager-watchlist-price-change.negative .pn-finance-manager-watchlist-change-value {
	color: #721c24;
}

/* Price History Chart */
.pn-finance-manager-watchlist-chart-section {
	margin-bottom: 12px;
	border-radius: 6px;
	overflow: hidden;
	position: relative;
}

.pn-finance-manager-watchlist-chart-section .pn-finance-manager-chart-container {
	position: relative;
	height: 120px;
}

.pn-finance-manager-watchlist-chart-section canvas {
	width: 100% !important;
	height: 100% !important;
}

.pn-finance-manager-watchlist-chart-actions {
	display: flex;
	justify-content: center;
	padding-top: 6px;
}

.pn-finance-manager-watchlist-load-history-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: none;
	border: 1px solid #dee2e6;
	border-radius: 5px;
	padding: 4px 12px;
	font-size: 12px;
	color: #6c757d;
	cursor: pointer;
	transition: all 0.2s ease;
}

.pn-finance-manager-watchlist-load-history-btn:hover {
	background-color: #f8f9fa;
	border-color: #adb5bd;
	color: #212529;
}

.pn-finance-manager-watchlist-load-history-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.pn-finance-manager-watchlist-load-history-btn i {
	font-size: 16px;
}

/* Alert Controls */
.pn-finance-manager-watchlist-alert-controls {
	padding-top: 12px;
	border-top: 1px solid #f0f0f0;
}

.pn-finance-manager-watchlist-alert-field {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.pn-finance-manager-watchlist-alert-toggle-label {
	font-size: 14px;
	font-weight: 500;
	color: #495057;
}

.pn-finance-manager-watchlist-threshold-field-item label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #495057;
	margin-bottom: 4px;
}

.pn-finance-manager-watchlist-save-field {
	margin-top: 12px;
	text-align: right;
}

.pn-finance-manager-watchlist-save-field .pn-finance-manager-btn {
	padding: 5px 30px;
	line-height: 20px;
}

/* Login Notice */
.pn-finance-manager-watchlist-login-notice {
	text-align: center;
	color: #6c757d;
	padding: 40px 20px;
}

/* Responsive */
@media (max-width: 600px) {
	.pn-finance-manager-watchlist-items {
		grid-template-columns: 1fr;
	}

	.pn-finance-manager-watchlist-form-row {
		flex-direction: column;
		gap: 12px;
	}

	.pn-finance-manager-watchlist-form-field {
		min-width: 100%;
	}

	.pn-finance-manager-watchlist-price-section {
		flex-direction: column;
		gap: 8px;
	}

	.pn-finance-manager-watchlist-alert-field {
		flex-direction: column;
		align-items: flex-start;
	}
}
