/* Google Places autocomplete: mobile dropdown must be tappable.
   - touch-action: auto overrides jQuery UI .ui-sortable-handle (etc.) so tap/scroll work.
   - z-index ensures dropdown appears above fixed headers/overlays.
   - .pac-item min-height improves tap target on mobile. */
#autocomplete,
#autocomplete_billing,
#autocomplete_businessprincipleHome,
#locationField input,
.pac-container {
    touch-action: auto !important;
}
.pac-container {
    z-index: 99999 !important;
}
.pac-item {
    touch-action: auto !important;
    min-height: 44px;
    padding: 8px 12px;
    cursor: pointer;
}
.pac-item span {
    touch-action: auto !important;
}

.upload-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    margin: 0 auto;
    max-width: 900px;
    text-align: center;
    padding-top: 20px;
}

.middle-or {
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-btn {
    width: 100%;
    max-width: 325px;
}

/* Minimum touch target for mobile (44px per accessibility guidelines) */
.upload-trigger-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* File input as button: the input is the only control (no overlay/label). Wrap provides button look. */
.upload-trigger-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 325px;
    min-height: 44px;
    margin-top: 10px;
    margin-bottom: 10px;
    touch-action: manipulation;
    /* Button look - match .btn .btn-primary */
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #fff;
    background-color: #337ab7;
    border-color: #2e6da4;
}

.upload-trigger-wrap:hover {
    color: #fff;
    background-color: #286090;
    border-color: #204d74;
}

/* Opacity 0.001 (not 0) so mobile still delivers touch to the input; visually invisible */
.upload-input-as-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    opacity: 0.001;
    font-size: 0;
    border: 0;
    z-index: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.upload-input-as-btn-label {
    position: relative;
    z-index: 0;
    pointer-events: none;
    display: block;
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 1.42857143;
    font-size: 14px;
}

/* Make both uploads the same width */
.upload {
    /*flex: 1 1 350px;
    max-width: 500px;*/
    box-sizing: border-box;
}

/* Base phone upload block */
.upload-phone {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Default: both uploads visible */
.upload-sections.both-uploads {
    flex-direction: row;
}

    .upload-sections.both-uploads .upload-phone {
        width: 100%;
        flex-direction: column;
    }

    .upload-sections.both-uploads .or-text {
        margin-bottom: 10px;
    }

/* When only one upload visible */
.upload-sections.single-upload {
    justify-content: center;
}

    .upload-sections.single-upload .upload-phone {
        flex-direction: column;
        justify-content: center;
        margin: 0;
    }

    .upload-sections.single-upload .or-text {
        margin-bottom: 10px;
    }

.upload-file-row {
    background-color: #dff0d8;
}
