/* Accessible Autocomplete Bootstrap Integration */
.autocomplete__wrapper {
    position: relative;
}

.autocomplete__input {
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    width: 100%;
}

.autocomplete__input:focus {
    border-color: #66afe9;
    outline: 0;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
}

.autocomplete__menu {
    background-color: #fff;
    border: 1px solid rgba(102, 175, 233, .6);
    border-top: 0;
    color: #555;
    margin: 0;
    max-height: 342px;
    overflow-x: hidden;
    padding: 0;
    width: 100%;
    width: calc(100% - 2px);
}

.autocomplete__option {
    border-bottom: solid #ddd;
    border-width: 1px 0;
    cursor: pointer;
    display: block;
    padding: 8px 12px;
}

.autocomplete__option--focused,
.autocomplete__option:hover {
    background-color: #66afe9;
    border-color: #66afe9;
    color: white;
    outline: none;
}

.autocomplete__option--no-results {
    background-color: #fafafa;
    color: #888;
    cursor: not-allowed;
}

.autocomplete__hint,
.autocomplete__input,
.autocomplete__option {
    font-size: 14px;
    line-height: 1.42857143;
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

#ui-datepicker-div { font-size: 12px; }

.details td
{
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 5px;
    padding-left: 5px;
    vertical-align: center;
}

/* Override Select2 components height */
.select2-container .select2-choice
{
    height: 30px;
    line-height: 30px;
}

/* Override Select2 components button */
.select2-container .select2-choice .select2-arrow b
{
    background: url('select2-black.png') no-repeat 0 1px;
}

/* Override the colour of the Select2 glow */
.select2-drop-active
{
    border: 1px solid rgba(102, 175, 233, .6);
    border-top: none;
}

.select2-drop.select2-drop-above.select2-drop-active
{
    border-top: 1px solid rgba(102, 175, 233, .6);
}

.select2-container-active .select2-choice,
.select2-container-active .select2-choices
{
    border: 1px solid rgba(102, 175, 233, .6);
    outline: none;
    border-color: #66afe9;

    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
}

/* Override the date picker and time pickers height */
.form-control
{
    height: 30px;
    padding-left: 8px;
}

/* Override the time pickers AM/PM button height */
.btn
{
    height: 30px;
    padding-top: 4px;
}

/* Ovveride the date pickers icon position */
.glyphicon
{
    top: 0px;
}

.highlight { 
    border: 2px red solid;
}

.bookingStatus {
    font-weight: bold;
    color: #1565C0;
    font-size: large;
    padding-top: 10px;
}

.bookingError {
    font-weight: bold;
    color: #E53935;
    font-size: large;
    padding-top: 10px;
}

/* Map styling - center within container */
.map-side {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.map-side > div {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.map-below {
    text-align: center;
}

.map-below img {
    display: inline-block;
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive map positioning for mobile devices */
@media (max-width: 767px) {
    /* On mobile, make both map types responsive and centered */
    .map-side > div {
        max-width: 100%;
    }

    .map-side img,
    .map-below img {
        max-width: 100%;
        height: auto;
    }

    /* Center both map types */
    .map-side,
    .map-below {
        text-align: center;
    }
}

/* GPS Location Button Styles */
.pickup-address-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pickup-address-wrapper #pickupAddress-container {
    flex: 1;
    min-width: 0;
}

.gps-location-btn {
    flex-shrink: 0;
    width: 38px;
    height: 34px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.gps-location-btn:focus {
    outline: 2px solid #66afe9;
    outline-offset: 2px;
}

.gps-location-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

/* GPS Loading Spinner */
.gps-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #333;
    border-radius: 50%;
    border-top-color: transparent;
    animation: gps-spin 0.8s linear infinite;
}

@keyframes gps-spin {
    to {
        transform: rotate(360deg);
    }
}

/* GPS Status Message */
.gps-status-message {
    margin-top: 5px;
    font-size: 13px;
}

.gps-status-message.text-success {
    color: #3c763d;
}

.gps-status-message.text-danger {
    color: #a94442;
}

@media (max-width: 450px) {
    .form-horizontal .form-group {
        margin-left: 0;
        margin-right: 0;
    }
    .form-horizontal .col-xs-1,
    .form-horizontal .col-xs-3,
    .form-horizontal .col-xs-4,
    .form-horizontal .col-xs-8,
    .form-horizontal .col-xs-9 {
        float: none;
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    .form-horizontal .col-xs-offset-3 {
        margin-left: 0;
    }
    .form-horizontal .control-label {
        text-align: left;
        margin-bottom: 5px;
    }
    /* Ensure error icons are visible or positioned correctly if they stack */
    .form-horizontal .col-xs-1 img {
         display: inline-block;
         margin-top: 5px;
    }

    /* GPS button responsive adjustments */
    .pickup-address-wrapper {
        flex-wrap: nowrap;
    }

    .gps-location-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}
