.hcloud-builder {
    --hcloud-red: #e3062c;
    --hcloud-border: #dde3ea;
    --hcloud-muted: #687385;
    --hcloud-bg: #f7f9fb;
    color: #1f2937;
    margin: 18px 0 28px;
}

.hcloud-builder * {
    box-sizing: border-box;
}

.hcloud-native-hidden {
    height: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
}

.hcloud-native-heading-hidden {
    display: none !important;
}

.hcloud-section {
    border-left: 1px dashed var(--hcloud-red);
    margin: 0 0 26px 12px;
    padding: 0 0 0 20px;
    position: relative;
}

.hcloud-section:before {
    background: var(--hcloud-red);
    border-radius: 50%;
    color: #fff;
    content: "";
    font-size: 10px;
    font-weight: 700;
    height: 16px;
    left: -8px;
    line-height: 16px;
    position: absolute;
    text-align: center;
    top: 0;
    width: 16px;
}

.hcloud-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.hcloud-section-titlebar {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: 0 0 12px;
}

.hcloud-live-refresh {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.hcloud-live-status {
    color: var(--hcloud-muted);
    font-size: 12px;
}

.hcloud-refresh-button {
    background: #fff;
    border: 1px solid var(--hcloud-red);
    border-radius: 999px;
    color: var(--hcloud-red);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px;
}

.hcloud-refresh-button:disabled {
    cursor: wait;
    opacity: .6;
}

.hcloud-help {
    color: var(--hcloud-muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 14px;
    max-width: 760px;
}

.hcloud-type-tabs {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 8px 0 14px;
}

.hcloud-group-tabs,
.hcloud-arch-tabs,
.hcloud-image-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 14px;
}

.hcloud-group-tab,
.hcloud-arch-tab,
.hcloud-image-tab {
    background: #fff;
    border: 1px solid var(--hcloud-border);
    border-radius: 999px;
    color: #1f2937;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
}

.hcloud-type-card,
.hcloud-location-card,
.hcloud-image-card,
.hcloud-addon-card {
    background: #fff;
    border: 1px solid var(--hcloud-border);
    border-radius: 8px;
    cursor: pointer;
    min-height: 88px;
    padding: 14px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.hcloud-check-card {
    align-items: flex-start;
    display: flex;
    gap: 12px;
}

.hcloud-check-card input[type="checkbox"] {
    height: 22px;
    margin: 3px 0 0;
    width: 22px;
}

.hcloud-disk-card,
.hcloud-userdata-card {
    cursor: default;
}

.hcloud-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hcloud-mini-label {
    color: var(--hcloud-muted);
    flex-basis: 100%;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.hcloud-radio-pill {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hcloud-border);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    padding: 7px 11px;
}

.hcloud-radio-pill:has(input:checked) {
    border-color: var(--hcloud-red);
    box-shadow: 0 0 0 1px var(--hcloud-red);
}

.hcloud-userdata-card {
    grid-column: span 2;
}

.hcloud-addon-price {
    color: var(--hcloud-red);
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
}

.hcloud-ip-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hcloud-field-row {
    display: grid;
    gap: 6px;
}

.hcloud-field-row span {
    color: var(--hcloud-muted);
    font-size: 12px;
    font-weight: 700;
}

.hcloud-userdata-text {
    font-family: Consolas, Monaco, monospace;
    min-height: 150px;
    resize: vertical;
}

.hcloud-type-card:hover,
.hcloud-location-card:hover,
.hcloud-image-card:hover,
.hcloud-addon-card:hover,
.hcloud-plan-row:hover {
    border-color: #b9c3d0;
    box-shadow: 0 4px 14px rgba(31, 41, 55, .07);
}

.hcloud-selected {
    border-color: var(--hcloud-red) !important;
    box-shadow: 0 0 0 1px var(--hcloud-red);
}

.hcloud-disabled {
    cursor: not-allowed !important;
    opacity: .45;
}

.hcloud-empty {
    background: #fff;
    border: 1px dashed var(--hcloud-border);
    border-radius: 8px;
    color: var(--hcloud-muted);
    padding: 14px;
}

.hcloud-type-title,
.hcloud-card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.hcloud-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.hcloud-tags span {
    background: #eef2f6;
    border-radius: 4px;
    color: #374151;
    font-size: 11px;
    padding: 4px 6px;
}

.hcloud-plan-table {
    display: grid;
    gap: 8px;
}

.hcloud-plan-row {
    align-items: center;
    background: #fff;
    border: 1px solid var(--hcloud-border);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: 1.2fr .65fr .75fr .75fr .85fr .85fr;
    min-height: 52px;
    padding: 12px 14px;
}

.hcloud-plan-head {
    background: transparent;
    border: 0;
    color: var(--hcloud-muted);
    cursor: default;
    font-size: 11px;
    min-height: auto;
    padding-bottom: 4px;
    text-transform: uppercase;
}

.hcloud-plan-name {
    font-weight: 700;
}

.hcloud-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hcloud-image-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hcloud-flag,
.hcloud-os-icon {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 22px;
    height: 32px;
    justify-content: center;
    margin-right: 10px;
    vertical-align: middle;
    width: 38px;
}

.hcloud-os-icon {
    background: var(--hcloud-bg);
    color: var(--hcloud-red);
    font-weight: 700;
}

.hcloud-image-logo {
    display: block;
    height: 42px;
    margin: 0 0 12px;
    object-fit: contain;
    width: 42px;
}

.hcloud-image-version {
    margin-top: 12px;
    width: 100%;
}

.hcloud-flag {
    background: linear-gradient(#111 0 33%, #d00 33% 66%, #fc0 66%);
}

.hcloud-flag-hel {
    background: linear-gradient(90deg, transparent 0 28%, #2451a6 28% 42%, transparent 42%), linear-gradient(transparent 0 38%, #2451a6 38% 56%, transparent 56%), #fff;
    border: 1px solid #d7dce3;
}

.hcloud-flag-us {
    background: linear-gradient(#b22234 0 14%, #fff 14% 28%, #b22234 28% 42%, #fff 42% 56%, #b22234 56% 70%, #fff 70% 84%, #b22234 84%);
}

.hcloud-flag-sin {
    background: linear-gradient(#ef3340 0 50%, #fff 50%);
    border: 1px solid #d7dce3;
}

.hcloud-os-ubuntu { color: #e95420; }
.hcloud-os-debian { color: #d70a53; }
.hcloud-os-fedora { color: #294172; }
.hcloud-os-rocky { color: #10b981; }
.hcloud-os-alma { color: #4f46e5; }
.hcloud-os-centos { color: #8b5cf6; }
.hcloud-os-app { color: #0f766e; }

.hcloud-card-subtitle {
    color: var(--hcloud-muted);
    font-size: 12px;
    margin-top: 2px;
}

.hcloud-addon-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .hcloud-type-tabs,
    .hcloud-grid,
    .hcloud-image-grid,
    .hcloud-addon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hcloud-plan-row {
        grid-template-columns: 1fr 1fr;
    }

    .hcloud-plan-head {
        display: none;
    }
}

@media (max-width: 560px) {
    .hcloud-type-tabs,
    .hcloud-grid,
    .hcloud-image-grid,
    .hcloud-addon-grid {
        grid-template-columns: 1fr;
    }
}
