/* START: KOL Favorites Button */
html.light-mode .kol-favorites-btn,
html.dark-mode .kol-favorites-btn {
	background: linear-gradient(to bottom, #383838 0%, #343434 100%);
	color: #ffffff;
	border: 1px solid #282828;
	box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.4);
	border-radius: 6px;
	padding: 15px 15px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: none;
	white-space: nowrap;
}

html.light-mode .kol-favorites-btn:active,
html.dark-mode .kol-favorites-btn:active {
	box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3) inset;
}

html.light-mode .kol-favorites-btn-active,
html.dark-mode .kol-favorites-btn-active {
	background: linear-gradient(to bottom, #2d7c2d 0%, #1f5f1f 100%);
	border: 1px solid #1a4d1a;
}

#kol-favorites-target {
	margin-top: 20px;
	text-align: center;
}
/* END: KOL Favorites Button */

/* START: Favorites Header */
.kol-favorites-header {
	position: relative;
	width: 100%;
	margin-bottom: 5px;
}

.kol-favorites-header .kol-favorites-edit-btn {
	position: absolute;
	top: 10px;
	right: -8px;
}
/* END: Favorites Header */

/* START: Favorites Widget */
html.light-mode .kol-favorites-list,
html.dark-mode .kol-favorites-list {
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
	width: 100%;
	max-height: 300px;
	overflow-y: auto;
}

.kol-favorites-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
	width: 100%;
}

.kol-favorites-link {
	flex: 1;
	text-decoration: none;
	word-break: break-word;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.kol-favorites-link .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

html.light-mode .kol-favorites-link .dashicons {
	color: #1f2937;
}

html.dark-mode .kol-favorites-link .dashicons {
	color: #e0e0e0;
}

html.light-mode .kol-favorites-link {
	color: #1f2937;
}

html.dark-mode .kol-favorites-link {
	color: #e0e0e0;
}

html.light-mode .kol-favorites-link:hover,
html.dark-mode .kol-favorites-link:hover {
	text-decoration: underline;
}
/* END: Favorites Widget */

/* START: Edit Button */
html.light-mode .kol-favorites-edit-btn,
html.dark-mode .kol-favorites-edit-btn {
	background: linear-gradient(to bottom, #383838 0%, #343434 100%);
	color: #ffffff;
	border: 1px solid #282828;
	border-top-color: #555555;
	box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.4);
	border-radius: 6px;
	padding: 0 15px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	margin: 0;
	flex-shrink: 0;
}

html.light-mode .kol-favorites-edit-btn:active,
html.dark-mode .kol-favorites-edit-btn:active {
	box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3) inset;
}
/* END: Edit Button */

/* START: Popup Overlay */
html.light-mode .kol-favorites-popup-overlay,
html.dark-mode .kol-favorites-popup-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999;
	align-items: center;
	justify-content: center;
}

html.light-mode .kol-favorites-popup-overlay.active,
html.dark-mode .kol-favorites-popup-overlay.active {
	display: flex;
}
/* END: Popup Overlay */

/* START: Popup */
html.light-mode .kol-favorites-popup {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	width: 90%;
	max-width: 400px;
	max-height: 80vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

html.dark-mode .kol-favorites-popup {
	background: #1a1a1a;
	border: 1px solid #333333;
	border-radius: 8px;
	width: 90%;
	max-width: 400px;
	max-height: 80vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
/* END: Popup */

/* START: Popup Header */
html.light-mode .kol-favorites-popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px;
	border-bottom: 1px solid #e5e7eb;
	font-weight: 600;
	color: #1f2937;
}

html.dark-mode .kol-favorites-popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px;
	border-bottom: 1px solid #333333;
	font-weight: 600;
	color: #e0e0e0;
}

html.light-mode .kol-favorites-popup-close,
html.dark-mode .kol-favorites-popup-close {
	background: transparent;
	border: none;
	font-size: 18px;
	font-weight: bold;
	cursor: pointer;
	color: #9ca3af;
	padding: 0;
	line-height: 1;
}

html.light-mode .kol-favorites-popup-close:hover {
	color: #1f2937;
}

html.dark-mode .kol-favorites-popup-close:hover {
	color: #e0e0e0;
}
/* END: Popup Header */

/* START: Popup List */
html.light-mode .kol-favorites-popup-list,
html.dark-mode .kol-favorites-popup-list {
	overflow-y: auto;
	padding: 10px;
	flex: 1;
}

html.light-mode .kol-favorites-popup-item {
	display: flex;
	align-items: center;
	padding: 10px;
	margin-bottom: 8px;
	background: #f9f9f9;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	cursor: grab;
}

html.dark-mode .kol-favorites-popup-item {
	display: flex;
	align-items: center;
	padding: 10px;
	margin-bottom: 8px;
	background: #252525;
	border: 1px solid #333333;
	border-radius: 4px;
	cursor: grab;
}

html.light-mode .kol-favorites-popup-item:last-child,
html.dark-mode .kol-favorites-popup-item:last-child {
	margin-bottom: 0;
}

html.light-mode .kol-favorites-popup-item.ui-sortable-helper,
html.dark-mode .kol-favorites-popup-item.ui-sortable-helper {
	cursor: grabbing;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.kol-favorites-drag-handle {
	margin-right: 10px;
	cursor: grab;
}

.kol-favorites-drag-handle .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

html.light-mode .kol-favorites-drag-handle .dashicons {
	color: #9ca3af;
}

html.dark-mode .kol-favorites-drag-handle .dashicons {
	color: #666666;
}

html.light-mode .kol-favorites-popup-title {
	flex: 1;
	color: #1f2937;
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

html.dark-mode .kol-favorites-popup-title {
	flex: 1;
	color: #e0e0e0;
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
/* END: Popup List */

/* START: Remove Button */
html.light-mode .kol-favorites-remove-btn,
html.dark-mode .kol-favorites-remove-btn {
	background: linear-gradient(to bottom, #dc2626 0%, #b91c1c 100%);
	color: #ffffff;
	border: 1px solid #991b1b;
	border-top-color: #ef4444;
	box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.4);
	border-radius: 6px;
	padding: 0 12px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	margin-left: 10px;
	flex-shrink: 0;
}

html.light-mode .kol-favorites-remove-btn:active,
html.dark-mode .kol-favorites-remove-btn:active {
	box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3) inset;
}
/* END: Remove Button */

/* START: Floating Button */
html.light-mode .kol-favorites-floating-btn {
	position: fixed;
	right: 94px;
	bottom: 5px;
	width: 40px;
	height: 40px;
	background-color: #9ba09a;
	border: 2px solid #d0d0d0;
	border-radius: 50%;
	z-index: 99991;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
	transition: none;
	font-size: 20px;
	color: #333333;
}

html.dark-mode .kol-favorites-floating-btn {
	position: fixed;
	right: 94px;
	bottom: 5px;
	width: 40px;
	height: 40px;
	background-color: #9ba09a;
	border: 2px solid #3a3a3a;
	border-radius: 50%;
	z-index: 99991;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
	transition: none;
	font-size: 20px;
	color: #e0e0e0;
}

html.light-mode .kol-favorites-floating-btn .dashicons,
html.dark-mode .kol-favorites-floating-btn .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
}
/* END: Floating Button */

/* START: Floating Window */
#kol-favorites-popup-container {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	pointer-events: none;
}

#kol-fav-window {
	pointer-events: all;
}

html.light-mode .kol-fav-floating-window {
	position: fixed;
	right: 50px;
	bottom: 50px;
	width: 320px;
	height: 450px;
	max-height: 450px;
	background: #f5f5f5;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	z-index: 99990;
}

html.dark-mode .kol-fav-floating-window {
	position: fixed;
	right: 50px;
	bottom: 50px;
	width: 320px;
	height: 450px;
	max-height: 450px;
	background: #1a1a1a;
	border: 1px solid #333333;
	border-radius: 8px;
	box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	z-index: 99990;
}

/* Window Header */
html.light-mode .kol-fav-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 15px;
	border-bottom: 1px solid #d0d0d0;
	background: #f9f9f9;
	cursor: grab;
	toucher-action: none;
	color: #333333;
	font-weight: 600;
	font-size: 14px;
}

html.dark-mode .kol-fav-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 15px;
	border-bottom: 1px solid #333333;
	background: #252525;
	cursor: grab;
	toucher-action: none;
	color: #e0e0e0;
	font-weight: 600;
	font-size: 14px;
}

.kol-fav-header-buttons {
	display: flex;
	gap: 8px;
	margin-left: auto;
}

html.light-mode .kol-fav-add-current,
html.light-mode .kol-fav-close {
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	width: 24px;
	height: 24px;
	color: #666666;
}

html.light-mode .kol-fav-add-current:hover,
html.light-mode .kol-fav-close:hover {
	color: #333333;
}

html.dark-mode .kol-fav-add-current,
html.dark-mode .kol-fav-close {
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	width: 24px;
	height: 24px;
	color: #888888;
}

html.dark-mode .kol-fav-add-current:hover,
html.dark-mode .kol-fav-close:hover {
	color: #e0e0e0;
}

html.light-mode .kol-fav-add-current .dashicons,
html.light-mode .kol-fav-close .dashicons,
html.dark-mode .kol-fav-add-current .dashicons,
html.dark-mode .kol-fav-close .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

/* List Container */
html.light-mode .kol-fav-list-container {
	overflow-y: auto;
	flex: 1;
	padding: 10px 12px;
	color: #333333;
}

html.dark-mode .kol-fav-list-container {
	overflow-y: auto;
	flex: 1;
	padding: 10px 12px;
	color: #e0e0e0;
}

/* Items */
html.light-mode .kol-fav-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	margin-bottom: 6px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	gap: 8px;
}

html.dark-mode .kol-fav-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	margin-bottom: 6px;
	background: #252525;
	border: 1px solid #2a2a2a;
	border-radius: 4px;
	gap: 8px;
}

.kol-fav-item.current-page-action {
	margin-bottom: 10px;
}

html.light-mode .kol-fav-divider {
	height: 1px;
	background: #e5e7eb;
	margin: 6px 0 10px 0;
}

html.dark-mode .kol-fav-divider {
	height: 1px;
	background: #2a2a2a;
	margin: 6px 0 10px 0;
}

html.light-mode .kol-fav-empty {
	padding: 20px 10px;
	text-align: center;
	color: #9ca3af;
	font-size: 13px;
}

html.dark-mode .kol-fav-empty {
	padding: 20px 10px;
	text-align: center;
	color: #666666;
	font-size: 13px;
}

/* Link */
.kol-fav-link {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	font-size: 13px;
	overflow: hidden;
}

html.light-mode .kol-fav-link {
	color: #1f2937;
}

html.dark-mode .kol-fav-link {
	color: #e0e0e0;
}

html.light-mode .kol-fav-link:hover {
	text-decoration: underline;
	color: #111827;
}

html.dark-mode .kol-fav-link:hover {
	text-decoration: underline;
	color: #ffffff;
}

html.light-mode .kol-fav-link .dashicons,
html.dark-mode .kol-fav-link .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	flex-shrink: 0;
}

.kol-fav-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Action Buttons */
html.light-mode .kol-fav-add-page,
html.light-mode .kol-fav-remove-current,
html.light-mode .kol-fav-remove-item {
	background: linear-gradient(to bottom, #e2e2e2 0%, #d4d4d4 100%);
	color: #2d2d2d;
	border: 1px solid #b0b0b0;
	border-top-color: #f0f0f0;
	border-right-color: #b0b0b0;
	border-bottom-color: #b0b0b0;
	border-radius: 4px;
	padding: 0 10px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 11px;
	font-weight: 500;
	flex-shrink: 0;
	box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

html.dark-mode .kol-fav-add-page,
html.dark-mode .kol-fav-remove-current,
html.dark-mode .kol-fav-remove-item {
	background: linear-gradient(to bottom, #383838 0%, #343434 100%);
	color: #e0e0e0;
	border: 1px solid #282828;
	border-top-color: #555555;
	border-radius: 4px;
	padding: 0 10px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 11px;
	font-weight: 500;
	flex-shrink: 0;
	box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
}

html.light-mode .kol-fav-remove-current,
html.light-mode .kol-fav-remove-item {
	background: linear-gradient(to bottom, #dc2626 0%, #b91c1c 100%);
	color: #ffffff;
	border: 1px solid #991b1b;
	border-top-color: #ef4444;
}

html.dark-mode .kol-fav-remove-current,
html.dark-mode .kol-fav-remove-item {
	background: linear-gradient(to bottom, #dc2626 0%, #b91c1c 100%);
	color: #ffffff;
	border: 1px solid #991b1b;
	border-top-color: #ef4444;
}

html.light-mode .kol-fav-add-page:active,
html.light-mode .kol-fav-remove-current:active,
html.light-mode .kol-fav-remove-item:active,
html.dark-mode .kol-fav-add-page:active,
html.dark-mode .kol-fav-remove-current:active,
html.dark-mode .kol-fav-remove-item:active {
	box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.2);
}

html.light-mode .kol-fav-add-page .dashicons,
html.light-mode .kol-fav-remove-current .dashicons,
html.light-mode .kol-fav-remove-item .dashicons,
html.dark-mode .kol-fav-add-page .dashicons,
html.dark-mode .kol-fav-remove-current .dashicons,
html.dark-mode .kol-fav-remove-item .dashicons {
	width: 14px;
	height: 14px;
	font-size: 14px;
	margin-right: 4px;
}

/* Loading Spinner */
html.light-mode .kol-fav-loading,
html.dark-mode .kol-fav-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	text-align: center;
	font-size: 14px;
	gap: 10px;
}

html.light-mode .kol-fav-loading {
	color: #666666;
}

html.dark-mode .kol-fav-loading {
	color: #b0b0b0;
}

.kol-fav-loading .spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(0, 0, 0, 0.1);
	border-radius: 50%;
	border-top-color: #4CAF50;
	animation: kol-fav-spin 1s linear infinite;
}

html.dark-mode .kol-fav-loading .spinner {
	border-color: rgba(255, 255, 255, 0.1);
	border-top-color: #4CAF50;
}

@keyframes kol-fav-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Current Page Action Button */
html.light-mode .kol-fav-item.current-page-action {
	margin-bottom: 10px;
	padding: 0;
	border: none;
	background: transparent;
}

html.dark-mode .kol-fav-item.current-page-action {
	margin-bottom: 10px;
	padding: 0;
	border: none;
	background: transparent;
}

html.light-mode .kol-fav-item.current-page-action button,
html.dark-mode .kol-fav-item.current-page-action button {
	width: 100%;
	padding: 10px;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

html.light-mode .kol-fav-item.current-page-action button {
	background: linear-gradient(to bottom, #e2e2e2 0%, #d4d4d4 100%);
	color: #2d2d2d;
	border: 1px solid #b0b0b0;
	border-top-color: #f0f0f0;
}

html.dark-mode .kol-fav-item.current-page-action button {
	background: linear-gradient(to bottom, #383838 0%, #343434 100%);
	color: #e0e0e0;
	border: 1px solid #282828;
	border-top-color: #555555;
}

html.light-mode .kol-fav-item.current-page-action button:active,
html.dark-mode .kol-fav-item.current-page-action button:active {
	box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.2);
}

html.light-mode .kol-fav-item.current-page-action button .dashicons,
html.dark-mode .kol-fav-item.current-page-action button .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	html.light-mode .kol-fav-floating-window,
	html.dark-mode .kol-fav-floating-window {
		right: 10px;
		left: 10px;
		bottom: 65px;
		width: auto;
		max-width: none;
	}
}
/* END: Floating Window */
