/* ==========================================================================
   OpinionPartner v2 — Custom CSS
   Overrides for third-party libs that don't have Tailwind support
   ========================================================================== */

/* --- FormValidation integration (Bootstrap plugin → Tailwind look) --- */
.fv-plugins-message-container .fv-help-block {
	color: #ef4444;
	font-size: 0.8125rem;
	margin-top: 0.25rem;
}

.fv-plugins-bootstrap .is-invalid,
.fv-plugins-bootstrap .is-invalid:focus {
	border-color: #ef4444 !important;
	box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.fv-plugins-bootstrap .is-valid,
.fv-plugins-bootstrap .is-valid:focus {
	border-color: #22c55e !important;
}

/* FormValidation icon positioning fix */
.fv-plugins-icon {
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}

/* --- DataTables — Tailwind-compatible theme --- */
table.dataTable {
	width: 100% !important;
	font-size: 0.875rem;
	border-collapse: collapse;
}

table.dataTable thead th,
table.dataTable thead td {
	background-color: #f8fafc;
	color: #475569;
	font-weight: 600;
	padding: 0.75rem 1rem;
	text-align: left;
	border-bottom: 2px solid #e2e8f0;
	white-space: nowrap;
}

table.dataTable tbody td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}

table.dataTable tbody tr:hover {
	background-color: #f8fafc;
}

table.dataTable tbody tr.selected {
	background-color: #f0fdfa;
}

/* DataTables wrapper */
.dataTables_wrapper {
	font-size: 0.875rem;
	color: #475569;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info {
	padding: 0.75rem 0;
}

.dataTables_wrapper .dataTables_filter input {
	padding: 0.375rem 0.75rem;
	border: 1px solid #e2e8f0;
	border-radius: 0.5rem;
	outline: none;
	margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
	border-color: #00a99d;
	box-shadow: 0 0 0 2px rgba(0, 169, 157, 0.15);
}

.dataTables_wrapper .dataTables_length select {
	padding: 0.375rem 2rem 0.375rem 0.75rem;
	border: 1px solid #e2e8f0;
	border-radius: 0.5rem;
	outline: none;
	margin: 0 0.5rem;
}

.dataTables_wrapper .dataTables_paginate {
	padding: 0.75rem 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
	padding: 0.375rem 0.75rem;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	cursor: pointer;
	transition: all 0.15s;
	border: 1px solid transparent !important;
	margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
	background: #f1f5f9 !important;
	color: #1e293b !important;
	border-color: #e2e8f0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
	background: #00a99d !important;
	color: #ffffff !important;
	border-color: #00a99d !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
	color: #94a3b8 !important;
	cursor: default;
	background: transparent !important;
}

/* DataTables scrollX fix */
.dataTables_scrollBody {
	border-bottom: none !important;
}

/* --- DateRangePicker — Tailwind adjustments --- */
.daterangepicker {
	font-family: 'Inter', sans-serif;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.daterangepicker .ranges li.active {
	background-color: #00a99d;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
	background-color: #00a99d;
}

.daterangepicker .drp-buttons .btn-primary {
	background-color: #00a99d;
	border-color: #00a99d;
}

/* --- Toastr — Rounded theme --- */
#toast-container > .toast {
	border-radius: 0.75rem;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
	opacity: 1;
}

/* --- SweetAlert2 — Brand colors --- */
.swal2-confirm.swal2-styled {
	background-color: #00a99d !important;
	border-radius: 0.5rem;
}

.swal2-cancel.swal2-styled {
	border-radius: 0.5rem;
}

/* --- Common form inputs (Tailwind-ish defaults for dynamic content) --- */
.form-input,
.form-select,
input[type="text"].form-control,
input[type="email"].form-control,
input[type="password"].form-control,
input[type="number"].form-control,
input[type="url"].form-control,
input[type="tel"].form-control,
select.form-control,
textarea.form-control {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #e2e8f0;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #1e293b;
	background-color: #ffffff;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-control:focus {
	border-color: #00a99d;
	box-shadow: 0 0 0 2px rgba(0, 169, 157, 0.15);
}

/* --- Preloader utility --- */
.preloader-hide {
	opacity: 0;
	pointer-events: none;
}

/* --- Badge utilities (for billing status etc.) --- */
.badge-paid {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 500;
	background-color: #dcfce7;
	color: #166534;
}

.badge-waiting {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 500;
	background-color: #fef9c3;
	color: #854d0e;
}

/* --- Responsive table wrapper --- */
.table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* --- Cancel row (fraud report) --- */
tr.row-canceled td {
	color: #ef4444;
	text-decoration: line-through;
}
