.axh-vps-picker {
    --axh-vps-blue: #4778ff;
    color: #20242c;
}

.axh-vps-picker + .panel-form[hidden],
.axh-vps-picker [hidden] {
    display: none !important;
}

.axh-vps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.axh-vps-regions {
    display: flex;
    width: max-content;
    max-width: 100%;
    gap: 6px;
    overflow-x: auto;
    margin: 0 0 24px;
    padding: 4px;
    background: #fff;
    border-radius: 40px;
    box-shadow: 0 4px 28px #2024380a;
}

.axh-vps-region {
    flex: 0 0 auto;
    border: 0;
    border-radius: 30px;
    padding: 11px 16px;
    background: transparent;
    color: #596274;
    font: inherit;
    cursor: pointer;
}

.axh-vps-region[aria-pressed="true"] {
    background: #315fda;
    color: #fff;
}

.axh-vps-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 14px 16px;
    border: 1px solid #e7e9f0;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-weight: 500;
    text-align: start;
    cursor: pointer;
    box-shadow: 0 5px 24px #20243804;
}

.axh-vps-card:hover { border-color: #aeb9d0; }
.axh-vps-card[aria-pressed="true"] { border-color: var(--axh-vps-blue); }
.axh-vps-picker button:focus-visible, .axh-vps-version:focus-visible {
    outline: 2px solid #315fda;
    outline-offset: -3px;
}

.axh-vps-dot {
    width: 18px;
    height: 18px;
    flex: none;
    border: 2px solid #aeb6c6;
    border-radius: 50%;
}

.axh-vps-card[aria-pressed="true"] .axh-vps-dot {
    border: 5px solid var(--axh-vps-blue);
}

.axh-vps-label { overflow-wrap: anywhere; }
.axh-vps-flag {
    flex: none;
    width: 28px;
    height: 28px;
    margin-inline-start: auto;
    border-radius: 50%;
    object-fit: cover;
    font-size: 20px;
}

.axh-vps-os { min-width: 0; align-self: start; }
.axh-vps-os.is-selected {
    border-radius: 16px;
    background: #f4f7ff;
    outline: 1px solid var(--axh-vps-blue);
    outline-offset: -1px;
}
.axh-vps-os.is-selected > .axh-vps-card {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}
.axh-vps-os.is-selected > .axh-vps-card:focus-visible {
    outline-offset: -5px;
}
.axh-vps-version { width: calc(100% - 24px); margin: 8px 12px 12px; }

@media (max-width: 1199px) {
    .axh-vps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
    .axh-vps-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

.axh-vps-os-logo {
    flex: none;
    width: 23px;
    height: 23px;
    object-fit: contain;
}

.axh-vps-summary-icon {
    display: inline-block;
    width: 17px;
    height: 17px;
    margin-inline-end: 6px;
    vertical-align: -3px;
    border: 1px solid #e7e9f0;
    border-radius: 50%;
    object-fit: cover;
}

.axh-vps-version {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding-inline: 12px;
    cursor: pointer;
}
.axh-vps-version::after {
    content: "";
    width: 7px;
    height: 7px;
    border-inline-end: 2px solid #596274;
    border-block-end: 2px solid #596274;
    transform: rotate(45deg) translateY(-2px);
}
.axh-vps-menu {
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 6px;
    box-sizing: border-box;
    border: 1px solid #e7e9f0;
    border-radius: 14px;
    background: #fff;
    color: #20242c;
    box-shadow: 0 12px 34px #14182a33;
    overflow: auto;
    overscroll-behavior: contain;
}
.axh-vps-menu::backdrop { background: rgb(17 21 35 / 47%); }
.axh-vps-menu .axh-vps-card {
    min-height: 42px;
    border-radius: 8px;
    padding: 8px 10px;
    border-color: transparent;
    box-shadow: none;
}
.axh-vps-menu .axh-vps-card:hover,
.axh-vps-menu .axh-vps-card[aria-pressed="true"] { background: #eef3ff; }
.axh-vps-menu .axh-vps-card[aria-pressed="true"] .axh-vps-dot { border: 5px solid #4778ff; }
.axh-vps-summary-os { border: 0; border-radius: 0; object-fit: contain; }

/* Style the native WHMCS controls when both VPS pickers are present. */
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) {
    --axh-vps-blue: #4778ff;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) :is(.axh-vps-backup .panel-check, .axh-vps-server .panel-form, .axh-vps-ssh .form-group) {
    border: 1px solid #e7e9f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 24px #20243804;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-backup .panel-check:has(input:checked) {
    border-color: var(--axh-vps-blue);
    background: #f4f7ff;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) :is(.axh-vps-backup .panel-check, .axh-vps-ssh .form-group) {
    padding: 14px 16px;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) :is(.axh-vps-server, .axh-vps-ssh) :is(input.form-control, textarea.form-control) {
    border-radius: 12px;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) :is(.axh-vps-server, .axh-vps-ssh) :is(input, textarea):focus-visible {
    outline: 2px solid var(--axh-vps-blue);
    outline-offset: 2px;
}

#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-ssh {
    flex: 0 0 100%;
    max-width: 100%;
}

#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-backup .panel-check-group > .col-sm-4 {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-backup .panel-check-group .panel-check {
    margin: 0;
    padding: 0;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-backup .panel-check .check {
    margin: 0;
    padding: 0;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-backup .panel-check .check > label {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 16px 12px 48px;
    cursor: pointer;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-backup .panel-check .check > label > :is(input[type="checkbox"], .checkbox-styled, [class*="icheckbox"]) {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-backup .panel-check .check-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-backup .panel-check :is(.check-title, .check-subtitle) {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}
#frmConfigureProduct:has([data-axh-vps-option="location"]):has([data-axh-vps-option="os"]) .axh-vps-backup .panel-check .check-subtitle {
    margin-inline-start: auto;
    white-space: nowrap;
}
