/* Profile page: settings tables shared styling */
/* Ensure consistent actions column width and no wrapping across all settings tables */
#bankingDetailsTable th.actions-col,
#bankingDetailsTable td.actions-col,
#noteTemplatesTable th.actions-col,
#noteTemplatesTable td.actions-col,
#emailTemplatesTable th.actions-col,
#emailTemplatesTable td.actions-col,
#teamsTable th.actions-col,
#teamsTable td.actions-col {
	width: 220px;
	white-space: nowrap;
}

/* Tax rates table actions column */
#taxRatesTable th.actions-col,
#taxRatesTable td.actions-col {
	/* keep enough room for buttons to stay on one line */
	width: 360px;
	white-space: normal;
}

/* Tax rates table: slightly smaller typography to save horizontal space */
#taxRatesTable {
	font-size: 0.875rem;
}

#taxRatesTable .badge {
	font-size: 0.75em;
}

/* Tax rates table: encourage more room for the actions column */
#taxRatesTable th.name-col,
#taxRatesTable td.name-col {
	/* allow this column to grow and absorb extra horizontal space */
	min-width: 240px;
}

#taxRatesTable th.default-col,
#taxRatesTable td.default-col {
	width: 90px;
}

#taxRatesTable th.rate-col,
#taxRatesTable td.rate-col {
	width: 90px;
}

#taxRatesTable th.status-col,
#taxRatesTable td.status-col {
	width: 100px;
}

#taxRatesTable .tax-rate-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .375rem;
	justify-content: flex-start;
}

/* On wider screens, keep the row actions on a single line. */
@media (min-width: 992px) {
	#taxRatesTable .tax-rate-actions {
		flex-wrap: nowrap;
	}
}

/* Unify button look: consistent spacing, borders, and rounded corners */
#bankingDetailsTable td.actions-col .btn-group > .btn,
#noteTemplatesTable td.actions-col .btn-group > .btn,
#emailTemplatesTable td.actions-col .btn-group > .btn,
#teamsTable td.actions-col .btn-group > .btn {
	margin-right: .375rem; /* create a subtle gap between buttons */
	border-radius: var(--bs-btn-border-radius, .375rem) !important; /* each button rounded individually */
	border-width: 1px !important; /* ensure full borders on outline variants */
	border-style: solid !important;
	border-color: var(--bs-btn-border-color, var(--bs-border-color, #dee2e6)) !important;
	line-height: 1.25; /* normalize height across variants */
	padding: .25rem .5rem; /* align with btn-sm sizing */
}

/* Remove extra margin on the last button in the group */
#bankingDetailsTable td.actions-col .btn-group > .btn:last-child,
#noteTemplatesTable td.actions-col .btn-group > .btn:last-child,
#emailTemplatesTable td.actions-col .btn-group > .btn:last-child,
#teamsTable td.actions-col .btn-group > .btn:last-child {
	margin-right: 0;
}

/* Safety: ensure right-hand border exists for last buttons where Bootstrap collapse may hide it */
#bankingDetailsTable td.actions-col .btn-group > .btn:last-child,
#noteTemplatesTable td.actions-col .btn-group > .btn:last-child,
#emailTemplatesTable td.actions-col .btn-group > .btn:last-child,
#teamsTable td.actions-col .btn-group > .btn:last-child {
	border-right-width: 1px !important;
}

/* Collapsible profile section styling */
.profile-section {
	/* Accent color can be overridden per section via nth-of-type below */
	--qs-section-accent: var(--bs-primary, #0d6efd);
	--qs-section-summary-bg: var(--bs-light, #f8f9fa);
	--qs-section-summary-bg-open: #eef5ff;
	--qs-section-summary-bg-hover: #f2f6fc;

	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 0.5rem;
	background-color: #fff;
	margin: 1.5rem 0;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.profile-section:first-of-type {
	margin-top: 0;
}
.profile-section-summary {
	cursor: pointer;
	padding: 0.85rem 1rem;
	font-weight: 600;
	background: linear-gradient(
		90deg,
		var(--qs-section-accent) 0 0.35rem,
		var(--qs-section-summary-bg) 0.35rem 100%
	);
	border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.profile-section-summary:hover {
	background: linear-gradient(
		90deg,
		var(--qs-section-accent) 0 0.35rem,
		var(--qs-section-summary-bg-hover) 0.35rem 100%
	);
}
.profile-section-summary:focus-visible {
	outline: 3px solid rgba(13, 110, 253, 0.35);
	outline-offset: -3px;
}
.profile-section-summary::-webkit-details-marker,
.profile-section-summary::marker {
	display: none;
}
.profile-section-body {
	padding: 1.25rem 1rem;
}
.profile-section-caret {
	transition: transform 0.2s ease;
}
.profile-section[open] .profile-section-caret {
	transform: rotate(90deg);
}

/* Open section: slightly stronger header background & top accent */
.profile-section[open] .profile-section-summary {
	background: linear-gradient(
		90deg,
		var(--qs-section-accent) 0 0.35rem,
		var(--qs-section-summary-bg-open) 0.35rem 100%
	);
}

/* Give each section a slightly different accent stripe so users immediately see distinct sections. */
.profile-section:nth-of-type(6n + 1) { --qs-section-accent: #0d6efd; } /* blue */
.profile-section:nth-of-type(6n + 2) { --qs-section-accent: #198754; } /* green */
.profile-section:nth-of-type(6n + 3) { --qs-section-accent: #6f42c1; } /* purple */
.profile-section:nth-of-type(6n + 4) { --qs-section-accent: #fd7e14; } /* orange */
.profile-section:nth-of-type(6n + 5) { --qs-section-accent: #0dcaf0; } /* cyan */
.profile-section:nth-of-type(6n + 6) { --qs-section-accent: #dc3545; } /* red */

/* Tax Rates (Profile): normalize input heights so input-groups don't appear taller */
#taxRateCreateForm .form-control,
#taxRateCreateForm .input-group-text {
	/* Bootstrap default input height (approx), enforced for visual consistency */
	height: 2rem;
	line-height: 1.5;
}

#taxRateCreateForm .input-group-text {
	display: flex;
	align-items: center;
}

