/* SDS Car Rental */
.sds-cr-wizard { --sds-primary: #1a1a2e; --sds-accent: #FF0000; --sds-border: #e3e3e8; --sds-radius: 10px; max-width: 960px; margin: 0 auto; font-family: inherit; color: #222; }
.sds-cr-wizard *, .sds-cr-wizard *::before, .sds-cr-wizard *::after { box-sizing: border-box; }

/* Steps */
.sds-steps { display: flex; list-style: none; margin: 0 0 24px; padding: 0; counter-reset: step; flex-wrap: wrap; gap: 4px; }
.sds-steps li { flex: 1 1 auto; text-align: center; padding: 10px 6px; font-size: 13px; color: #999; border-bottom: 3px solid var(--sds-border); counter-increment: step; min-width: 90px; }
.sds-steps li::before { content: counter( step ); display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; background: var(--sds-border); color: #fff; margin-right: 6px; font-weight: 700; }
.sds-steps li.is-active { color: var(--sds-primary); border-bottom-color: #FF0000; font-weight: 600; }
.sds-steps li.is-active::before { background: #FF0000; }
.sds-step { display: none; animation: sdsFade .25s ease; }
.sds-step.is-active { display: block; }
@keyframes sdsFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Forms */
.sds-grid { display: grid; gap: 16px; margin-bottom: 20px; }
.sds-grid-2 { grid-template-columns: 1fr 1fr; }
.sds-col-2 { grid-column: 1 / -1; }
@media ( max-width: 640px ) { .sds-grid-2 { grid-template-columns: 1fr; } }
.sds-cr-wizard label { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; gap: 6px; }
.sds-cr-wizard input, .sds-cr-wizard select, .sds-cr-wizard textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--sds-border); border-radius: 8px; font-size: 15px; font-weight: 400; }
.sds-cr-wizard input:focus, .sds-cr-wizard select:focus, .sds-cr-wizard textarea:focus { border-color: #FF0000; box-shadow: 0 0 0 2px rgba(255,0,0,.12); outline: none; }
.sds-cr-wizard input[type="date"] { cursor: pointer; }

/* Homepage form */
.sds-home-form { background: #fff; border: 1px solid var(--sds-border); border-radius: var(--sds-radius); padding: 24px; margin-bottom: 20px; }
.sds-home-form .sds-btn { margin-top: 8px; }

/* Buttons */
.sds-btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.sds-btn-primary { background: #FF0000; color: #fff; }
.sds-btn-primary:hover { background: #cc0000; }
.sds-btn-ghost { background: transparent; color: #1a1a2e; border: 1px solid #e3e3e8; }
.sds-btn-ghost:hover { border-color: #FF0000; color: #FF0000; }
.sds-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* Vehicle cards - improved layout */
.sds-vehicle-list, .sds-vehicle-grid { display: grid; grid-template-columns: repeat( auto-fill, minmax( 300px, 1fr ) ); gap: 24px; margin-bottom: 20px; }
.sds-vehicle-card { border: 1px solid var(--sds-border); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease; }
.sds-vehicle-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.sds-card-img { aspect-ratio: 16/11; overflow: hidden; background: #f3f3f5; }
.sds-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.sds-vehicle-card:hover .sds-card-img img { transform: scale(1.04); }
.sds-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sds-card-body h4 { margin: 0; font-size: 18px; color: #1a1a2e; }
.sds-card-fleet-id { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 700; color: #1a1a2e; background: #ffe9e9; border: 1px solid #FF0000; padding: 1px 8px; border-radius: 4px; vertical-align: middle; }
.sds-summary-fleet-id { font-size: 13px; font-weight: 700; color: #1a1a2e; }
.sds-card-cat { display: inline-block; align-self: flex-start; background: #FF0000; color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 4px 12px; border-radius: 4px; }
.sds-card-specs { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.sds-card-specs li { display: inline-flex; align-items: center; gap: 6px; background: #f5f5f7; padding: 5px 12px; border-radius: 6px; font-size: 12px; color: #555; }
.sds-spec-icon { font-size: 14px; line-height: 1; color: #FF0000; }
.sds-card-price { margin-top: auto; font-size: 18px; font-weight: 700; color: #1a1a2e; padding-top: 6px; }
.sds-card-price small { font-size: 12px; font-weight: 400; color: #888; }

/* Extras - single column with icons */
.sds-extras-list { display: grid; gap: 12px; margin-bottom: 16px; }
.sds-extra-item { display: flex; align-items: center; gap: 14px; border: 1px solid var(--sds-border); border-radius: 10px; padding: 14px 18px; cursor: pointer; transition: border-color .15s ease; }
.sds-extra-item.is-selected { border-color: #FF0000; box-shadow: 0 0 0 2px rgba(255,0,0,.12); }
.sds-extra-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sds-extra-info { flex: 1; }
.sds-extra-name { font-weight: 600; font-size: 15px; display: block; }
.sds-extra-price { font-weight: 700; color: #1a1a2e; font-size: 14px; white-space: nowrap; flex-shrink: 0; text-align: right; }
.sds-extra-toggle { padding: 6px 18px; border: 1px solid var(--sds-border); border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; background: #f5f5f5; color: #666; flex-shrink: 0; transition: all .15s ease; }
.sds-extra-toggle.is-active { background: #FF0000; color: #fff; border-color: #FF0000; }
.sds-running-total { text-align: right; font-size: 15px; padding: 10px 0; }

/* Summary */
.sds-summary-section { border: 1px solid var(--sds-border); border-radius: var(--sds-radius); padding: 16px; margin-bottom: 16px; background: #fafafc; }
.sds-summary-section h4 { margin: 0 0 10px; font-size: 15px; }
.sds-summary-vehicle { font-size: 16px; font-weight: 600; margin: 0; }
.sds-summary-none { color: #999; font-style: italic; margin: 0; font-size: 13px; }
.sds-summary-extras { list-style: none; margin: 0; padding: 0; }
.sds-summary-extras li { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; border-bottom: 1px solid #eee; }
.sds-summary-table { width: 100%; border-collapse: collapse; }
.sds-summary-table td { padding: 8px 4px; border-bottom: 1px solid var(--sds-border); text-align: left; }
.sds-summary-table td:last-child { text-align: right; font-weight: 600; overflow-wrap: break-word; }
.sds-summary-total td { font-size: 18px; font-weight: 700; color: #FF0000; border-bottom: none; padding-top: 12px; }
.sds-coupon-row { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.sds-coupon-row input { max-width: 220px; }
.sds-coupon-msg.is-ok { color: #2e7d32; }
.sds-coupon-msg.is-error { color: #c62828; }


.sds-step-error { display: none; background: #fdecea; color: #c62828; border: 1px solid #f5c6cb; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }

.sds-insurance-notice { background: #fff3cd; color: #856404; border: 1px solid #ffc107; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.sds-insurance-notice a { color: #c62828; font-weight: 600; text-decoration: underline; }
.sds-overtime-notice { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.sds-loading { display: none; position: fixed; inset: 0; background: rgba(255,255,255,.6); align-items: center; justify-content: center; z-index: 9999; }
.sds-loading.is-visible { display: flex; }
.sds-spinner { width: 42px; height: 42px; border: 4px solid var(--sds-border); border-top-color: #FF0000; border-radius: 50%; animation: sdsSpin .8s linear infinite; }
@keyframes sdsSpin { to { transform: rotate(360deg); } }

.sds-featured-slider { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.sds-featured-item { flex: 0 0 240px; scroll-snap-align: start; border: 1px solid var(--sds-border); border-radius: var(--sds-radius); padding: 12px; background: #fff; }
.sds-featured-item img { width: 100%; border-radius: 8px; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 8px; }

.sds-confirmation { max-width: 640px; margin: 0 auto; border: 1px solid var(--sds-border); border-radius: var(--sds-radius); overflow: hidden; }
.sds-confirm-head { background: #1a1a2e; color: #fff; padding: 24px; text-align: center; }
.sds-confirm-head h2 { margin: 0 0 8px; }
.sds-confirm-table { padding: 0 24px; }
.sds-confirmation .sds-btn { margin: 16px 24px 24px; }

/* Square Payments card form */
.sds-square-section h4 { margin: 0 0 12px; font-size: 15px; }

/* Square card iframe container — needs explicit sizing */
.sds-square-section #sds-square-card {
	min-height: 140px;
	width: 100%;
	padding: 8px 0;
}
.sds-square-section #sds-square-card iframe {
	width: 100% !important;
	min-height: 100px;
}

.sds-square-errors { color: #c62828; font-size: 13px; margin-top: 8px; display: none; }
.sds-square-errors.is-visible { display: block; }

@media ( max-width: 480px ) {
	.sds-cr-wizard { padding: 0 10px; }
	.sds-steps li { font-size: 11px; padding: 8px 4px; min-width: 60px; }
	.sds-steps li::before { width: 18px; height: 18px; line-height: 18px; font-size: 11px; margin-right: 4px; }
	.sds-vehicle-list, .sds-vehicle-grid { grid-template-columns: 1fr; }
	.sds-actions { flex-direction: column; }
	.sds-actions .sds-btn { width: 100%; }
	.sds-extra-item { flex-wrap: wrap; }

	/* Summary mobile fixes — keep text inside container */
	.sds-summary-section { padding: 12px; }
	.sds-summary-table td { padding: 6px 4px; font-size: 13px; }
	.sds-summary-table td:last-child { word-break: break-word; overflow-wrap: break-word; max-width: 50%; }
	.sds-summary-total td { font-size: 16px; }
	.sds-summary-extras li { font-size: 13px; }

	/* Coupon row — full width on mobile */
	.sds-coupon-row input { max-width: 100%; flex: 1; min-width: 0; }

	/* Confirmation table mobile fixes */
	.sds-confirm-head { padding: 16px; }
	.sds-confirm-head h2 { font-size: 18px; }
	.sds-confirm-table { padding: 0 16px; }
	.sds-confirm-table table { word-break: break-word; overflow-wrap: break-word; }
	.sds-confirmation .sds-btn { margin: 12px 16px 16px; }

	/* Step errors and notices */
	.sds-step-error, .sds-insurance-notice, .sds-overtime-notice { padding: 10px 12px; font-size: 13px; }
}
