/**
 * Styles for Asset Requests Table
 *
 * @package AssetLendingManager
 */

.almgr-asset-view .almgr-requests-table {
	width: 100%;
	font-size: 1em;
	border-collapse: separate;
	border-spacing: 0;
	margin: 1rem 0;
	background: #fff;
	border: 1px solid #d9e1e6;
	border-radius: 8px;
	overflow: hidden;
}

.almgr-asset-view .almgr-requests-table thead {
	background: #f5f7fa;
}

.almgr-asset-view .almgr-requests-table th {
	padding: 0.65rem 0.9rem;
	text-align: left;
	font-weight: 600;
	font-size: 1em;
	letter-spacing: 0.02em;
	color: #17324d;
	border: 0;
	border-bottom: 1px solid #d9e1e6;
}

.almgr-asset-view .almgr-requests-table td {
	padding: 0.75rem 0.9rem;
	vertical-align: top;
	border: 0;
	border-bottom: 1px solid #e8edf1;
}

.almgr-asset-view .almgr-requests-table th + th {
	border-left: 1px solid #e8edf2;
}

.almgr-asset-view .almgr-requests-table td + td {
	border-left: 1px solid #f1f4f7;
}

.almgr-asset-view .almgr-requests-table thead th:nth-child(1) {
	width: 18%;
}

.almgr-asset-view .almgr-requests-table thead th:nth-child(2) {
	width: 44%;
}

.almgr-asset-view .almgr-requests-table thead th:nth-child(3) {
	width: 16%;
}

.almgr-asset-view .almgr-requests-table thead th:nth-child(4) {
	width: 22%;
}

.almgr-asset-view .almgr-requests-table tbody tr:nth-child(even) {
	background: #fbfcfd;
}

.almgr-asset-view .almgr-requests-table tbody tr:last-child td {
	border-bottom: 0;
}

.almgr-request-requester {
	min-width: 10rem;
	font-weight: 600;
	color: #12263a;
}

.almgr-request-date {
	white-space: nowrap;
	color: #4f6376;
	font-size: 1em;
}

.almgr-request-message {
	max-width: 32rem;
}

.almgr-message-preview {
	margin: 0;
	color: #1f3347;
	line-height: 1.4;
	word-break: break-word;
}

.almgr-message-details {
	margin-top: 0.5rem;
}

.almgr-message-toggle {
	cursor: pointer;
	font-size: 1em;
	font-weight: 600;
	color: #0066cc;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.almgr-message-toggle::-webkit-details-marker {
	display: none;
}

.almgr-message-toggle::before {
	content: '+';
	font-size: 0.95rem;
	line-height: 1;
}

.almgr-message-details[open] .almgr-message-toggle::before {
	content: '-';
}

.almgr-message-toggle-open {
	display: inline;
}

.almgr-message-toggle-close {
	display: none;
}

.almgr-message-details[open] .almgr-message-toggle-open {
	display: none;
}

.almgr-message-details[open] .almgr-message-toggle-close {
	display: inline;
}

.almgr-message-toggle:hover,
.almgr-message-toggle:focus {
	color: #004b99;
}

.almgr-message-full {
	margin-top: 0.5rem;
	padding: 0.6rem 0.7rem;
	background: #f5f9ff;
	border: 1px solid #d7e6ff;
	border-radius: 6px;
	line-height: 1.45;
	color: #17324d;
	white-space: pre-wrap;
	word-break: break-word;
}

.almgr-request-actions {
	white-space: nowrap;
}

.almgr-request-actions .almgr-button--small + .almgr-button--small {
	margin-left: 0.35rem;
}

@media (max-width: 768px) {
	.almgr-asset-view .almgr-requests-table thead {
		display: none;
	}

	.almgr-asset-view .almgr-requests-table,
	.almgr-asset-view .almgr-requests-table tbody,
	.almgr-asset-view .almgr-requests-table tr,
	.almgr-asset-view .almgr-requests-table td {
		display: block;
		width: 100%;
	}

	.almgr-asset-view .almgr-requests-table {
		border: 0;
		background: transparent;
	}

	.almgr-asset-view .almgr-requests-table tr {
		margin-bottom: 0.85rem;
		font-size: 1em;
		background: #fff;
		border: 1px solid #d9e1e6;
		border-radius: 8px;
		overflow: hidden;
	}

	.almgr-asset-view .almgr-requests-table td {
		position: relative;
		padding: 0.8rem 0.8rem 0.8rem 8.5rem;
		border-bottom: 1px solid #edf2f6;
		border-left: 0;
		min-height: 2.8rem;
	}

	.almgr-asset-view .almgr-requests-table td + td {
		border-left: 0;
	}

	.almgr-asset-view .almgr-requests-table td:last-child {
		border-bottom: 0;
	}

	.almgr-asset-view .almgr-requests-table td::before {
		content: attr(data-label);
		position: absolute;
		left: 0.8rem;
		top: 0.8rem;
		width: 7.2rem;
		font-size: 1em;
		font-weight: 700;
		letter-spacing: 0.03em;
		color: #4f6376;
		text-transform: uppercase;
	}

	.almgr-request-date,
	.almgr-request-requester {
		white-space: normal;
	}

	.almgr-request-actions .almgr-button--small {
		display: inline-block;
		width: auto;
		margin: 0 0.4rem 0.35rem 0;
	}
}
