/*
 * iDrive Composer Plus — styling for the JS-injected quick-pick chips,
 * "use my location" button, and the multi-day trip planner tray. Uses only
 * existing Corridor design tokens (defined site-wide in corridor-v1.css) so
 * this stays visually native to the rest of the composer with no new colour
 * or shadow invented. Mobile-first: base rules are the phone layout, the
 * min-width query only adds breathing room on larger screens.
 */

.cplus-quickpicks {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin-block-start: 10px;
	margin-block-end: 10px;
}

.cplus-quickpicks__label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--corr-ink-soft, #5b6a63);
}

.cplus-quickpicks__row {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	overflow-x: auto;
	padding-block-end: 2px;
	padding-inline-end: 6px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scroll-snap-type: x proximity;
}

/* Only fade the trailing edge when JS has confirmed the row actually
   overflows — applying this unconditionally would clip the last chip's
   own edge on screens wide enough to show them all. */
.cplus-quickpicks__row.cplus-is-scrollable {
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
	mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
}

.cplus-chip {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: var(--corr-r-sm, 5px);
	border: 1px solid var(--corr-hair, #e2ded2);
	background: var(--corr-surface, #fff);
	color: var(--corr-action, #0e4c33);
	font-size: clamp(0.8rem, 2.4vw, 0.875rem);
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	scroll-snap-align: start;
	transition: background 0.14s ease, box-shadow 0.14s ease, transform 0.1s ease;
	min-height: 40px;
}

.cplus-chip:hover {
	background: var(--corr-stone, #f4f1ea);
}

.cplus-chip:active {
	transform: translateY(1px);
}

.cplus-chip[disabled] {
	opacity: 0.55;
	cursor: progress;
}

.cplus-chip--geo {
	border-color: var(--corr-action, #0e4c33);
	background: var(--corr-stone, #f4f1ea);
}

.cplus-status {
	font-size: 0.75rem;
	color: var(--corr-ink-soft, #5b6a63);
	min-height: 1.1em;
}

.cplus-status[data-tone="error"] {
	color: #9a3b2c;
}

/* Trip-planner entry link, sitting just under the composer card. This
   button is inserted as a sibling *after* the whole `.booking-shell` card,
   so — unlike everything else in this file — it does not inherit a
   guaranteed light card background from its parent; on the live theme that
   spot sits on a dark green page section, and a transparent background left
   the dark-green text (--corr-action) nearly illegible against it. It gets
   its own solid light surface and a shadow for definition so it reads
   correctly regardless of what section it lands in. */
.cplus-trip-entry {
	display: block;
	width: 100%;
	margin-block-start: 12px;
	padding: 12px 16px;
	border-radius: var(--corr-r-md, 8px);
	border: 1px dashed var(--corr-hair, #e2ded2);
	background: var(--corr-surface, #fff);
	box-shadow: var(--corr-e1, 0 2px 8px -4px rgba(4, 17, 13, 0.2));
	color: var(--corr-action, #0e4c33);
	font-size: 0.9rem;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
}

.cplus-trip-entry:hover {
	background: var(--corr-stone, #f4f1ea);
}

/* The tray itself. */
.cplus-tray {
	margin-block-start: 14px;
	padding: clamp(14px, 4vw, 20px);
	border-radius: var(--corr-r-lg, 12px);
	background: var(--corr-surface, #fff);
	box-shadow: var(--corr-e2, 0 8px 24px -12px rgba(4, 17, 13, 0.25));
	border: 1px solid var(--corr-hair, #e2ded2);
}

.cplus-tray__title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 4px;
}

.cplus-tray__hint {
	font-size: 0.85rem;
	color: var(--corr-ink-soft, #5b6a63);
	margin: 0 0 14px;
}

.cplus-legs {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-block-end: 14px;
	list-style: none;
	padding: 0;
}

.cplus-leg {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	padding: 12px;
	border-radius: var(--corr-r-md, 8px);
	background: var(--corr-stone, #f4f1ea);
}

.cplus-leg__summary {
	font-size: 0.875rem;
	line-height: 1.45;
}

.cplus-leg__summary strong {
	display: block;
	font-size: 0.9rem;
}

.cplus-leg__actions {
	display: flex;
	gap: 6px;
	flex: 0 0 auto;
}

.cplus-leg__actions button {
	border: none;
	background: var(--corr-surface, #fff);
	border-radius: var(--corr-r-sm, 5px);
	padding: 6px 10px;
	font-size: 0.78rem;
	cursor: pointer;
	min-height: 32px;
}

.cplus-leg__actions button:hover {
	background: #fff;
	box-shadow: var(--corr-e1, 0 2px 8px -4px rgba(4, 17, 13, 0.2));
}

.cplus-requirements {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-block-end: 14px;
}

.cplus-requirements label {
	font-size: 0.8rem;
	font-weight: 600;
}

.cplus-requirements textarea {
	width: 100%;
	min-height: 64px;
	padding: 10px 12px;
	border-radius: var(--corr-r-sm, 5px);
	border: 1px solid var(--corr-hair, #e2ded2);
	font: inherit;
	resize: vertical;
}

.cplus-tray__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.cplus-btn {
	appearance: none;
	border: none;
	border-radius: var(--corr-r-sm, 5px);
	padding: 12px 18px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	min-height: 48px;
}

.cplus-btn--primary {
	background: var(--corr-action, #0e4c33);
	color: #fff;
	box-shadow: 0 6px 16px -4px rgba(14, 76, 51, 0.4);
}

.cplus-btn--primary:hover {
	background: var(--corr-action-hi, #0b3b28);
}

.cplus-btn--secondary {
	background: var(--corr-stone, #f4f1ea);
	color: var(--corr-action, #0e4c33);
}

.cplus-btn[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.cplus-review {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-block-end: 14px;
}

.cplus-review input {
	width: 100%;
	padding: 12px 14px;
	border-radius: var(--corr-r-sm, 5px);
	border: 1px solid var(--corr-hair, #e2ded2);
	font: inherit;
	min-height: 48px;
}

.cplus-review label {
	font-size: 0.8rem;
	font-weight: 600;
	display: block;
	margin-block-end: 4px;
}

@media (min-width: 761px) {
	.cplus-quickpicks {
		gap: 8px;
	}

	.cplus-tray__actions {
		flex-wrap: nowrap;
	}
}
