/**
 * Frontend Styles
 *
 * @package SBSM\AITranscription
 */

/* Search Container */
.sbsm-transcript-search {
	max-width: 800px;
	margin: 30px auto;
	padding: 0 15px;
}

/* Search Form */
.sbsm-search-form {
	margin-bottom: 30px;
}

.sbsm-search-input-wrapper {
	display: flex;
	gap: 10px;
	margin-bottom: 15px;
}

.sbsm-search-input {
	flex: 1;
	padding: 12px 15px;
	font-size: 16px;
	border: 2px solid #ddd;
	border-radius: 4px;
	transition: border-color 0.3s;
	background-color: #fff !important;
	color: #1a1a1a !important;
}

.sbsm-search-input:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.sbsm-search-button {
	padding: 12px 24px;
	background: #0073aa;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 16px;
	font-weight: 500;
	transition: background 0.3s;
}

.sbsm-search-button:hover {
	background: #005a87;
}

.sbsm-search-button .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* Filters */
.sbsm-search-filters {
	padding: 15px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin-top: 15px;
}

.sbsm-search-filters label {
	display: block;
	margin-bottom: 10px;
}

.sbsm-search-filters select {
	padding: 5px 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
}

.sbsm-toggle-filters {
	background: none;
	border: none;
	color: #0073aa;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	padding: 5px 0;
	transition: color 0.3s;
}

.sbsm-toggle-filters:hover {
	color: #005a87;
	text-decoration: underline;
}

.sbsm-toggle-filters .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Loading Indicator */
.sbsm-search-loading {
	text-align: center;
	padding: 40px 20px;
	color: #666;
}

.sbsm-search-loading .spinner {
	float: none;
	margin: 0 auto 10px;
}

/* Search Results */
.sbsm-search-results {
	margin-top: 30px;
}

.sbsm-search-result {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 15px;
	transition: box-shadow 0.3s, transform 0.2s;
}

.sbsm-search-result:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.sbsm-result-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	flex-wrap: wrap;
	gap: 10px;
}

.sbsm-result-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}

.sbsm-result-header h3 a {
	color: #0073aa;
	text-decoration: none;
	transition: color 0.3s;
}

.sbsm-result-header h3 a:hover {
	color: #005a87;
	text-decoration: underline;
}

.sbsm-result-timestamp {
	background: #0073aa;
	color: white;
	padding: 5px 12px;
	border-radius: 3px;
	font-weight: bold;
	font-size: 14px;
	white-space: nowrap;
}

.sbsm-result-content {
	margin: 15px 0;
	line-height: 1.7;
	color: #333;
}

.sbsm-result-content p {
	margin: 0;
}

/* Q&A Badge */
.sbsm-qa-badge {
	background: #d4edda;
	border: 1px solid #c3e6cb;
	padding: 12px;
	border-radius: 4px;
	margin-top: 15px;
}

.sbsm-qa-badge strong {
	color: #155724;
	display: block;
	margin-bottom: 8px;
}

.sbsm-qa-badge p {
	margin: 5px 0 0 0;
	color: #155724;
}

/* Result Actions */
.sbsm-result-actions {
	margin-top: 15px;
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.sbsm-result-actions .button,
.sbsm-segment-actions .button {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 16px;
	text-decoration: none;
	border-radius: 4px;
	transition: all 0.3s;
}

.sbsm-result-actions .button-primary,
.sbsm-segment-actions .button-primary {
	background: #0073aa;
	color: white;
	border: none;
}

.sbsm-result-actions .button-primary:hover,
.sbsm-segment-actions .button-primary:hover {
	background: #005a87;
}

.sbsm-result-actions .button .dashicons,
.sbsm-segment-actions .button .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Load More */
.sbsm-load-more-wrapper {
	text-align: center;
	margin-top: 30px;
	padding: 20px 0;
}

.sbsm-load-more {
	padding: 12px 30px;
	font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.sbsm-search-input-wrapper {
		flex-direction: column;
	}

	.sbsm-search-button {
		width: 100%;
		justify-content: center;
	}

	.sbsm-result-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.sbsm-result-actions,
	.sbsm-segment-actions {
		flex-direction: column;
		width: 100%;
	}

	.sbsm-result-actions .button,
	.sbsm-segment-actions .button {
		width: 100%;
		justify-content: center;
	}

	.sbsm-transcript-search {
		padding: 0 10px;
	}
}

@media (max-width: 480px) {
	.sbsm-search-input {
		font-size: 14px;
	}

	.sbsm-result-header h3 {
		font-size: 16px;
	}

	.sbsm-search-result {
		padding: 15px;
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.sbsm-search-result {
		background: #1e1e1e;
		border-color: #444;
		color: #e0e0e0;
	}

	.sbsm-result-content {
		color: #e0e0e0;
	}

	.sbsm-result-header h3 a {
		color: #4a9eff;
	}

	.sbsm-search-input {
		background: #2a2a2a;
		color: #e0e0e0;
		border-color: #444;
	}

	.sbsm-search-filters {
		background: #2a2a2a;
		border-color: #444;
	}
}
