.tgs-car-search { max-width: 920px; margin: 0 auto; }
.tgs-form { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; }
.tgs-form .tgs-section-title { font-size: 16px; font-weight: 700; color: #111827; margin: 0 0 10px; }
.tgs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tgs-grid .tgs-field { display: flex; flex-direction: column; }
.tgs-label { font-size: 13px; color: #374151; margin-bottom: 6px; }
.tgs-required { color: #ef4444; }
.tgs-input { border: 1px solid #d1d5db !important; border-radius: 10px !important; padding: 10px 12px !important; font-size: 14px !important; width: 100% !important; background: #fff !important; color: #111827 !important; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; min-height: 42px !important; box-sizing: border-box !important; }
.tgs-input-lg { padding: 14px 14px !important; font-size: 15px !important; min-height: 46px !important; border-radius: 12px !important; }
.tgs-input:focus { outline: none !important; border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37,99,235,0.15) !important; background-color: #fff !important; }
.tgs-input:hover { border-color: #cbd5e1 !important; }
.tgs-input::placeholder { color: #9ca3af !important; }
.tgs-input:disabled { background: #f9fafb !important; color: #9ca3af !important; }
.tgs-input-invalid { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.15) !important; }
.tgs-field select.tgs-input { appearance: none !important; -webkit-appearance: none !important; -moz-appearance: none !important; background-color: #fff !important; background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%), linear-gradient(to right, #d1d5db, #d1d5db) !important; background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px), calc(100% - 36px) 50% !important; background-size: 5px 5px, 5px 5px, 1px 20px !important; background-repeat: no-repeat !important; padding-right: 42px !important; height:auto !important; border-radius: 10px !important; }
.tgs-field select.tgs-input:focus { background-image: linear-gradient(45deg, transparent 50%, #2563eb 50%), linear-gradient(135deg, #2563eb 50%, transparent 50%), linear-gradient(to right, #93c5fd, #93c5fd) !important; height:auto !important; }
.tgs-field select.tgs-input:hover { border-color: #cbd5e1 !important; }
.tgs-field select.tgs-input:disabled { background: #f9fafb !important; color: #9ca3af !important; }
.tgs-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.tgs-btn { background-color: #0095ff; border: 1px solid transparent; border-radius: 3px; box-shadow: rgba(255, 255, 255, .4) 0 1px 0 0 inset; box-sizing: border-box; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-family: -apple-system,system-ui,"Segoe UI","Liberation Sans",sans-serif; font-size: 13px; font-weight: 400; line-height: 1.15385; margin: 0; outline: none; padding: 8px .8em; position: relative; text-align: center; text-decoration: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; vertical-align: baseline; white-space: nowrap; }
.tgs-btn:hover, .tgs-btn:focus { background-color: #0077cc; }
.tgs-btn:focus { box-shadow: 0 0 0 4px rgba(0, 149, 255, .15); }
.tgs-btn:active { background-color: #0064bd; box-shadow: none; }
.tgs-btn-outline { background: #fff; color: #0095ff; border: 1px solid #0095ff !important; box-shadow: none; }
.tgs-btn-outline:hover, .tgs-btn-outline:focus { background: #0077cc; color: #fff; border-color: transparent !important; }
.tgs-btn-sm { padding: 6px .6em; font-size: 13px; border-radius: 3px; }

/* Loading state for confirm button */
.tgs-btn.tgs-btn-loading { position: relative; pointer-events: none; opacity: .8; }
.tgs-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; margin-right: 8px; animation: tgs-spin .8s linear infinite; vertical-align: -3px; }
@keyframes tgs-spin { to { transform: rotate(360deg); } }
.tgs-btn:disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }
.tgs-btn-block { width: 100%; }
.tgs-form-message { font-size: 14px; color: #dc2626; }

/* Step 2 form enhancements */
.tgs-step2 .tgs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tgs-step2 .tgs-field input.tgs-input { background: #fff; }
.tgs-step2 .tgs-field input.tgs-input:focus { border-color: #2563eb !important; }
.tgs-step2 .tgs-actions { justify-content: space-between; }

.tgs-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.tgs-card { border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; display: flex; flex-direction: column; }
.tgs-card.tgs-card-selected { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
.tgs-card-header { padding: 12px; border-bottom: 1px solid #e5e7eb; }
.tgs-car-name { font-weight: 700; color: #111827; }
.tgs-car-meta { color: #6b7280; font-size: 12px; margin-top: 2px; }
.tgs-card-body { padding: 12px; display: grid; gap: 6px; }
.tgs-price-line { display: flex; justify-content: space-between; font-size: 14px; color: #374151; }
.tgs-price-line.tgs-total { font-weight: 700; color: #111827; }
.tgs-card-actions { padding: 12px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; }
.button-7 { background-color: #0095ff; border: 1px solid transparent; border-radius: 3px; box-shadow: rgba(255, 255, 255, .4) 0 1px 0 0 inset; box-sizing: border-box; color: #fff; cursor: pointer; display: inline-block; font-family: -apple-system,system-ui,"Segoe UI","Liberation Sans",sans-serif; font-size: 13px; font-weight: 400; line-height: 1.15385; margin: 0; outline: none; padding: 8px .8em; position: relative; text-align: center; text-decoration: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; vertical-align: baseline; white-space: nowrap; }
.button-7:hover,
.button-7:focus { background-color: #0077cc; }
.button-7:focus { box-shadow: 0 0 0 4px rgba(0, 149, 255, .15); }
.button-7:active { background-color: #0064bd; box-shadow: none; }
.tgs-empty { text-align: center; color: #6b7280; padding: 12px; }
.tgs-results-section { margin-top: 16px; }
.tgs-choose-title { margin: 0 0 8px; font-size: 18px; color: #111827; }

/* Stepper */
.tgs-stepper { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 12px; margin-bottom: 12px; }
.tgs-step { display: flex; flex-direction: column; align-items: center; color: #6b7280; position: relative; }
.tgs-step::after { content: ''; position: absolute; top: 12px; left: calc(-50% + 20px); right: calc(50% + 20px); height: 2px; background: #e5e7eb; z-index: 0; }
.tgs-step:first-child::after { display: none; }
.tgs-step-index { display: inline-flex; width: 24px; height: 24px; border-radius: 9999px; background: #e5e7eb; color: #374151; align-items: center; justify-content: center; font-weight: 700; z-index: 1; }
.tgs-step-done .tgs-step-index { background: #10b981; color: #fff; }
.tgs-step-done .tgs-step-index:before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 12px; }
.tgs-step-label { font-size: 12px; margin-top: 6px; }
.tgs-step-active .tgs-step-index { background: #2563eb; color: #fff; }

@media (max-width: 768px) { .tgs-grid { grid-template-columns: 1fr; } }

/* Locations swap layout */
.tgs-locations-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.tgs-grid > .tgs-locations-grid { grid-column: 1 / -1; }
.tgs-swap-col { display: flex; align-items: center; justify-content: center; padding-bottom: 4px; }
.tgs-swap-btn { background: #f3f4f6; color: #111827; border: 1px solid #e5e7eb; border-radius: 9999px; width: 40px; height: 40px; font-size: 16px; line-height: 1; margin: 0; }
.tgs-swap-btn:hover { background: #e5e7eb; }
.tgs-location-input { padding-left: 40px; }
.tgs-locations-grid .tgs-field { position: relative; }

/* Better UX for date input */
input[type="date"].tgs-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .75; }
input[type="date"].tgs-input::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* Remove number spinners for cleaner look */
input[type="number"].tgs-input::-webkit-outer-spin-button,
input[type="number"].tgs-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"].tgs-input { -moz-appearance: textfield; }
input[type="number"].tgs-input { appearance: textfield; }

@media (max-width: 768px) {
    .tgs-locations-grid {
        display: flex;
        flex-direction: column;
        gap: 8px; 
        align-items: flex-start;
    }

    .tgs-locations-grid .tgs-field{
        min-width: 100%;
    }

    .tgs-locations-grid .tgs-swap-col{
        display: none;
    }

}