/* Match WHMCS form controls: restrained borders, compact spacing, inherited type. */
.iw-choices { --iw-primary: #337ab7; margin: 8px 0 16px; font-family: inherit; color: inherit; }
.iw-choices *, .iw-choices *::before, .iw-choices *::after { box-sizing: border-box; }
.iw-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; align-items: start; }
.iw-choice-card { position: relative; min-width: 0; cursor: pointer; background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 12px; transition: border-color .15s; }
.iw-choice-card:hover { border-color: #aaa; }
.iw-choice-card.is-selected { border-color: #aebdca; background: #fafcfd; box-shadow: none; }
.iw-choice-button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 30px; border: 0; background: transparent; padding: 0 22px 0 0; text-align: left; font-family: inherit; color: inherit; cursor: pointer; }
.iw-os-logo { width: 28px; height: 28px; flex: 0 0 28px; object-fit: contain; }
.iw-country-flag { width: 32px; height: 24px; flex: 0 0 32px; object-fit: contain; }
.iw-choice-heading { display: block; min-width: 0; }
.iw-choice-title { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.iw-choice-check { position: absolute; top: 18px; right: 12px; display: block; width: 14px; height: 14px; border: 1px solid #ccc; border-radius: 50%; color: transparent; text-align: center; font-size: 10px; line-height: 12px; }
.iw-choice-card.is-selected .iw-choice-check { border-color: var(--iw-primary); background: var(--iw-primary); color: #fff; }
.iw-choices .iw-version-select { margin-top: 10px; width: 100%; height: 34px; min-height: 34px; padding: 6px 8px; border: 1px solid #ccc; border-radius: 3px; background: #fff; color: #555; font-family: inherit; font-size: 13px; box-shadow: none; }
.iw-family-tabs { display: flex; gap: 0; width: fit-content; margin-bottom: 12px; }
.iw-family-tab { padding: 6px 14px; border: 1px solid #ccc; background: #fff; border-radius: 0; font-family: inherit; font-size: 13px; line-height: 20px; color: #555; cursor: pointer; }
.iw-family-tab + .iw-family-tab { margin-left: -1px; }
.iw-family-tab:first-child { border-radius: 4px 0 0 4px; }
.iw-family-tab:last-child { border-radius: 0 4px 4px 0; }
.iw-family-tab[aria-pressed="true"] { position: relative; border-color: var(--iw-primary); background: var(--iw-primary); color: #fff; }
/* Neutralize theme/browser button focus rings after a pointer click. */
.iw-choices .iw-choice-button:focus,
.iw-choices .iw-choice-button:focus-visible { outline: none !important; box-shadow: none !important; }
.iw-choice-card:has(.iw-choice-button:focus-visible) { outline: 2px solid #657786; outline-offset: 2px; }
.iw-version-select:focus-visible, .iw-family-tab:focus-visible { outline: 2px solid var(--iw-primary); outline-offset: 3px; }
.iw-choices [hidden], .iw-native-control, .iw-suppressed, .form-control.iw-native-control, .form-group.iw-suppressed { display: none !important; }
.iw-hostname-notice { margin: 0 0 15px; padding: 9px 12px; border: 1px solid #ddd; border-radius: 4px; background: #f8f8f8; color: #666; font-family: inherit; font-size: 13px; line-height: 1.5; }
@media (max-width: 420px) { .iw-choice-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

.iw-version-dropdown { position: relative; margin-top: 10px; cursor: default; }
.iw-version-trigger { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border: 1px solid #ccc; border-radius: 3px; background: #fff; color: #555; font-family: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.iw-version-label { min-width: 0; overflow-wrap: anywhere; }
.iw-version-arrow { width: 7px; height: 7px; flex-shrink: 0; border-right: 1.5px solid #777; border-bottom: 1.5px solid #777; transform: rotate(45deg); margin: -3px 2px 0; }
.iw-version-trigger[aria-expanded="true"] .iw-version-arrow { transform: rotate(225deg); margin-top: 3px; }
.iw-version-menu { position: absolute; z-index: 100; top: calc(100% + 4px); left: 0; right: 0; max-height: 220px; overflow-y: auto; padding: 4px; border: 1px solid #d5d5d5; border-radius: 4px; background: #fff; box-shadow: 0 5px 12px rgba(0, 0, 0, .12); }
.iw-version-option { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 2px; background: #fff; color: #555; font-family: inherit; font-size: 13px; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.iw-version-option[aria-selected="true"] { background: #eef3f7; color: #285e8e; font-weight: 600; }
.iw-version-option:hover, .iw-version-option:focus { background: #f2f2f2; outline: none; }
.iw-version-trigger:focus { outline: none; box-shadow: none; }
.iw-version-trigger:focus-visible { outline: 2px solid #657786; outline-offset: 2px; }
.iw-choice-card:has(.iw-version-trigger[aria-expanded="true"]) { z-index: 2; }

.iw-choice-card.is-unavailable { background: #f7f7f7; border-color: #ddd; cursor: not-allowed; box-shadow: none; }
.iw-choice-card.is-unavailable .iw-choice-button { color: #888; cursor: not-allowed; }
.iw-choice-card.is-unavailable .iw-country-flag { opacity: .5; }
.iw-choice-card.is-unavailable .iw-choice-check { display: none; }

/* No nested element in an unavailable card can receive a pointer click. */
.iw-choice-card.is-unavailable > * { pointer-events: none; }

.iw-password-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Stock status sits on the same row, keeping the location grid aligned. */
.iw-choices--location .iw-choice-grid { align-items: stretch; }
.iw-choices--location .iw-choice-card { display: flex; align-items: center; min-height: 64px; }
.iw-choices--location .iw-choice-heading { flex: 1; }
.iw-choices--location .is-unavailable { background: #fafafa; }
.iw-choices--location .is-unavailable .iw-choice-button { padding-right: 0; gap: 8px; color: #777; }
.iw-choices--location .is-unavailable .iw-country-flag { opacity: .65; }
.iw-stock-badge { display: inline-flex; align-items: center; flex-shrink: 0; margin: 0 0 0 auto; padding: 3px 6px; border: 0; border-radius: 3px; background: #f3eceb; color: #9b5c55; font-size: 10px; line-height: 1.4; font-weight: 500; white-space: nowrap; }
