@charset "UTF-8";

// Library of general classes to be used in text cells and other places
//
// The classes are prefixed by pk-.

$table-wrapper-background: $cell-background !default; // need a solid color.

$table-caption-color: $title-color !default;
$table-caption-side: top !default;

$table-headers-background: $title-background !default;
$table-headers-color: $title-color !default;
$table-headers-font-style: $title-font-style !default;
$table-headers-font-size: $title-font-size !default;
$table-headers-font-weight: $title-weight !default;
$table-headers-text-transform: $title-transform !default;
$table-headers-font-family: $title-font-family !default;

a.pk-button, a.pk-big-button {
	@extend %button;
	display: inline-block;
	margin: 0;
	height: auto;
	&.pk-button {
		padding: 0.5rem 1rem;
	}
	&.pk-big-button {
		padding: 2rem 4rem;
	}
}

div.link-cell.pk-button,
div.link-cell.pk-big-button {
	ul > li > a {
		@extend %button;
		display: block;
		margin: 0;
		height: auto;
	}
	&.pk-button ul > li > a {
		padding: 0.5rem 1rem;
	}
	&.pk-big-button ul > li > a {
		padding: 2rem 4rem;
	}
}

.pk-transparent {
	&.cell {
		border-color: transparent !important;
		background: transparent !important;
	}
}

.pk-no-border {
	&.cell {
		border: none !important;
	}
}

.pk-table-wrapper {
	overflow: auto;
	max-width: 100%;
	// scroll shadow
	background:
		linear-gradient(to right, $table-wrapper-background 30%, transparent),
		linear-gradient(to right, transparent, $table-wrapper-background 70%) 0 100%,
		radial-gradient(farthest-side at 0% 50%, rgba(0,0,0,0.25), transparent),
		radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.25), transparent) 0 100%;
	background-repeat: no-repeat;
	background-color: $table-wrapper-background;
	background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
	background-position: 0 0, 100%, 0 0, 100%;
	background-attachment: local, local, scroll, scroll;
}
table.pk-data-table {
	border-collapse: collapse;
	caption {
		caption-side: $table-caption-side;
		color: $table-caption-color;
		font-size: 120%;
		padding: 1rem;
	}
	th, td {
		padding: 0.3em 1.5em 0.3em 0.7em;
		border-bottom: 1px solid #aaa;
	}
	th {
		border-bottom-width: 2px;
	}
}
.pk-table-headers {
	&.pk-data-table {
		thead th {
			background: $table-headers-background;
			color: $table-headers-color;
			font-style: $table-headers-font-size;
			font-weight: $table-headers-font-weight;
			text-transform: $table-headers-text-transform;
			font-family: $table-headers-font-family;
		}
	}
}
.pk-table-borders {
	&.pk-data-table {
		th, td {
			border: 1px solid #aaa;
		}
		th {
			border-bottom-width: 2px;
		}
	}
}
.pk-table-center {
	&.pk-data-table {
		th, td {
			text-align: center;
		}
	}
}
.pk-table-🦓,
.pk-table-zebra {
	&.pk-data-table {
		tbody tr:nth-child(2n+1) {
			background: rgba(0, 0, 0, 0.065);
		}
	}
}


.pk-important {
	// on form fields, turn the label bold.
	&.widget .title label {
		font-weight: bold;
	}
}

.pk-budget-table,
.budget-table {
	table {
		width: 100%;
	}
	th {
		text-align: left;
		font-weight: normal;
	}
	tbody td:last-child {
		width: 30%;
	}
}

.pk-information {
	&, &.cell { @extend .infonotice; }
}

.pk-attention {
	&, &.cell { @extend .warningnotice; }
}

.pk-error {
	&, &.cell { @extend .errornotice; }
}

.pk-success {
	&, &.cell { @extend .successnotice; }
}
