/**
 * Business Directory - Frontend Styles
 * Standalone CSS (no Bootstrap dependency).
 *
 * @package Business_Directory
 */

/* --- Base Reset --- */
.bdr-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* --- Search Bar --- */
#bdr-search-bar {
	padding: 15px;
	background: #f8f9fa;
	border-radius: 6px;
	border: 1px solid #dee2e6;
	margin-bottom: 15px;
}

.bdr-search-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.bdr-search-field {
	flex: 1;
	min-width: 200px;
}

.bdr-search-field input[type="text"],
.bdr-search-field select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ced4da;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	background: #fff;
	box-sizing: border-box;
}

.bdr-search-field input[type="text"]:focus,
.bdr-search-field select:focus {
	border-color: #86b7fe;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.bdr-search-actions {
	margin-top: 10px;
}

/* --- Buttons --- */
.bdr-btn {
	display: inline-block;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
	border: 1px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	background: none;
}

.bdr-btn-secondary {
	color: #6c757d;
	border-color: #6c757d;
	background: transparent;
}

.bdr-btn-secondary:hover {
	color: #fff;
	background: #6c757d;
}

.bdr-btn-outline {
	color: #0d6efd;
	border-color: #0d6efd;
	background: transparent;
}

.bdr-btn-outline:hover {
	color: #fff;
	background: #0d6efd;
}

/* --- Org Browse --- */
.bdr-org-toggle {
	margin-bottom: 15px;
}

.bdr-org-browse {
	margin-bottom: 15px;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	padding: 12px;
	background: #fff;
}

.bdr-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	padding: 0;
	margin: 0 0 10px 0;
	font-size: 13px;
}

.bdr-breadcrumb-item {
	color: #6c757d;
}

.bdr-breadcrumb-item + .bdr-breadcrumb-item::before {
	content: "›";
	padding: 0 6px;
	color: #adb5bd;
}

.bdr-breadcrumb-item a {
	color: #0d6efd;
	text-decoration: none;
}

.bdr-breadcrumb-item a:hover {
	text-decoration: underline;
}

.bdr-breadcrumb-active {
	font-weight: 600;
	color: #333;
}

.bdr-org-list {
	display: flex;
	flex-direction: column;
}

.bdr-org-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 14px;
	border: 1px solid #dee2e6;
	border-bottom: none;
	background: #fff;
	color: #333;
	text-decoration: none;
	cursor: pointer;
	font-size: 14px;
}

.bdr-org-item:first-child {
	border-radius: 4px 4px 0 0;
}

.bdr-org-item:last-child {
	border-bottom: 1px solid #dee2e6;
	border-radius: 0 0 4px 4px;
}

.bdr-org-item:only-child {
	border-radius: 4px;
}

.bdr-org-item:hover {
	background: #f8f9fa;
}

.bdr-org-item.active {
	background: #e7f1ff;
	border-color: #86b7fe;
}

.bdr-org-back {
	font-weight: 500;
	color: #0d6efd;
}

.bdr-org-count {
	display: inline-block;
	padding: 2px 8px;
	background: #6c757d;
	color: #fff;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
}

.bdr-org-chevron {
	margin-left: 8px;
	opacity: 0.5;
	font-size: 1.2em;
}

.bdr-org-loading {
	padding: 12px;
	text-align: center;
	color: #6c757d;
}

/* --- ABC Filter --- */
#bdr-abc-filter {
	margin-bottom: 15px;
}

.bdr-letter-group {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
}

.bdr-letter-btn {
	display: inline-block;
	padding: 4px 8px;
	font-size: 12px;
	min-width: 30px;
	text-align: center;
	border: 1px solid #0d6efd;
	border-radius: 3px;
	background: transparent;
	color: #0d6efd;
	cursor: pointer;
	line-height: 1.4;
}

.bdr-letter-btn:hover {
	background: #e7f1ff;
}

.bdr-letter-btn.active {
	background: #0d6efd;
	color: #fff;
}

/* --- Directory Table --- */
.bdr-table-responsive {
	overflow-x: auto;
}

.bdr-directory-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.bdr-directory-table th,
.bdr-directory-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #dee2e6;
}

.bdr-directory-table thead th {
	background: #f8f9fa;
	font-weight: 600;
	white-space: nowrap;
	border-bottom: 2px solid #dee2e6;
}

.bdr-directory-table tbody tr:hover {
	background: #f8f9fa;
}

.bdr-directory-table tbody tr:nth-child(even) {
	background: #fafbfc;
}

.bdr-directory-table tbody tr:nth-child(even):hover {
	background: #f0f1f2;
}

.bdr-directory-table a {
	color: #0d6efd;
	text-decoration: none;
}

.bdr-directory-table a:hover {
	text-decoration: underline;
}

.bdr-sortable {
	cursor: pointer;
	user-select: none;
}

.bdr-sortable:hover {
	background-color: #e9ecef;
}

.bdr-sort-icon {
	font-size: 0.75rem;
	opacity: 0.5;
	margin-left: 4px;
}

.bdr-sortable.asc .bdr-sort-icon::after { content: " \2191"; }
.bdr-sortable.desc .bdr-sort-icon::after { content: " \2193"; }

.bdr-no-results {
	text-align: center;
	color: #6c757d;
	padding: 30px 12px !important;
}

/* Loading state */
#bdr-table-container.bdr-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* --- Pagination --- */
#bdr-pagination-wrapper {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 15px;
	flex-wrap: wrap;
	gap: 10px;
}

#bdr-results-info {
	font-size: 13px;
	color: #6c757d;
}

.bdr-pagination-list {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 2px;
}

.bdr-pagination-list li {
	display: inline-block;
}

.bdr-page-link {
	display: inline-block;
	padding: 5px 10px;
	font-size: 13px;
	border: 1px solid #dee2e6;
	border-radius: 3px;
	color: #0d6efd;
	text-decoration: none;
	background: #fff;
}

.bdr-page-link:hover {
	background: #e9ecef;
	text-decoration: none;
}

.bdr-page-active .bdr-page-link {
	background: #0d6efd;
	color: #fff;
	border-color: #0d6efd;
}

.bdr-page-ellipsis span {
	display: inline-block;
	padding: 5px 8px;
	font-size: 13px;
	color: #6c757d;
}

/* --- Login Required --- */
.bdr-login-required {
	padding: 15px;
	background: #fff3cd;
	border: 1px solid #ffecb5;
	border-radius: 4px;
	color: #664d03;
}

.bdr-login-required a {
	color: #0d6efd;
	font-weight: 600;
}

/* --- Single Listing Detail --- */
.bdr-single-container {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px;
}

.bdr-back-link {
	margin-bottom: 15px;
}

.bdr-back-link a {
	color: #6c757d;
	text-decoration: none;
	font-size: 14px;
}

.bdr-back-link a:hover {
	color: #333;
}

.bdr-card {
	border: 1px solid #dee2e6;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.bdr-card-header {
	padding: 20px;
	background: #f8f9fa;
	border-bottom: 1px solid #dee2e6;
}

.bdr-listing-title {
	font-size: 1.5em;
	margin: 0 0 4px 0;
}

.bdr-listing-owner {
	color: #6c757d;
	margin: 0 0 4px 0;
}

.bdr-listing-categories {
	font-size: 13px;
	color: #6c757d;
	margin: 0;
}

.bdr-card-body {
	padding: 20px;
}

.bdr-detail-columns {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
}

.bdr-detail-col {
	flex: 1;
	min-width: 250px;
}

.bdr-detail-col h3 {
	font-size: 1.1em;
	margin: 0 0 12px 0;
}

.bdr-detail-list {
	margin: 0;
}

.bdr-detail-list dt {
	font-weight: 600;
	color: #555;
	font-size: 13px;
	margin-top: 8px;
}

.bdr-detail-list dt:first-child {
	margin-top: 0;
}

.bdr-detail-list dd {
	margin: 2px 0 0 0;
}

.bdr-detail-list a {
	color: #0d6efd;
	text-decoration: none;
}

.bdr-detail-list a:hover {
	text-decoration: underline;
}

.bdr-divider {
	margin: 20px 0;
	border: 0;
	border-top: 1px solid #dee2e6;
}

.bdr-description {
	max-width: 800px;
	line-height: 1.6;
}

/* --- Page Template --- */
.bdr-page-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.bdr-page-title {
	margin: 0 0 20px 0;
}

.bdr-page-content {
	margin-bottom: 20px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
	.bdr-search-row {
		flex-direction: column;
	}

	.bdr-search-field {
		min-width: 100%;
	}

	.bdr-letter-btn {
		padding: 3px 6px;
		font-size: 11px;
		min-width: 24px;
	}

	.bdr-detail-columns {
		flex-direction: column;
	}

	#bdr-pagination-wrapper {
		flex-direction: column;
		align-items: flex-start;
	}

	.bdr-single-container {
		padding: 10px;
	}
}
