/* ==========================================================
   SheetFusion – Front-end Styles
   ========================================================== */

/* ── Wrapper ───────────────────────────────────────────── */
.sf-wrapper {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ── Error message ─────────────────────────────────────── */
.sf-error {
	padding: 12px 16px;
	background: #fff3cd;
	border-left: 4px solid #f0ad4e;
	color: #856404;
	border-radius: 3px;
	font-size: 0.9em;
}

/* ── Button toolbar ─────────────────────────────────────── */
.sf-buttons-row {
	text-align: right;
}

.sf-wrapper .dt-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-end;
	margin-bottom: 6px;
}

.sf-wrapper .dt-button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 12px;
	font-size: 13px;
	border-radius: 4px;
	border: 1px solid #c3c4c7;
	background: #f6f7f7;
	color: #2c3338;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	white-space: nowrap;
}

.sf-wrapper .dt-button:hover {
	background: #e9eaeb;
	border-color: #a0a5aa;
}

.sf-wrapper .dt-button:focus {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

/* ── Table base ─────────────────────────────────────────── */
.sf-table {
	width: 100% !important;
	border-collapse: collapse;
}

.sf-table caption {
	font-style: italic;
	color: #666;
	text-align: left;
	margin-bottom: 6px;
}

.sf-table thead th {
	white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
	.sf-buttons-row {
		text-align: left;
	}
	.sf-wrapper .dt-buttons {
		justify-content: flex-start;
	}
}

/* ==========================================================
   Theme: Stripe
   ========================================================== */
.sf-theme-stripe .sf-table {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
}

.sf-theme-stripe .sf-table thead {
	background: #2271b1;
	color: #fff;
}

.sf-theme-stripe .sf-table thead th {
	color: #fff;
	border-bottom: 2px solid #1d6093;
}

.sf-theme-stripe .sf-table tbody tr:nth-child(even) {
	background: #f4f8fd;
}

.sf-theme-stripe .sf-table tbody tr:hover {
	background: #d9e8f7;
}

/* ==========================================================
   Theme: Minimal
   ========================================================== */
.sf-theme-minimal .sf-table {
	border: none;
	border-top: 2px solid #333;
}

.sf-theme-minimal .sf-table thead th {
	background: transparent;
	font-weight: 700;
	border-bottom: 1px solid #999;
	text-transform: uppercase;
	font-size: 0.8em;
	letter-spacing: 0.05em;
}

.sf-theme-minimal .sf-table tbody tr:hover {
	background: #f9f9f9;
}

.sf-theme-minimal .sf-table td,
.sf-theme-minimal .sf-table th {
	border-left: none;
	border-right: none;
}

/* ==========================================================
   Theme: Dark
   ========================================================== */
.sf-theme-dark .sf-wrapper,
.sf-theme-dark {
	background: #1e1e2e;
	color: #cdd6f4;
	border-radius: 8px;
	padding: 16px;
}

.sf-theme-dark .sf-table {
	color: #cdd6f4;
}

.sf-theme-dark .sf-table thead {
	background: #313244;
}

.sf-theme-dark .sf-table thead th {
	color: #cba6f7;
	border-bottom: 2px solid #45475a;
}

.sf-theme-dark .sf-table tbody tr {
	background: #1e1e2e;
}

.sf-theme-dark .sf-table tbody tr:nth-child(even) {
	background: #2a2a3c;
}

.sf-theme-dark .sf-table tbody tr:hover {
	background: #313244;
}

.sf-theme-dark .sf-table td {
	border-color: #313244;
	color: #cdd6f4;
}

.sf-theme-dark .dataTables_wrapper .dataTables_length,
.sf-theme-dark .dataTables_wrapper .dataTables_filter,
.sf-theme-dark .dataTables_wrapper .dataTables_info,
.sf-theme-dark .dataTables_wrapper .dataTables_paginate {
	color: #cdd6f4;
}

.sf-theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button {
	color: #cdd6f4 !important;
}

.sf-theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.sf-theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
	background: #cba6f7;
	color: #1e1e2e !important;
	border-color: #cba6f7;
}

.sf-theme-dark .dataTables_wrapper select,
.sf-theme-dark .dataTables_wrapper input {
	background: #313244;
	color: #cdd6f4;
	border-color: #45475a;
}

.sf-theme-dark .dt-button {
	background: #313244;
	border-color: #45475a;
	color: #cdd6f4;
}

.sf-theme-dark .dt-button:hover {
	background: #45475a;
	border-color: #6c7086;
}

/* ── Row cap notice ─────────────────────────────────────── */
.sf-row-cap-notice {
	margin-top: 8px;
	padding: 8px 12px;
	background: #fff8e1;
	border-left: 4px solid #f0ad4e;
	color: #795600;
	border-radius: 3px;
	font-size: 0.88em;
}
