/*!
 * iBuilder Connect for Procore front-end styles.
 *
 * Do not edit this file: it is replaced on every plugin update. To restyle the
 * output, either add rules under Procore -> Display -> Custom CSS, or copy a
 * template from the plugin's templates/ directory into yourtheme/ibuilder-procore/.
 */

.ibuilder-procore {
	margin: 0 0 1.5rem;
}

.ibuilder-procore-title {
	margin: 0 0 0.75rem;
	font-size: 1.125rem;
	line-height: 1.3;
}

/* Tables --------------------------------------------------------------- */

.ibuilder-procore-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ibuilder-procore-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.ibuilder-procore-table th,
.ibuilder-procore-table td {
	padding: 0.625rem 0.75rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ibuilder-procore-table thead th {
	font-weight: 600;
	white-space: nowrap;
	border-bottom-width: 2px;
}

.ibuilder-procore-table tbody tr:last-child td {
	border-bottom: 0;
}

/* Detail lists --------------------------------------------------------- */

.ibuilder-procore-details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 0.75rem 1.5rem;
	margin: 0;
}

.ibuilder-procore-detail dt {
	margin: 0 0 0.125rem;
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.7;
}

.ibuilder-procore-detail dd {
	margin: 0;
}

/* Single fields -------------------------------------------------------- */

.ibuilder-procore-field {
	display: inline-flex;
	gap: 0.375rem;
	align-items: baseline;
	margin: 0 0 0.5rem;
}

.ibuilder-procore-field__label {
	font-weight: 600;
}

.ibuilder-procore-field__label::after {
	content: ":";
}

/* Status badges -------------------------------------------------------- */

.ibuilder-procore-status {
	display: inline-block;
	padding: 0.125rem 0.5rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.07);
}

.ibuilder-procore-status--active {
	background: rgba(22, 128, 70, 0.12);
	color: #0f5132;
}

.ibuilder-procore-status--inactive {
	background: rgba(0, 0, 0, 0.07);
	opacity: 0.8;
}

/* Images --------------------------------------------------------------- */

.ibuilder-procore-image {
	margin: 0 0 1.5rem;
}

.ibuilder-procore-image img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Locations ------------------------------------------------------------ */

.ibuilder-procore-map__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	gap: 1rem;
}

.ibuilder-procore-map__item {
	padding: 0.875rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 0.375rem;
}

.ibuilder-procore-map__name {
	display: block;
	font-weight: 600;
}

.ibuilder-procore-map__location {
	display: block;
	font-size: 0.875rem;
	opacity: 0.75;
}

.ibuilder-procore-map__link {
	display: inline-block;
	margin-top: 0.375rem;
	font-size: 0.875rem;
}

/* Notices -------------------------------------------------------------- */

.ibuilder-procore-notice {
	padding: 0.75rem 1rem;
	margin: 0 0 1.5rem;
	border-left: 3px solid rgba(0, 0, 0, 0.2);
	background: rgba(0, 0, 0, 0.03);
	font-size: 0.9375rem;
}

.ibuilder-procore-notice--error {
	border-left-color: #b32d2e;
	background: rgba(179, 45, 46, 0.06);
}

.ibuilder-procore-notice--empty {
	font-style: italic;
	opacity: 0.85;
}

/* Small screens -------------------------------------------------------- */

@media (max-width: 600px) {
	.ibuilder-procore-table,
	.ibuilder-procore-table thead,
	.ibuilder-procore-table tbody,
	.ibuilder-procore-table tr,
	.ibuilder-procore-table td {
		display: block;
		width: 100%;
	}

	.ibuilder-procore-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.ibuilder-procore-table tr {
		padding: 0.5rem 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	}

	.ibuilder-procore-table td {
		display: flex;
		justify-content: space-between;
		gap: 1rem;
		padding: 0.25rem 0;
		border: 0;
	}

	.ibuilder-procore-table td::before {
		content: attr(data-label);
		font-weight: 600;
		opacity: 0.7;
	}
}

@media (prefers-color-scheme: dark) {
	.ibuilder-procore-table th,
	.ibuilder-procore-table td,
	.ibuilder-procore-map__item {
		border-color: rgba(255, 255, 255, 0.15);
	}

	.ibuilder-procore-status,
	.ibuilder-procore-notice {
		background: rgba(255, 255, 255, 0.07);
	}
}
