/* Shared request card + details modal (contractor/admin/organisation) */



.project-card,

.request-item {

	overflow: visible;

}

.requests-grid,
.projects-grid,
#projectGrid,
#organisationRequests {
	overflow: visible;
	padding-top: 12px;
	padding-right: 4px;
	padding-bottom: 8px;
}

.project-card {

	position: relative;

	padding-top: 18px;

	padding-bottom: 28px;

}



/* ---- Card: date badge floats above top-right corner ---- */

.project-card-date-badge--corner {

	position: absolute;

	top: -11px;

	right: 14px;

	z-index: 3;

	pointer-events: none;

}



.project-card-main-skill {
	position: absolute;
	top: 8px;
	left: 14px;
	z-index: 2;
	max-width: calc(100% - 7.5rem);
	font-size: 0.75rem;
	font-style: italic;
	font-weight: 500;
	line-height: 1.2;
	color: var(--tenant-primary, #582156);
	opacity: 0.82;
	pointer-events: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

[data-theme='dark'] .project-card-main-skill {
	color: rgba(255, 255, 255, 0.78);
	opacity: 1;
}

.project-card:has(.project-card-main-skill) .project-card-head {
	margin-top: 1rem;
}

.project-card-head {

	position: static;

	margin-bottom: 10px;

	min-height: 0;

}



.project-card-status-row {

	display: flex;

	flex-wrap: wrap;

	gap: 6px;

	margin-bottom: 6px;

}



.project-card-title {

	min-width: 0;

}



.project-card-title .project-org {

	margin-bottom: 0;

	min-height: 0;

	max-height: none;

	line-height: 1.35;

	word-break: break-word;

}



/* ---- Badges ---- */

.project-created-badge {

	display: inline-flex;

	align-items: center;

	gap: 4px;

	padding: 5px 10px;

	border-radius: 999px;

	font-size: 0.7rem;

	font-weight: 600;

	line-height: 1.25;

	color: var(--tenant-primary, #582156);

	background: #f4edf3;

	border: 1px solid #dcc9db;

}



.project-created-badge--compact {

	white-space: nowrap;

}



.project-created-badge--modal {

	font-size: 0.78rem;

	padding: 6px 12px;

	white-space: nowrap;

}



.project-created-badge .material-icons {

	font-size: 14px;

	opacity: 0.85;

	flex-shrink: 0;

}



[data-theme='dark'] .project-created-badge {

	color: #e9d4e6;

	background: #3a2d39;

	border-color: #5c4a62;

}



.project-applied-badge {

	position: absolute;

	bottom: 12px;

	right: 12px;

	z-index: 1;

	padding: 4px 10px;

	border-radius: 999px;

	font-size: 0.72rem;

	font-weight: 600;

	color: #166534;

	background: #dcfce7;

	border: 1px solid #86efac;

}



[data-theme='dark'] .project-applied-badge {

	color: #86efac;

	background: rgba(34, 197, 94, 0.2);

	border-color: rgba(134, 239, 172, 0.35);

}



.project-closed-badge {

	display: inline-flex;

	align-items: center;

	padding: 4px 10px;

	border-radius: 999px;

	font-size: 0.72rem;

	font-weight: 600;

	color: #475569;

	background: #f1f5f9;

	border: 1px solid #cbd5e1;

}



[data-theme='dark'] .project-closed-badge {

	color: #cbd5e1;

	background: rgba(148, 163, 184, 0.2);

	border-color: rgba(203, 213, 225, 0.35);

}



.project-org-name {

	font-size: 0.9rem;

	color: #888;

	margin-bottom: 8px;

}



[data-theme='dark'] .project-org-name {

	color: #aaa;

}



.project-dates,

.request-dates {

	font-size: 0.85rem;

	color: #666;

	margin-bottom: 10px;

}



[data-theme='dark'] .project-dates,

[data-theme='dark'] .request-dates {

	color: #a8a8a8;

}



/* ---- Modal: title block (badge lives in modal toolbar, left of close) ---- */

.request-details-top {

	position: relative;

	margin-bottom: 1.5rem;

	padding-bottom: 1rem;

	padding-top: 0.25rem;

	border-bottom: 1px solid rgba(88, 33, 86, 0.12);

}



[data-theme='dark'] .request-details-top {

	border-bottom-color: rgba(255, 255, 255, 0.1);

}



.request-details-top-title {

	margin: 0 0 0.35rem;

	padding-right: 0;

	font-size: 1.2rem;

	font-weight: 700;

	color: var(--tenant-primary, #582156);

	line-height: 1.35;

	word-break: break-word;

}



[data-theme='dark'] .request-details-top-title {

	color: #f0f0f0;

}



.request-details-top-org {

	margin: 0;

	font-size: 0.9rem;

	font-weight: 500;

	color: #666;

}



[data-theme='dark'] .request-details-top-org {

	color: #aaa;

}



#requestDetailsModal .request-details-modal-body {

	position: relative;

	padding: 1.25rem 1.25rem 1rem;

	padding-top: 2.75rem;

}



/* Created date badge: immediately left of the close (X) button */

#requestDetailsModal .request-details-modal-badge {

	position: absolute;

	top: 12px;

	right: 48px;

	z-index: 9;

	max-width: calc(100% - 5.5rem);

	pointer-events: none;

}



#requestDetailsModal .request-details-close {

	position: absolute;

	top: 12px;

	right: 12px;

	z-index: 10;

	margin: 0;

	padding: 0.5rem;

	opacity: 0.55;

}



#requestDetailsModal .request-details-close:hover {

	opacity: 1;

}



[data-theme='dark'] #requestDetailsModal .request-details-close {

	filter: invert(1);

	opacity: 0.75;

}



@media (max-width: 576px) {

	.project-card-date-badge--corner {

		top: -10px;

		right: 10px;

	}



	#requestDetailsModal .request-details-modal-badge {

		top: 10px;

		right: 44px;

		max-width: calc(100% - 4.75rem);

	}

}



@media (max-width: 768px) {

	#requestDetailsModal .modal-dialog {

		margin: 20px auto;

		width: calc(100% - 0.75rem);

		max-width: calc(100% - 0.75rem);

		height: calc(100vh - 40px);

		height: calc(100dvh - 40px);

		max-height: calc(100vh - 40px);

		max-height: calc(100dvh - 40px);

		align-items: stretch;

	}



	#requestDetailsModal .modal-dialog.modal-dialog-centered {

		min-height: calc(100% - 40px);

		align-items: stretch;

	}



	#requestDetailsModal .modal-content {

		height: 100%;

		max-height: 100%;

		display: flex;

		flex-direction: column;

	}



	#requestDetailsModal .modal-dialog-scrollable .modal-content {

		max-height: 100%;

	}



	#requestDetailsModal .request-details-modal-body {

		flex: 1 1 auto;

		min-height: 0;

		max-height: none;

		overflow-y: auto;

		-webkit-overflow-scrolling: touch;

	}

}


