/*============== Expense tables ==============*/
.listing.expense:not(.no-hover) tr:hover{
	background:#d4c1d6; /*purple*/
	background: #dcebca; /*pale green*/
	background: #eff6ff !important; /*light blue*/
}

.listing.expense th {
	font-weight: normal;
	font-size: 11px;
}
.listing.expense td {
	font-size: 11px;
	padding: 8px 10px;
	border-bottom: 1px solid #e0e0e0;
}
.listing.expense-form td {
	padding: 6px 8px 2px;
	vertical-align: top;
    padding: 16px 8px 12px;
}
.listing.expense-form td input[type="text"],
.listing.expense-form td textarea,
.listing.expense-form td select {
	/*
	background-color: transparent;
	border-color: transparent;
	*/
	font-size: 11px;
	margin: 0;
	padding: 6px 5px;
}
.listing.expense-form td input[type="text"],
.listing.expense-form td .textarea-field {
	width: 100%;
}
.expense-form td.has-error input[type="text"],
.expense-form td.has-error textarea,
.expense-form td.has-error select {
	border-color: #e87 !important;
}

.listing.expense-form input[disabled],
.listing.expense-form textarea[disabled],
.listing.expense-form select[disabled] {
	background-color: #ebebe4;
	color: #555;
}
.listing.expense-form td input[name="bamount"][readonly] {
	background-color: transparent;
	border: 0;
}
.listing.expense-form .datepicker {
	width: 85px !important;
}
.listing.expense-form .amount-field {
	text-align: right;
	min-width: 80px;
	max-width: 100px;
}
.listing.expense-form .category-field {
    width: 220px;
}
.listing.expense-form .category-field.has-mileage select {
    width: 140px
}
.listing.expense-form .category-field.has-mileage .mileage-field {
    display: inline-block;
}
.listing.expense-form td.category-field .mileage-field {
    display: none;
    margin-left: 6px;
    width: 54px;
}
.listing.expense-form .tpo-field {
	min-width: 100px;
}
.listing.expense-form .gpcode-field {
	background-color: transparent;
	border-color: transparent !important;
}
.listing.expense-form .textarea-field {
	height: 30px;
	min-width: 190px;
}
.listing.expense-form .amount-calculated {
	height: 30px;
	text-align: right;
}
.expense-form .error-msg,
.mileage-form .error-msg {
	color: #e87;
	font-size: 11px;
	font-style: italic;
	text-align: left;
}
.expense-form-table {
	padding:0 10px 10px;
}

.listing.expense tr.total-expense td {
	border-bottom: 0;
	font-weight: bold;
	text-align: right;
}
.listing.expense tr.total-expense:hover {
	background-color: transparent;
}
.listing.expense tr.gpcode-77500 {
    color: #f67;
    background-color: #f6dedc;
}
.listing.expense tr.gpcode-77500:hover {
    background-color: #ffdbd6 !important;
}
.listing.expense.expense-purchase-order tbody tr + tr.sub-total {
    border-bottom: 1px solid #888;
}

.form-control-file.is-invalid~.invalid-feedback {
	display: block;
}

/*============== Receipt upload ==============*/
.upload-receipt-form #receipt {
	width: 0.1px;
	height: 0.1px;
	opacity: 0;
	overflow: hidden;
	position: absolute;
	z-index: -1;
}
.upload-receipt-form #receipt + label {
	cursor: pointer;
	display: flex;
	font-size: 11px;
    padding: 0;
    white-space: nowrap;
}
.upload-receipt-form #receipt + label strong,
.upload-receipt-form #receipt + label span {
	padding: 6px 14px;
}
.upload-receipt-form #receipt + label strong {
	background-color: #006690;
	color: #fff;
	text-align: center;
}
.upload-receipt-form #receipt + label span {
	overflow: hidden;
	text-overflow: ellipsis;
	width: 180px;
}
.upload-receipt-form .selected-files {
	display: none;
	margin: 20px 0 0;
}
.upload-receipt-form .selected-files ul {
	list-style-type: none;
	margin: 5px 0;
}
.upload-receipt-form .selected-files ul li {
	color: #333;
	display: flex;
	align-items: center;
	padding: 3px 0;
}
.upload-receipt-form .selected-files ul li .remove-file {
	color: #f65356;
	cursor: pointer;
	margin-right: 8px;
}
.upload-receipt-form .selected-files ul li .title {
	user-select: none;
	display: none;
}
.upload-receipt-form .selected-files ul li .new-title {
    border: 0;
	margin: 0;
    padding: 2px 0;
    width: 100%;
}
#receipt-dropzone {
	background-color: rgba(0,0,0, .05);
	border: 2px dashed rgb(0, 102, 144, .2);
	border-radius: 5px;
	cursor: pointer;
	display: flex;
	text-align: center;
	flex-direction: column;
	justify-content: center;
	height: 160px;
	padding: 12px;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
#receipt-dropzone:hover {
	border: 2px dashed rgb(0, 102, 144, .3);
	background-color: rgba(0,0,0, .06);
}
#receipt-dropzone.dragover {
	border: 2px solid rgb(0, 102, 144, .5);
	box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
}
#receipt-dropzone i.icon {
	color: #cfcfcf;
	font-size: 30px;
}
#receipt-dropzone h5 {
	font-size: 14px;
	font-weight: bold;
	margin: 0;
	padding: 15px 0 5px;
}
#receipt-dropzone p {
	color: #777;
	font-weight: bold;
	margin: 0;
	padding: 0;
}

/*============== Receipts list ==============*/
.receipts-list {
    margin: 0;
    padding: 0;
}
.receipts-list .receipt-item {
    position: relative;
}
.receipts-list .receipt-item-display,
.receipts-list .receipt-item-editable {
    background-color: #fff;
    border-bottom: 1px solid #e8ecee;
    display: flex;
    font-size: 13px;
    min-height: 44px;
}
.receipts-list .receipt-item-display.d-none,
.receipts-list .receipt-item-editable.d-none {
    display: none;
}
.receipts-list .receipt-item-display:hover {
    background-color: #f6f8f9;
}
.receipts-list .receipt-item-editable {
    border-bottom-color: #14aaf5;
}
.receipts-list .receipt-name,
.receipts-list .new-title {
    align-self: center;
    border: 0;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    padding-left: 4px;

    white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    white-space: pre-wrap;       /* css-3 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
    white-space: -webkit-pre-wrap; /* Newer versions of Chrome/Safari*/
    word-break: break-all;
    white-space: normal;
}
.receipts-list .new-title {
    flex-grow: 1;
}
.receipts-list .receipt-metadata {
    color: #666;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 11px;
    margin-left: auto;
    padding-left: 10px;
}
.receipts-list .receipt-item-display .receipt-metadata {
    min-width: 200px;
}
.receipts-list .receipt-buttons {
    margin-left: 10px;
}
.receipts-list .receipt-buttons .btn {
    font-size: 14px;
    margin: 0;
    padding: 10px 8px;
    text-decoration: none;
}
.receipts-list .uploading .receipt-item-display .receipt-metadata {
    display: none;
}
.receipts-list .uploading .progress {
	border-radius: 2px;
	height: 4px;
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
}
.receipts-list .uploading:after {
	content: '';
	background-color: rgba(0,0,0, .1);
	border-radius: 3px;
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
	z-index: 2;
}
.receipts-list .uploaded:before {
	content: "\f00c";
    color: #28a745;
	font-family: 'FontAwesome';
    font-size: 14px;
	position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
	z-index: -1;
	opacity: 0;
	animation: clearUpload 1s ease-out;
}
.receipts-list .uploaded:after {
	content: '';
	background-color: rgba(66, 129, 255, .2);
	border-radius: 3px;
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
	z-index: -1;
    opacity: 0;
	animation: clearUpload 500ms ease-out;
}
@keyframes clearUpload {
	from {
		opacity: 1;
		z-index: 2;
	} to {
		opacity: 0;
		z-index: -1;
	}
}

.progress-bar.active, .progress.active .progress-bar {
	-webkit-animation: progress-bar-stripes 2s linear infinite;
	-o-animation: progress-bar-stripes 2s linear infinite;
	animation: progress-bar-stripes 2s linear infinite;
}
@keyframes progress-bar-stripes {
	0% {
		background-position: 40px 0;
	}
	100% {
		background-position: 0 0;
	}
}

/*============== Expense modals ==============*/
.modal-fullscreen-btn,
.modal-newtab-btn {
	background-color: transparent;
	border: 0;
	color: #000;
	margin: -1rem -1rem -1rem auto;
	padding: .9rem .5rem;
	opacity: .5;
	outline: none;
	-webkit-appearance: none;
}
.modal-fullscreen-btn:hover,
.modal-fullscreen-btn:active,
.modal-newtab-btn:hover,
.modal-newtab-btn:active {
	background-color: transparent;
	opacity: .75;
	outline: none;
}
.modal-newtab-btn + .modal-fullscreen-btn,
.modal-fullscreen-btn + .btn-close {
	margin-left: 1.2rem;
}
.modal-newtab-btn {
	margin-right: -0.9rem;
	padding: .9rem .8rem;
}
.modal.show.modal-fullscreen {
	padding-right: 0 !important;
}
.modal.show.modal-fullscreen .modal-dialog {
    height: 100%;
	margin: 0;
	min-width: 100%;
	max-width: 100%;
	padding: 0;
	width: 100%;
}
.modal.show.modal-fullscreen .modal-dialog .modal-content {
	border: 0;
    border-radius: 0;
    height: 100%;
    overflow: hidden;
}
.modal.show.modal-fullscreen .modal-dialog .modal-content .modal-body {
    overflow: auto;
}

.tpo-total-cost {
	font-weight: bold;
	border-top: 3px double #333;
}
