/**
 * Public-facing styles for Limo Split Tool
 * Mobile-first approach, inherits from theme where possible
 */

/* Container */
.lcs-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 1rem;
	font-family: inherit;
}

/* Header */
.lcs-header {
	margin-bottom: 2rem;
}

.lcs-title {
	font-size: 1.75rem;
	margin-bottom: 1rem;
	font-weight: bold;
}

.lcs-intro,
.lcs-instructions {
	margin-bottom: 1rem;
	line-height: 1.6;
}

/* Steps */
.lcs-step {
	display: none;
	padding: 1.5rem;
	background: inherit;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	margin-bottom: 1rem;
}

.lcs-step-active {
	display: block;
}

.lcs-step-title {
	font-size: 1.5rem;
	margin-bottom: 1rem;
	font-weight: bold;
}

.lcs-help-text {
	margin-bottom: 1rem;
	font-style: italic;
	color: inherit;
	opacity: 0.8;
}

/* Form Groups */
.lcs-form-group {
	margin-bottom: 1.5rem;
}

.lcs-label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.lcs-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.lcs-currency {
	margin-right: 0.5rem;
	font-weight: 600;
}

.lcs-input {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	font-size: 1rem;
	font-family: inherit;
	background: inherit;
	color: inherit;
}

.lcs-input:focus {
	outline: 2px solid rgba(0, 0, 0, 0.3);
	outline-offset: 2px;
}

/* Buttons */
.lcs-btn {
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-family: inherit;
	cursor: pointer;
	transition: opacity 0.2s;
}

.lcs-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.lcs-btn-primary {
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
}

.lcs-btn-primary:hover:not(:disabled) {
	opacity: 0.9;
}

.lcs-btn-secondary {
	background: rgba(0, 0, 0, 0.1);
	color: inherit;
}

.lcs-btn-secondary:hover:not(:disabled) {
	background: rgba(0, 0, 0, 0.2);
}

/* Add Friend/Stop */
.lcs-add-friend,
.lcs-add-stop {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.lcs-add-friend .lcs-input,
.lcs-add-stop .lcs-input {
	flex: 1;
}

/* Friends List */
.lcs-friends-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.lcs-friend-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 20px;
	font-size: 0.9rem;
}

.lcs-friend-tag button {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.2rem;
	line-height: 1;
	padding: 0;
	color: inherit;
	opacity: 0.7;
}

.lcs-friend-tag button:hover {
	opacity: 1;
}

/* Stops List */
.lcs-stops-list {
	margin-bottom: 1rem;
}

.lcs-stop-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem;
	margin-bottom: 0.5rem;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 4px;
}

.lcs-stop-number {
	font-weight: bold;
	min-width: 60px;
}

.lcs-stop-name {
	flex: 1;
}

.lcs-stop-actions {
	display: flex;
	gap: 0.25rem;
}

.lcs-stop-actions button {
	background: none;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	padding: 0.25rem 0.5rem;
	cursor: pointer;
	font-size: 0.9rem;
	color: inherit;
}

.lcs-stop-actions button:hover {
	background: rgba(0, 0, 0, 0.1);
}

/* Legs List */
.lcs-legs-list {
	margin-bottom: 1.5rem;
}

.lcs-leg-item {
	padding: 1rem;
	margin-bottom: 1rem;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 4px;
	border-left: 4px solid rgba(0, 0, 0, 0.3);
}

.lcs-leg-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.75rem;
}

.lcs-leg-title {
	font-weight: 600;
	font-size: 1.1rem;
}

.lcs-leg-count {
	font-size: 0.9rem;
	opacity: 0.7;
}

.lcs-passengers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 0.5rem;
}

.lcs-passenger-checkbox {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.lcs-passenger-checkbox input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.lcs-select-all-toggle {
	margin-top: 0.5rem;
	font-size: 0.9rem;
	text-decoration: underline;
	cursor: pointer;
	color: inherit;
	background: none;
	border: none;
	padding: 0;
}

.lcs-select-all-toggle:hover {
	opacity: 0.7;
}

/* Results */
.lcs-summary {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 4px;
}

.lcs-summary-item {
	margin-bottom: 0.5rem;
}

.lcs-results-table-wrapper {
	overflow-x: auto;
	margin-bottom: 1.5rem;
}

.lcs-results-table {
	width: 100%;
	border-collapse: collapse;
}

.lcs-results-table th,
.lcs-results-table td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.lcs-results-table th {
	font-weight: 600;
	background: rgba(0, 0, 0, 0.05);
}

.lcs-results-table tfoot td {
	font-weight: 600;
	border-top: 2px solid rgba(0, 0, 0, 0.2);
}

/* Calculation Details */
.lcs-calculation-details {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 4px;
}

.lcs-calculation-summary {
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.lcs-calculation-summary::-webkit-details-marker {
	display: none;
}

.lcs-calculation-summary::before {
	content: '▶ ';
	display: inline-block;
	margin-right: 0.5rem;
	transition: transform 0.2s;
}

.lcs-calculation-details[open] .lcs-calculation-summary::before {
	transform: rotate(90deg);
}

.lcs-calculation-content {
	margin-top: 1rem;
	line-height: 1.6;
}

.lcs-calculation-content p {
	margin-bottom: 0.75rem;
}

.lcs-person-breakdown {
	margin-left: 1rem;
	margin-top: 0.5rem;
}

/* Step Actions */
.lcs-step-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
}

.lcs-step-actions .lcs-btn {
	flex: 1;
	min-width: 120px;
}

/* Error Messages */
.lcs-error {
	color: #d32f2f;
	background: rgba(211, 47, 47, 0.1);
	padding: 0.75rem;
	border-radius: 4px;
	margin-top: 0.5rem;
}

/* SEO Content Section */
.lcs-seo-content {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.lcs-seo-title {
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
	font-weight: bold;
}

.lcs-faq-section {
	margin-top: 2rem;
}

.lcs-faq-title {
	font-size: 1.5rem;
	margin-bottom: 1.5rem;
	font-weight: bold;
}

/* Accordion Styles */
.lcs-accordion-item {
	margin-bottom: 1rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.02);
}

.lcs-accordion-summary {
	padding: 1rem 1.25rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	user-select: none;
}

.lcs-accordion-summary::-webkit-details-marker {
	display: none;
}

.lcs-accordion-summary::before {
	content: '▶ ';
	display: inline-block;
	margin-right: 0.75rem;
	transition: transform 0.2s;
	font-size: 0.8em;
	color: inherit;
}

.lcs-accordion-item[open] .lcs-accordion-summary::before {
	transform: rotate(90deg);
}

.lcs-accordion-summary:hover {
	background: rgba(0, 0, 0, 0.05);
}

.lcs-accordion-content {
	padding: 0 1.25rem 1.25rem 1.25rem;
	line-height: 1.7;
}

.lcs-accordion-content h3 {
	font-size: 1.2rem;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	font-weight: 600;
}

.lcs-accordion-content h3:first-child {
	margin-top: 0;
}

.lcs-accordion-content p {
	margin-bottom: 1rem;
}

.lcs-accordion-content ul,
.lcs-accordion-content ol {
	margin-bottom: 1rem;
	margin-left: 1.5rem;
}

.lcs-accordion-content li {
	margin-bottom: 0.5rem;
}

.lcs-accordion-content strong {
	font-weight: 600;
}

.lcs-faq-item {
	margin-bottom: 0.75rem;
}

/* Desktop Styles */
@media (min-width: 768px) {
	.lcs-container {
		padding: 2rem;
	}

	.lcs-title {
		font-size: 2.25rem;
	}

	.lcs-step {
		padding: 2rem;
	}

	.lcs-add-friend,
	.lcs-add-stop {
		flex-direction: row;
	}

	.lcs-step-actions {
		justify-content: flex-end;
	}

	.lcs-step-actions .lcs-btn {
		flex: 0 1 auto;
	}

	.lcs-seo-content {
		margin-top: 4rem;
		padding-top: 3rem;
	}

	.lcs-seo-title {
		font-size: 2rem;
	}

	.lcs-accordion-content {
		padding: 0 1.5rem 1.5rem 1.5rem;
	}
}
