/* tema furnizează clasele Bootstrap (btn, alert, table), aici stau doar ajustările proprii */

.lendrise-smartaccounts {
	max-width: 100%;
	margin-bottom: 1.5rem;
}

.lendrise-sa-alert p:last-child {
	margin-bottom: 0;
}

.lendrise-sa-heading {
	margin: 0 0 0.75rem;
	font-size: 1.15rem;
}

.lendrise-sa-heading--sub {
	margin-top: 1.5rem;
	font-size: 1rem;
}

/* panou: gruparea unui pas al fluxului împreună cu acțiunea lui principală */
.lendrise-sa-panel {
	margin-bottom: 1rem;
	padding: 1.1rem 1.25rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.015);
}

.lendrise-sa-panel__title {
	margin: 0 0 0.6rem;
	font-size: 1.05rem;
}

.lendrise-sa-panel__hint:empty {
	display: none;
}

.lendrise-sa-panel > *:last-child {
	margin-bottom: 0;
}

.lendrise-sa-field {
	margin-bottom: 0.9rem;
}

.lendrise-sa-field label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
	font-size: 0.9rem;
}

.lendrise-sa-field select,
.lendrise-sa-field input {
	width: 100%;
	max-width: 24rem;
}

/* băncile deja conectate */
.lendrise-sa-bank-list {
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.lendrise-sa-bank-list li {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.5rem;
	padding: 0.65rem 0.9rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
}

.lendrise-sa-bank-list__name {
	font-weight: 600;
}

/* tabele */
.lendrise-sa-table-wrap {
	max-width: 100%;
	margin-bottom: 1rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.lendrise-sa-table-wrap table {
	width: 100%;
	max-width: 100%;
	margin-bottom: 0;
}

/* fiecare celulă își împachetează conținutul, ca textele lungi să se rupă în loc să iasă din tabel */
.lendrise-sa-cell {
	display: block;
	min-width: 0;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.lendrise-sa-nowrap {
	white-space: nowrap;
}

.lendrise-sa-amount {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* referința suplimentară a tranzacției, sub textul principal */
.lendrise-sa-transaction__extra {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.85em;
	opacity: 0.7;
	word-break: break-all;
}

.lendrise-sa-account__name {
	display: block;
	font-weight: 600;
}

.lendrise-sa-account__iban {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.9em;
	opacity: 0.8;
	word-break: break-all;
}

/* controalele DataTables nu trebuie să lățească pagina */
.lendrise-sa-table-wrap .dataTables_wrapper {
	max-width: 100%;
}

.lendrise-sa-table-wrap .dataTables_filter input,
.lendrise-sa-table-wrap .dataTables_length select {
	max-width: 100%;
}

.lendrise-sa-transactions__period {
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
	opacity: 0.75;
}

/* bara de acțiuni de la finalul fiecărui ecran */
.lendrise-sa-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: center;
	justify-content: space-between;
	margin-top: 1.5rem;
	padding-top: 0.9rem;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.lendrise-sa-toolbar__group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
}

.lendrise-sa-toolbar__group:empty {
	display: none;
}

.lendrise-sa-toolbar form {
	margin: 0;
}

/* acțiunile distructive rămân discrete, ca să nu concureze cu acțiunea principală */
.lendrise-sa-link-danger {
	padding: 0;
	border: 0;
	background: none;
	color: #b02a37;
	font-size: 0.875rem;
	text-decoration: underline;
	cursor: pointer;
}

.lendrise-sa-link-danger:hover,
.lendrise-sa-link-danger:focus {
	color: #8b1f29;
}

.lendrise-sa-link-danger--urgent {
	font-weight: 600;
}

/* acțiune deja pornită: butonul sau linkul nu mai poate fi apăsat */
.lendrise-smartaccounts .is-busy {
	opacity: 0.6;
	pointer-events: none;
	cursor: default;
}

/* pe ecrane mici tabelele devin liste, cu eticheta deasupra valorii */
@media screen and (max-width: 782px) {
	.lendrise-sa-table-wrap {
		overflow-x: visible;
	}

	.lendrise-sa-table-wrap table,
	.lendrise-sa-table-wrap tbody,
	.lendrise-sa-table-wrap tr,
	.lendrise-sa-table-wrap td {
		display: block;
		width: 100%;
		max-width: 100%;
	}

	.lendrise-sa-table-wrap thead {
		display: none;
	}

	.lendrise-sa-table-wrap tr {
		margin-bottom: 0.75rem;
		border: 1px solid rgba(0, 0, 0, 0.15);
		border-radius: 6px;
		overflow: hidden;
	}

	.lendrise-sa-table-wrap td {
		padding: 0.55rem 0.85rem;
		border: 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.07);
	}

	.lendrise-sa-table-wrap tr td:last-child {
		border-bottom: 0;
	}

	/* eticheta stă pe rândul ei, deci valoarea primește toată lățimea */
	.lendrise-sa-table-wrap td::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 0.15rem;
		font-size: 0.7rem;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.05em;
		opacity: 0.6;
	}

	/* o celulă goală nu merită un rând propriu */
	.lendrise-sa-table-wrap td.is-empty {
		display: none;
	}

	.lendrise-sa-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.lendrise-sa-toolbar__group {
		justify-content: flex-start;
	}
}
