/**
 * @file css/marketplaces.css
 *
 * Copyright (c) 2024
 * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
 *
 * @brief Styles for marketplace links plugin
 */

/* Marketplace Links Display on Monograph Page */
.item.marketplaces {
	margin: 1.5em 0;
}

.item.marketplaces .marketplace_links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.item.marketplaces .marketplace_link {
	margin-bottom: 0.75em;
	padding: 0.5em 0;
	border-bottom: 1px solid #e0e0e0;
}

.item.marketplaces .marketplace_link:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.item.marketplaces .marketplace_link_item {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: #007ab2;
	transition: color 0.2s;
}

.item.marketplaces .marketplace_link_item:hover {
	color: #005a87;
	text-decoration: underline;
}

.item.marketplaces .marketplace_icon {
	width: 24px;
	height: 24px;
	margin-right: 0.5em;
	vertical-align: middle;
}

.item.marketplaces .marketplace_icon_fallback {
	font-size: 1.2em;
	margin-right: 0.5em;
}

.item.marketplaces .marketplace_label {
	font-weight: 500;
}

.item.marketplaces .marketplace_stats {
	display: block;
	font-size: 0.85em;
	color: #666;
	margin-top: 0.25em;
	margin-left: 2em;
}

/* Marketplace Form in Workflow */
.marketplaces_container {
	min-height: 200px;
}

.marketplaces_loading {
	padding: 2em;
	text-align: center;
	color: #666;
}

.marketplaces_form {
	padding: 1em;
}

.marketplaces_header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5em;
	padding-bottom: 1em;
	border-bottom: 1px solid #dee2e6;
}

.marketplaces_header h3 {
	margin: 0;
	font-size: 1.2em;
}

.marketplaces_form .add_marketplace_btn {
	margin-bottom: 0;
}

.marketplaces_form .marketplace_links_list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.marketplaces_form .marketplace_link_item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1em;
	margin-bottom: 0.5em;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 4px;
}

.marketplaces_form .link_info {
	flex: 1;
}

.marketplaces_form .link_info strong {
	display: block;
	margin-bottom: 0.25em;
}

.marketplaces_form .link_info a {
	color: #007ab2;
	text-decoration: none;
	font-size: 0.9em;
}

.marketplaces_form .link_info .link_label {
	display: block;
	color: #666;
	font-size: 0.85em;
	margin-top: 0.25em;
}

.marketplaces_form .link_actions {
	display: flex;
	gap: 0.5em;
}

.marketplaces_form .no_links_message {
	color: #666;
	padding: 2em;
	text-align: center;
	background: #f8f9fa;
	border: 1px dashed #dee2e6;
	border-radius: 4px;
}

.marketplaces_form .no_links_message p {
	margin: 0;
}

/* Marketplace Form Modal */
.marketplace_form_modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 2em;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	min-width: 400px;
	max-width: 600px;
}

.marketplace_form_modal h3 {
	margin-top: 0;
	margin-bottom: 1em;
}

.marketplace_form .form_group {
	margin-bottom: 1em;
}

.marketplace_form .form_group label {
	display: block;
	margin-bottom: 0.5em;
	font-weight: 500;
}

.marketplace_form .form_group select,
.marketplace_form .form_group input[type="url"],
.marketplace_form .form_group input[type="text"] {
	width: 100%;
	padding: 0.5em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
}

.marketplace_form .form_actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5em;
	margin-top: 1.5em;
}

/* Responsive Design */
@media (max-width: 768px) {
	.marketplace_form_modal {
		min-width: 90%;
		max-width: 90%;
		padding: 1.5em;
	}

	.marketplaces_form .marketplace_link_item {
		flex-direction: column;
		align-items: flex-start;
	}

	.marketplaces_form .link_actions {
		width: 100%;
		margin-top: 0.5em;
	}
}

